2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-29 21:38:16 +00:00

test: skip pre-dump images in socket-tcp*.hook

These hooks opens inetsk.img, but it doesn't exist if
processes were pre-dumped.

travis-ci: success for test: skip pre-dump images in socket-tcp*.hook
Reported-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Andrei Vagin 2016-12-06 01:56:00 +03:00 committed by Pavel Emelyanov
parent 1a89b88c08
commit 63e128a968

View File

@ -22,7 +22,11 @@ if sys.argv[1] != "--post-restore":
print "Check TCP images"
def get_sockets(image_dir):
f = open(os.path.join(image_dir, "inetsk.img"))
fname = os.path.join(image_dir, "inetsk.img")
if not os.access(fname, os.F_OK):
return None
f = open(fname)
sockets = pycriu.images.load(f)
sockets = sockets["entries"]