diff --git a/test/zdtm/static/socket-tcp-fin-wait1.hook b/test/zdtm/static/socket-tcp-fin-wait1.hook index 76200eb36..ae0b51d39 100755 --- a/test/zdtm/static/socket-tcp-fin-wait1.hook +++ b/test/zdtm/static/socket-tcp-fin-wait1.hook @@ -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"]