Commit 33dd782c authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Andrei Vagin

test: static/tun -- 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 1efdb547
...@@ -120,7 +120,10 @@ int main(int argc, char **argv) ...@@ -120,7 +120,10 @@ int main(int argc, char **argv)
test_init(argc, argv); test_init(argc, argv);
#ifdef TUN_NS #ifdef TUN_NS
unshare(CLONE_NEWNET); if (unshare(CLONE_NEWNET)) {
pr_perror("unshare");
return 1;
}
system("ip link set up dev lo"); system("ip link set up dev lo");
#endif #endif
/* fd[0] -- opened file */ /* fd[0] -- opened file */
......
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