mirror of
https://github.com/systemd/systemd.git
synced 2025-01-31 05:47:30 +03:00
tests: make / private after creating a mount namespace
so that the test never affects the root namespace.
This commit is contained in:
parent
112cc3b5b2
commit
c58fd466a3
@ -193,6 +193,8 @@ static void test_get_process_cmdline_harder(void) {
|
||||
assert_se(pid == 0);
|
||||
assert_se(unshare(CLONE_NEWNS) >= 0);
|
||||
|
||||
assert_se(mount(NULL, "/", NULL, MS_PRIVATE|MS_REC, NULL) >= 0);
|
||||
|
||||
fd = mkostemp(path, O_CLOEXEC);
|
||||
assert_se(fd >= 0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user