mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +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:
parent
1a89b88c08
commit
63e128a968
1 changed files with 5 additions and 1 deletions
|
|
@ -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"]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue