[CRIU] [PATCH 04/10] test: static/mntns_shared_bind -- Check if unshare successed
Cyrill Gorcunov
gorcunov at gmail.com
Wed Sep 19 14:50:30 MSK 2018
Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
test/zdtm/static/mntns_shared_bind.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/test/zdtm/static/mntns_shared_bind.c b/test/zdtm/static/mntns_shared_bind.c
index ef48bd8a2235..b0d63af58049 100644
--- a/test/zdtm/static/mntns_shared_bind.c
+++ b/test/zdtm/static/mntns_shared_bind.c
@@ -70,7 +70,10 @@ int main(int argc, char **argv)
return 1;
}
if (pid == 0) {
- unshare(CLONE_NEWNS);
+ if (unshare(CLONE_NEWNS)) {
+ pr_perror("unshare");
+ return 1;
+ }
if (mount(path, bpath, NULL, MS_BIND, NULL)) {
pr_perror("mount");
return 1;
--
2.17.1
More information about the CRIU
mailing list