[CRIU] [PATCH] zdtm: don't execute mntns_* tests, if the kernel doesn't show mnt_id

Andrey Vagin avagin at openvz.org
Thu Aug 7 10:07:47 PDT 2014


Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 test/zdtm.sh | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/test/zdtm.sh b/test/zdtm.sh
index 1b89be7..bd2c2f1 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -174,9 +174,6 @@ static/netns
 static/cgroup00
 static/cgroup01
 ns/static/clean_mntns
-ns/static/mntns_open
-ns/static/mntns_link_remap
-ns/static/mntns_link_ghost
 "
 
 TEST_CR_KERNEL="
@@ -184,6 +181,18 @@ ns/static/tun
 static/timerfd
 "
 
+cat /proc/self/fdinfo/1 | grep -q mnt_id
+if [ $? -eq 0 ]; then
+	TEST_LIST="$TEST_LIST
+ns/static/mntns_open
+ns/static/mntns_link_remap
+ns/static/mntns_link_ghost
+"
+else
+	export ZDTM_NOSUBNS=1
+fi
+
+
 TEST_SUID_LIST="
 pid00
 caps00
@@ -237,8 +246,6 @@ START_ONLY=0
 BATCH_TEST=0
 SPECIFIED_NAME_USED=0
 
-cat /proc/self/fdinfo/1 | grep -q mnt_id || export ZDTM_NOSUBNS=1
-
 zdtm_sep()
 { (
 	set +x
-- 
1.9.3



More information about the CRIU mailing list