From 33bc00a1589c35ce03a749811ab2fe6f9cf86766 Mon Sep 17 00:00:00 2001 From: Pavel Emelianov Date: Tue, 28 May 2019 08:47:51 +0000 Subject: [PATCH] zdtm: Check stats file presence before reading In some cases the stats-dump file can be missing, so do not crash the whole zdtm.py in this case. https://ci.openvz.org/job/CRIU/job/criu-live-migration/job/criu-dev/2362/console Signed-off-by: Pavel Emelyanov --- test/zdtm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/zdtm.py b/test/zdtm.py index abe92f9d0..a01947557 100755 --- a/test/zdtm.py +++ b/test/zdtm.py @@ -1108,6 +1108,9 @@ class criu: subprocess.Popen([self.__crit_bin, "show", self.__stats_file(action)]).wait() def check_pages_counts(self): + if not os.access(self.__stats_file("dump"), os.R_OK): + return + stats_written = -1 with open(self.__stats_file("dump"), 'rb') as stfile: stats = crpc.images.load(stfile)