[CRIU] [PATCH 1/1] zdtm: skip 'tcp-close' tests if restore is skipped

silence asml.silence at gmail.com
Wed Jun 28 03:41:38 MSK 2017


From: Pavel Begunkov <asml.silence at gmail.com>

'tcp-close' is a option that replaces connected tcp-sockets with
'closed' ones during restoring, therefore it have no sense without
restore stage. Thus let's skip related tests if the 'norst' flag was
specified.

Signed-off-by: Pavel Begunkov <asml.silence at gmail.com>
---
 test/zdtm.py                            | 4 ++++
 test/zdtm/static/socket-tcp-close0.desc | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/test/zdtm.py b/test/zdtm.py
index 088572db3..14263a626 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -1771,6 +1771,10 @@ def run_tests(opts):
 				l.skip(t, "arch %s" % tdesc['arch'])
 				continue
 
+			if test_flag(tdesc, 'reqrst') and opts['norst']:
+				l.skip(t, "restore stage is required")
+				continue
+
 			if run_all and test_flag(tdesc, 'noauto'):
 				l.skip(t, "manual run only")
 				continue
diff --git a/test/zdtm/static/socket-tcp-close0.desc b/test/zdtm/static/socket-tcp-close0.desc
index e85de0e66..75ce8a5a0 100644
--- a/test/zdtm/static/socket-tcp-close0.desc
+++ b/test/zdtm/static/socket-tcp-close0.desc
@@ -1 +1 @@
-{'dopts': '--tcp-established', 'ropts': '--tcp-close'}
+{'dopts': '--tcp-established', 'ropts': '--tcp-close', 'flags': 'reqrst '}
-- 
2.11.1



More information about the CRIU mailing list