From 63e128a96880d0ca638ff621ed5f5feee0315c4c Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Tue, 6 Dec 2016 01:56:00 +0300 Subject: [PATCH] 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 Signed-off-by: Andrei Vagin Signed-off-by: Pavel Emelyanov --- test/zdtm/static/socket-tcp-fin-wait1.hook | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"]