[CRIU] [PATCH v2 3/4] zdtm: add 'nolazy' flag for tests not compatible with lazy pages

Mike Rapoport rppt at linux.vnet.ibm.com
Sun Nov 27 02:52:56 PST 2016


The kernel support for lazy pages (userfaultfd) lacks many important
features which effectively prevents success in certain tests.
Allow skipping such test with somewhat informative message

Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
---
 test/zdtm.py                    | 5 +++++
 test/zdtm/static/cow00.desc     | 2 +-
 test/zdtm/static/cow01.desc     | 2 +-
 test/zdtm/transition/fork.desc  | 1 +
 test/zdtm/transition/fork2.desc | 1 +
 5 files changed, 9 insertions(+), 2 deletions(-)
 create mode 100644 test/zdtm/transition/fork.desc
 create mode 100644 test/zdtm/transition/fork2.desc

diff --git a/test/zdtm.py b/test/zdtm.py
index 7ca4bbf..ca7884c 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -1593,6 +1593,11 @@ def run_tests(opts):
 					l.skip(t, "samens test in the same namespace")
 					continue
 
+			if opts['lazy_pages']:
+				if test_flag(tdesc, 'nolazy'):
+					l.skip(t, "lazy pages are not supported")
+					continue
+
 			test_flavs = tdesc.get('flavor', 'h ns uns').split()
 			opts_flavs = (opts['flavor'] or 'h,ns,uns').split(',')
 			if opts_flavs != ['best']:
diff --git a/test/zdtm/static/cow00.desc b/test/zdtm/static/cow00.desc
index c303c11..654ae75 100644
--- a/test/zdtm/static/cow00.desc
+++ b/test/zdtm/static/cow00.desc
@@ -1,2 +1,2 @@
 # /proc/pid/pagemap doesn't show phys addr for unprivileged users
-{'flavor': 'ns h', 'flags': 'suid'}
+{'flavor': 'ns h', 'flags': 'suid nolazy'}
diff --git a/test/zdtm/static/cow01.desc b/test/zdtm/static/cow01.desc
index d969725..24a8142 100644
--- a/test/zdtm/static/cow01.desc
+++ b/test/zdtm/static/cow01.desc
@@ -1 +1 @@
-{'flavor': 'h ns', 'flags': 'suid'}
+{'flavor': 'h ns', 'flags': 'suid nolazy'}
diff --git a/test/zdtm/transition/fork.desc b/test/zdtm/transition/fork.desc
new file mode 100644
index 0000000..1ffa341
--- /dev/null
+++ b/test/zdtm/transition/fork.desc
@@ -0,0 +1 @@
+{'flags' : 'nolazy'}
diff --git a/test/zdtm/transition/fork2.desc b/test/zdtm/transition/fork2.desc
new file mode 100644
index 0000000..1ffa341
--- /dev/null
+++ b/test/zdtm/transition/fork2.desc
@@ -0,0 +1 @@
+{'flags' : 'nolazy'}
-- 
1.9.1



More information about the CRIU mailing list