diff options
author | Kay Sievers <kay@vrfy.org> | 2012-10-08 20:50:20 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-10-08 20:52:57 +0200 |
commit | 04eaa66837260d86c27c9121b626ad6219690384 (patch) | |
tree | 3d5c000802122394bd77d6b2055e62fd5c0deed6 | |
parent | a8985ba3c2ad428bf572c636f9d64c4ce52bfbe7 (diff) |
udev: fix test
-rw-r--r-- | src/test/test-udev.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/test/test-udev.c b/src/test/test-udev.c index 89827c02cb..77380628bb 100644 --- a/src/test/test-udev.c +++ b/src/test/test-udev.c @@ -54,8 +54,14 @@ static int fake_filesystems(void) { err = unshare(CLONE_NEWNS); if (err < 0) { err = -errno; - fprintf(stderr, "failed to call unshare() %m\n"); - return err; + fprintf(stderr, "failed to call unshare(): %m\n"); + goto out; + } + + if (mount(NULL, "/", NULL, MS_PRIVATE|MS_REC, NULL) < 0) { + err = -errno; + fprintf(stderr, "failed to mount / as private: %m\n"); + goto out; } for (i = 0; i < ELEMENTSOF(fakefss); i++) { @@ -66,6 +72,7 @@ static int fake_filesystems(void) { return err; } } +out: return err; } |