mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-28 20:42:49 +00:00
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 <xemul@virtuozzo.com>
This commit is contained in:
parent
c399235244
commit
33bc00a158
1 changed files with 3 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue