[CRIU] [PATCH 13/11] zdtm.py: Mark nouser tests as such

Pavel Emelyanov xemul at parallels.com
Tue Dec 22 01:31:03 PST 2015


Some tests require criu to be root, e.g. tcp tests of unlink-mmaps ones,
so mark those in desc files as such.

Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
 test/zdtm.py                                   | 10 +++++++---
 test/zdtm/live/static/aio00.desc               |  2 +-
 test/zdtm/live/static/dumpable02.desc          |  2 +-
 test/zdtm/live/static/inotify00.desc           |  2 +-
 test/zdtm/live/static/socket-tcp-local.desc    |  2 +-
 test/zdtm/live/static/socket-tcp.desc          |  2 +-
 test/zdtm/live/static/socket-tcp6.desc         |  2 +-
 test/zdtm/live/static/socket-tcpbuf-local.desc |  2 +-
 test/zdtm/live/static/socket-tcpbuf.desc       |  2 +-
 test/zdtm/live/static/socket-tcpbuf6.desc      |  2 +-
 test/zdtm/live/static/unlink_fstat03.desc      |  2 +-
 test/zdtm/live/static/unlink_mmap00.desc       |  1 +
 test/zdtm/live/static/unlink_mmap01.desc       |  1 +
 test/zdtm/live/static/unlink_mmap02.desc       |  1 +
 test/zdtm/live/streaming/socket-tcp.desc       |  2 +-
 test/zdtm/live/streaming/socket-tcp6.desc      |  2 +-
 16 files changed, 22 insertions(+), 15 deletions(-)
 create mode 100644 test/zdtm/live/static/unlink_mmap00.desc
 create mode 100644 test/zdtm/live/static/unlink_mmap01.desc
 create mode 100644 test/zdtm/live/static/unlink_mmap02.desc

diff --git a/test/zdtm.py b/test/zdtm.py
index 8c84762..ab25a75 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -1068,9 +1068,13 @@ def run_tests(opts):
 				l.skip(t, "self")
 				continue
 
-			if opts['user'] and test_flag(tdesc, 'suid'):
-				l.skip(t, "suid test in user mode")
-				continue
+			if opts['user']:
+				if test_flag(tdesc, 'suid'):
+					l.skip(t, "suid test in user mode")
+					continue
+				if test_flag(tdesc, 'nouser'):
+					l.skip(t, "criu root prio needed")
+					continue
 
 			test_flavs = tdesc.get('flavor', 'h ns uns').split()
 			opts_flavs = (opts['flavor'] or 'h,ns,uns').split(',')
diff --git a/test/zdtm/live/static/aio00.desc b/test/zdtm/live/static/aio00.desc
index 5f934c7..fcaf84a 100644
--- a/test/zdtm/live/static/aio00.desc
+++ b/test/zdtm/live/static/aio00.desc
@@ -1 +1 @@
-{'feature': 'aio_remap'}
+{'feature': 'aio_remap', 'flags': 'nouser'}
diff --git a/test/zdtm/live/static/dumpable02.desc b/test/zdtm/live/static/dumpable02.desc
index 31b47ac..f8c8979 100644
--- a/test/zdtm/live/static/dumpable02.desc
+++ b/test/zdtm/live/static/dumpable02.desc
@@ -1 +1 @@
-{'flavor': 'h ns'}
+{'flavor': 'h ns', 'flags': 'nouser'}
diff --git a/test/zdtm/live/static/inotify00.desc b/test/zdtm/live/static/inotify00.desc
index 659a312..083b583 100644
--- a/test/zdtm/live/static/inotify00.desc
+++ b/test/zdtm/live/static/inotify00.desc
@@ -1 +1 @@
-{'opts': '--link-remap'}
+{'opts': '--link-remap', 'flags': 'nouser'}
diff --git a/test/zdtm/live/static/socket-tcp-local.desc b/test/zdtm/live/static/socket-tcp-local.desc
index 7790127..e02979e 100644
--- a/test/zdtm/live/static/socket-tcp-local.desc
+++ b/test/zdtm/live/static/socket-tcp-local.desc
@@ -1 +1 @@
-{'flavor': 'h ns uns', 'opts': '--tcp-established'}
+{'flavor': 'h ns uns', 'opts': '--tcp-established', 'flags': 'nouser'}
diff --git a/test/zdtm/live/static/socket-tcp.desc b/test/zdtm/live/static/socket-tcp.desc
index 214675e..7c1ae7a 100644
--- a/test/zdtm/live/static/socket-tcp.desc
+++ b/test/zdtm/live/static/socket-tcp.desc
@@ -1 +1 @@
-{'flavor': 'h', 'opts': '--tcp-established'}
+{'flavor': 'h', 'opts': '--tcp-established', 'flags': 'nouser'}
diff --git a/test/zdtm/live/static/socket-tcp6.desc b/test/zdtm/live/static/socket-tcp6.desc
index 214675e..7c1ae7a 100644
--- a/test/zdtm/live/static/socket-tcp6.desc
+++ b/test/zdtm/live/static/socket-tcp6.desc
@@ -1 +1 @@
-{'flavor': 'h', 'opts': '--tcp-established'}
+{'flavor': 'h', 'opts': '--tcp-established', 'flags': 'nouser'}
diff --git a/test/zdtm/live/static/socket-tcpbuf-local.desc b/test/zdtm/live/static/socket-tcpbuf-local.desc
index 7790127..e02979e 100644
--- a/test/zdtm/live/static/socket-tcpbuf-local.desc
+++ b/test/zdtm/live/static/socket-tcpbuf-local.desc
@@ -1 +1 @@
-{'flavor': 'h ns uns', 'opts': '--tcp-established'}
+{'flavor': 'h ns uns', 'opts': '--tcp-established', 'flags': 'nouser'}
diff --git a/test/zdtm/live/static/socket-tcpbuf.desc b/test/zdtm/live/static/socket-tcpbuf.desc
index 214675e..7c1ae7a 100644
--- a/test/zdtm/live/static/socket-tcpbuf.desc
+++ b/test/zdtm/live/static/socket-tcpbuf.desc
@@ -1 +1 @@
-{'flavor': 'h', 'opts': '--tcp-established'}
+{'flavor': 'h', 'opts': '--tcp-established', 'flags': 'nouser'}
diff --git a/test/zdtm/live/static/socket-tcpbuf6.desc b/test/zdtm/live/static/socket-tcpbuf6.desc
index 214675e..7c1ae7a 100644
--- a/test/zdtm/live/static/socket-tcpbuf6.desc
+++ b/test/zdtm/live/static/socket-tcpbuf6.desc
@@ -1 +1 @@
-{'flavor': 'h', 'opts': '--tcp-established'}
+{'flavor': 'h', 'opts': '--tcp-established', 'flags': 'nouser'}
diff --git a/test/zdtm/live/static/unlink_fstat03.desc b/test/zdtm/live/static/unlink_fstat03.desc
index 659a312..083b583 100644
--- a/test/zdtm/live/static/unlink_fstat03.desc
+++ b/test/zdtm/live/static/unlink_fstat03.desc
@@ -1 +1 @@
-{'opts': '--link-remap'}
+{'opts': '--link-remap', 'flags': 'nouser'}
diff --git a/test/zdtm/live/static/unlink_mmap00.desc b/test/zdtm/live/static/unlink_mmap00.desc
new file mode 100644
index 0000000..1fda483
--- /dev/null
+++ b/test/zdtm/live/static/unlink_mmap00.desc
@@ -0,0 +1 @@
+{'flags': 'nouser'}
diff --git a/test/zdtm/live/static/unlink_mmap01.desc b/test/zdtm/live/static/unlink_mmap01.desc
new file mode 100644
index 0000000..1fda483
--- /dev/null
+++ b/test/zdtm/live/static/unlink_mmap01.desc
@@ -0,0 +1 @@
+{'flags': 'nouser'}
diff --git a/test/zdtm/live/static/unlink_mmap02.desc b/test/zdtm/live/static/unlink_mmap02.desc
new file mode 100644
index 0000000..1fda483
--- /dev/null
+++ b/test/zdtm/live/static/unlink_mmap02.desc
@@ -0,0 +1 @@
+{'flags': 'nouser'}
diff --git a/test/zdtm/live/streaming/socket-tcp.desc b/test/zdtm/live/streaming/socket-tcp.desc
index 214675e..7c1ae7a 100644
--- a/test/zdtm/live/streaming/socket-tcp.desc
+++ b/test/zdtm/live/streaming/socket-tcp.desc
@@ -1 +1 @@
-{'flavor': 'h', 'opts': '--tcp-established'}
+{'flavor': 'h', 'opts': '--tcp-established', 'flags': 'nouser'}
diff --git a/test/zdtm/live/streaming/socket-tcp6.desc b/test/zdtm/live/streaming/socket-tcp6.desc
index 214675e..7c1ae7a 100644
--- a/test/zdtm/live/streaming/socket-tcp6.desc
+++ b/test/zdtm/live/streaming/socket-tcp6.desc
@@ -1 +1 @@
-{'flavor': 'h', 'opts': '--tcp-established'}
+{'flavor': 'h', 'opts': '--tcp-established', 'flags': 'nouser'}
-- 
1.9.3




More information about the CRIU mailing list