chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd251ea
)
tests: make / private after creating a mount namespace
author
Evegeny Vereshchagin
<evvers@ya.ru>
Fri, 9 Mar 2018 01:10:42 +0000
(
01:10
+0000)
committer
Sven Eden
<yamakuzure@gmx.net>
Thu, 28 Jun 2018 07:23:09 +0000
(09:23 +0200)
so that the test never affects the root namespace.
(cherry picked from commit
c58fd466a313a1f93df1792822e358c67990bcdf
)
src/test/test-process-util.c
patch
|
blob
|
history
diff --git
a/src/test/test-process-util.c
b/src/test/test-process-util.c
index 40b5c407c6ca48ce7b5282b9d9e66b33e6c36a69..d6821f83e740636911f44bb78acf2b3d07166a91 100644
(file)
--- 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);