[CRIU] [PATCH] zdtm: Check stats file presence before reading

Pavel Emelianov xemul at virtuozzo.com
Tue May 28 11:47:51 MSK 2019


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 <xemul at virtuozzo.com>
---
 test/zdtm.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/test/zdtm.py b/test/zdtm.py
index 9f48369..0adc22c 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -1109,6 +1109,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)
-- 
2.1.4



More information about the CRIU mailing list