[CRIU] [PATCH RESEND v1 05/55] zdtm: Add proc-self01 test
Kirill Tkhai
ktkhai at virtuozzo.com
Fri Mar 24 08:09:50 PDT 2017
Check, that fdstore-keeped user ns files are opened
correct after restore.
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
test/zdtm/static/Makefile | 2 ++
test/zdtm/static/proc-self.c | 4 ++++
test/zdtm/static/proc-self01.c | 1 +
3 files changed, 7 insertions(+)
create mode 120000 test/zdtm/static/proc-self01.c
diff --git a/test/zdtm/static/Makefile b/test/zdtm/static/Makefile
index 02bf54d3..68a6846d 100644
--- a/test/zdtm/static/Makefile
+++ b/test/zdtm/static/Makefile
@@ -107,6 +107,7 @@ TST_NOFILE := \
pdeath_sig \
file_fown \
proc-self \
+ proc-self01 \
eventfs00 \
signalfd00 \
inotify_irmap \
@@ -468,6 +469,7 @@ socket-tcp6-unconn: override CFLAGS += -D ZDTM_IPV6
pty-console: override CFLAGS += -D ZDTM_DEV_CONSOLE
userns02: override CFLAGS += -D USERNS02
+proc-self01: override CFLAGS += -D PROC_SELF01
$(LIB): force
$(Q) $(MAKE) -C $(LIBDIR)
diff --git a/test/zdtm/static/proc-self.c b/test/zdtm/static/proc-self.c
index 54cc5f1f..f6cf5f16 100644
--- a/test/zdtm/static/proc-self.c
+++ b/test/zdtm/static/proc-self.c
@@ -16,7 +16,11 @@
const char *test_doc = "Check for /proc/self/ns path restore";
const char *test_author = "Cyrill Gorcunov <gorcunov at openvz.org>";
+#ifdef PROC_SELF01
+const char nspath[] = "/proc/self/ns/user";
+#else
const char nspath[] = "/proc/self/ns/net";
+#endif
int read_fd_link(int lfd, char *buf, size_t size)
{
diff --git a/test/zdtm/static/proc-self01.c b/test/zdtm/static/proc-self01.c
new file mode 120000
index 00000000..3ac971a4
--- /dev/null
+++ b/test/zdtm/static/proc-self01.c
@@ -0,0 +1 @@
+proc-self.c
\ No newline at end of file
More information about the CRIU
mailing list