From d9a785adbbf0e3de0b56fe4cd3f816ca459bbaca Mon Sep 17 00:00:00 2001 From: Kirill Tkhai Date: Sat, 1 Apr 2017 14:38:06 +0300 Subject: [PATCH] zdtm: Add proc-self01 test Check, that fdstore-keeped user ns files are opened correct after restore. Signed-off-by: Kirill Tkhai Signed-off-by: Andrei Vagin --- 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 04ed36a5d..d30023e4d 100644 --- a/test/zdtm/static/Makefile +++ b/test/zdtm/static/Makefile @@ -116,6 +116,7 @@ TST_NOFILE := \ pdeath_sig \ file_fown \ proc-self \ + proc-self01 \ eventfs00 \ signalfd00 \ inotify_irmap \ @@ -506,6 +507,7 @@ socket-tcp4v6-closing: CFLAGS += -D ZDTM_IPV4V6 pty-console: CFLAGS += -D ZDTM_DEV_CONSOLE userns02: CFLAGS += -D USERNS02 +proc-self01: override CFLAGS += -D PROC_SELF01 shm-unaligned: CFLAGS += -DZDTM_SHM_UNALIGNED diff --git a/test/zdtm/static/proc-self.c b/test/zdtm/static/proc-self.c index 8292c08cc..d19ec6dd3 100644 --- a/test/zdtm/static/proc-self.c +++ b/test/zdtm/static/proc-self.c @@ -15,7 +15,11 @@ const char *test_doc = "Check for /proc/self/ns path restore"; const char *test_author = "Cyrill Gorcunov "; +#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 000000000..3ac971a4f --- /dev/null +++ b/test/zdtm/static/proc-self01.c @@ -0,0 +1 @@ +proc-self.c \ No newline at end of file