From: Evegeny Vereshchagin Date: Fri, 9 Mar 2018 01:10:42 +0000 (+0000) Subject: tests: make / private after creating a mount namespace X-Git-Tag: v239~558^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c58fd466a313a1f93df1792822e358c67990bcdf;p=thirdparty%2Fsystemd.git tests: make / private after creating a mount namespace so that the test never affects the root namespace. --- diff --git a/src/test/test-process-util.c b/src/test/test-process-util.c index 0e5a9d811d7..1a0164e601f 100644 --- a/src/test/test-process-util.c +++ b/src/test/test-process-util.c @@ -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);