[CRIU] [PATCH 3/4] test: add mnt_ext_* tests to zdtm.sh

Tycho Andersen tycho.andersen at canonical.com
Wed May 6 07:07:53 PDT 2015


Note that we should only do the ns specific mounting when we are actually in a
ns test.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 test/zdtm.sh         | 10 +++++++---
 test/zdtm/.gitignore |  2 ++
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/test/zdtm.sh b/test/zdtm.sh
index d55a92c..3dee9d6 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -204,6 +204,8 @@ generate_test_list()
 	"
 
 	TEST_MNTNS="
+		ns/static/mnt_ext_auto
+		ns/static/mnt_ext_master
 		ns/static/mntns_open
 		ns/static/mntns_link_remap
 		ns/static/mntns_link_ghost
@@ -560,9 +562,11 @@ start_test()
 		return 1
 	fi
 
-	mount --make-private "$ZDTM_ROOT"
-	umount -l "$ZDTM_ROOT"
-	mount --make-private --bind . $ZDTM_ROOT || return 1
+	if [ -n "$ZDTM_ROOT" ]; then
+		mount --make-private "$ZDTM_ROOT"
+		umount -l "$ZDTM_ROOT"
+		mount --make-private --bind . $ZDTM_ROOT || return 1
+	fi
 }
 
 stop_test()
diff --git a/test/zdtm/.gitignore b/test/zdtm/.gitignore
index aee6b9e..860cf41 100644
--- a/test/zdtm/.gitignore
+++ b/test/zdtm/.gitignore
@@ -60,6 +60,8 @@
 /live/static/maps_file_prot
 /live/static/mem-touch
 /live/static/mmx00
+/live/static/mnt_ext_auto
+/live/static/mnt_ext_master
 /live/static/mntns_link_ghost
 /live/static/mntns_link_remap
 /live/static/mntns_open
-- 
2.1.4



More information about the CRIU mailing list