Commit c31c594e authored by Pavel Emelyanov's avatar Pavel Emelyanov

zdtm: Stop using test_init_ns by static/mountpoints

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Acked-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
parent 287b1465
...@@ -188,7 +188,7 @@ generate_test_list() ...@@ -188,7 +188,7 @@ generate_test_list()
static/socket-tcpbuf static/socket-tcpbuf
static/socket-tcpbuf6 static/socket-tcpbuf6
static/pty03 static/pty03
static/mountpoints ns/static/mountpoints
ns/static/session00 ns/static/session00
ns/static/session01 ns/static/session01
ns/static/tempfs ns/static/tempfs
......
...@@ -70,7 +70,7 @@ int ns_child(void *_arg) ...@@ -70,7 +70,7 @@ int ns_child(void *_arg)
return 0; return 0;
} }
static int test_fn(int argc, char **argv) int main(int argc, char **argv)
{ {
FILE *f; FILE *f;
int fd, tmpfs_fd, have_bfmtm = 0; int fd, tmpfs_fd, have_bfmtm = 0;
...@@ -79,13 +79,8 @@ static int test_fn(int argc, char **argv) ...@@ -79,13 +79,8 @@ static int test_fn(int argc, char **argv)
mode_t old_mask; mode_t old_mask;
pid_t pid = -1; pid_t pid = -1;
if (!getenv("ZDTM_REEXEC")) { test_init(argc, argv);
setenv("ZDTM_REEXEC", "1", 0);
return execv(argv[0], argv);
} else
test_init(argc, argv);
close(0); /* /dev/null */
again: again:
fs_cnt = 0; fs_cnt = 0;
f = fopen("/proc/self/mountinfo", "r"); f = fopen("/proc/self/mountinfo", "r");
...@@ -364,13 +359,3 @@ done: ...@@ -364,13 +359,3 @@ done:
pass(); pass();
return 0; return 0;
} }
#define CLONE_NEWNS 0x00020000
int main(int argc, char **argv)
{
if (getenv("ZDTM_REEXEC"))
return test_fn(argc, argv);
test_init_ns(argc, argv, CLONE_NEWNS, test_fn);
return 0;
}
{'flavor': 'h', 'flags': 'suid'} {'flavor': 'ns', 'flags': 'suid'}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment