diff options
author | Evegeny Vereshchagin <evvers@ya.ru> | 2018-03-09 01:10:42 +0000 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-06-28 09:23:09 +0200 |
commit | c3227cc7ba5a8e27e35cb966ec1a1eda304d0316 (patch) | |
tree | c7611dda3d7db97abfae902f4100445b5c58a933 | |
parent | cd251ea623a3209de23462953677b29af92fab5b (diff) |
tests: make / private after creating a mount namespace
so that the test never affects the root namespace.
(cherry picked from commit c58fd466a313a1f93df1792822e358c67990bcdf)
-rw-r--r-- | src/test/test-process-util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/test-process-util.c b/src/test/test-process-util.c index 40b5c407c..d6821f83e 100644 --- a/src/test/test-process-util.c +++ b/src/test/test-process-util.c @@ -201,6 +201,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); |