Commit 4e212ceb authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Andrei Vagin

test: static/mnt_ext_auto -- Check if unshare successed

Reviewed-by: 's avatarDmitry Safonov <0x7f454c46@gmail.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 4ce3fc0b
...@@ -66,7 +66,10 @@ int main(int argc, char ** argv) ...@@ -66,7 +66,10 @@ int main(int argc, char ** argv)
} }
mkdir(src, 755); mkdir(src, 755);
unshare(CLONE_NEWNS); if (unshare(CLONE_NEWNS)) {
pr_perror("unshare");
return 1;
}
mkdir(dst, 755); mkdir(dst, 755);
if (mount(src, dst, NULL, MS_BIND, NULL)) { if (mount(src, dst, NULL, MS_BIND, NULL)) {
pr_perror("bind"); pr_perror("bind");
......
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