[CRIU] [PATCH 02/10] test: static/mnt_ext_master -- Check if unshare successed
Cyrill Gorcunov
gorcunov at gmail.com
Wed Sep 19 14:50:28 MSK 2018
Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
test/zdtm/static/mnt_ext_master.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/test/zdtm/static/mnt_ext_master.c b/test/zdtm/static/mnt_ext_master.c
index f2c8e38d4e90..12e9ebab113a 100644
--- a/test/zdtm/static/mnt_ext_master.c
+++ b/test/zdtm/static/mnt_ext_master.c
@@ -43,7 +43,10 @@ int main(int argc, char ** argv)
mkdir(src, 755);
mkdir(dst, 755);
- unshare(CLONE_NEWNS);
+ if (unshare(CLONE_NEWNS)) {
+ pr_perror("unshare");
+ return 1;
+ }
if (mount(src, dst, NULL, MS_BIND, NULL)) {
pr_perror("bind");
--
2.17.1
More information about the CRIU
mailing list