1
0
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:
Evegeny Vereshchagin 2018-03-09 01:10:42 +00:00
parent 112cc3b5b2
commit c58fd466a3

View File

@ -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);