Commit 2ad1ba72 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

zdtm: check bind-mounted files in static/mountpoints

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 494c0443
......@@ -249,6 +249,24 @@ done:
}
mkdir(MPTS_ROOT"/dev/slave/test.mnt.slave/test.slave", 0600);
fd = open(MPTS_ROOT"/dev/bmfile", O_CREAT | O_WRONLY);
if (fd < 0) {
err("Can't create " MPTS_ROOT "/dev/share-1/bmfile");
return 1;
}
close(fd);
fd = open(MPTS_ROOT"/dev/bmfile-mount", O_CREAT | O_WRONLY);
if (fd < 0) {
err("Can't create " MPTS_ROOT "/dev/share-1/bmfile");
return 1;
}
close(fd);
if (mount(MPTS_ROOT"/dev/bmfile", MPTS_ROOT"/dev/bmfile-mount", NULL, MS_BIND, NULL) < 0) {
fail("Can't mount tmpfs");
return 1;
}
if (mount("none", MPTS_ROOT"/kernel", "proc", 0, "") < 0) {
fail("Can't mount proc");
......
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