[CRIU] [PATCH 6/6] zdtm: Add test for mount namespace w/o mountpoints
Pavel Emelyanov
xemul at parallels.com
Thu Jun 5 09:19:14 PDT 2014
Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
test/zdtm.sh | 2 ++
test/zdtm/live/static/Makefile | 1 +
test/zdtm/live/static/clean_mntns.c | 25 +++++++++++++++++++++++++
3 files changed, 28 insertions(+)
create mode 100644 test/zdtm/live/static/clean_mntns.c
diff --git a/test/zdtm.sh b/test/zdtm.sh
index 7486fd8..e66a872 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -138,6 +138,7 @@ ns/static/tun
static/netns-nf
static/netns
static/cgroup00
+ns/static/clean_mntns
"
TEST_CR_KERNEL="
@@ -168,6 +169,7 @@ bind-mount
mountpoints
inotify_irmap
cgroup00
+clean_mntns
"
source $(readlink -f `dirname $0`/env.sh) || exit 1
diff --git a/test/zdtm/live/static/Makefile b/test/zdtm/live/static/Makefile
index 23f988f..4d275f5 100644
--- a/test/zdtm/live/static/Makefile
+++ b/test/zdtm/live/static/Makefile
@@ -108,6 +108,7 @@ TST_NOFILE = \
tun \
stopped \
rtc \
+ clean_mntns \
# jobctl00 \
TST_FILE = \
diff --git a/test/zdtm/live/static/clean_mntns.c b/test/zdtm/live/static/clean_mntns.c
new file mode 100644
index 0000000..9f5f140
--- /dev/null
+++ b/test/zdtm/live/static/clean_mntns.c
@@ -0,0 +1,25 @@
+#include <errno.h>
+#include <unistd.h>
+#include <sys/mount.h>
+
+#include "zdtmtst.h"
+
+const char *test_doc = "Check that clean mntns works";
+const char *test_author = "Pavel Emelianov <xemul at parallels.com>";
+
+int main(int argc, char **argv)
+{
+ test_init(argc, argv);
+
+ if (umount("/proc") < 0)
+ err("Can't umount proc\n");
+
+ if (umount("/dev/pts") < 0)
+ err("Can't umount devpts\n");
+
+ test_daemon();
+ test_waitsig();
+
+ pass();
+ return 0;
+}
--
1.8.4.2
More information about the CRIU
mailing list