Commit b84642ff authored by Pavel Emelyanov's avatar Pavel Emelyanov

zdtm: Tune mountpoints test

I constantly have binfmt_misc off on my set ups :) Looks like this fs is
far from being default for systems, so to make the test work (we plan to
rewrite it anyway) let's make this fs being optional.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent bdb549c9
......@@ -73,7 +73,7 @@ int ns_child(void *_arg)
static int test_fn(int argc, char **argv)
{
FILE *f;
int fd, tmpfs_fd;
int fd, tmpfs_fd, have_bfmtm = 0;
unsigned fs_cnt, fs_cnt_last = 0;
struct ns_exec_args args;
mode_t old_mask;
......@@ -268,10 +268,8 @@ done:
}
if (mount("none", MPTS_ROOT"/kernel/sys/fs/binfmt_misc",
"binfmt_misc", 0, "") < 0) {
fail("Can't mount binfmt_misc");
return 1;
}
"binfmt_misc", 0, "") == 0)
have_bfmtm = 1;
unlink("/dev/null");
/*
......@@ -305,6 +303,11 @@ done:
return 1;
}
if (have_bfmtm && access(MPTS_ROOT"/kernel/sys/fs/binfmt_misc/register", F_OK)) {
fail("No binfmt_misc after restore");
return 1;
}
if (umount(MPTS_ROOT"/dev/overmount") == -1) {
err("Can't umount "MPTS_ROOT"/dev/overmount\n");
return -1;
......
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