mirror of
https://github.com/troglobit/finit.git
synced 2026-11-18 19:30:56 +00:00
test: Fix unshare/nsenter not in PATH
Signed-off-by: Jacques de Laval <jacques@de-laval.se>
This commit is contained in:
1 parent
ba621502ae
commit
99ad26236e
2 files changed
+6
-2
No files matched your search
@@ -13,8 +13,10 @@ shift
|
|||||||
TEST_DIR=$(dirname "$0")
|
TEST_DIR=$(dirname "$0")
|
||||||
TESTS_ROOT="$(pwd)/${TEST_DIR}/test_root"
|
TESTS_ROOT="$(pwd)/${TEST_DIR}/test_root"
|
||||||
|
|
||||||
|
nsenter=$(which nsenter)
|
||||||
|
|
||||||
export PATH=/sbin:/bin
|
export PATH=/sbin:/bin
|
||||||
nsenter \
|
"$nsenter" \
|
||||||
--preserve-credentials \
|
--preserve-credentials \
|
||||||
--user \
|
--user \
|
||||||
--mount \
|
--mount \
|
||||||
|
|||||||
@@ -7,10 +7,12 @@ TESTS_ROOT="$(pwd)/${TEST_DIR}/test_root"
|
|||||||
|
|
||||||
>&2 echo "Hint: Execute '${TEST_DIR}/testenv_exec.sh \$(pgrep -P $$) /bin/sh; reset' to enter the test namespace"
|
>&2 echo "Hint: Execute '${TEST_DIR}/testenv_exec.sh \$(pgrep -P $$) /bin/sh; reset' to enter the test namespace"
|
||||||
|
|
||||||
|
unshare=$(which unshare)
|
||||||
|
|
||||||
# Not supported by Busybox unshare:
|
# Not supported by Busybox unshare:
|
||||||
# --cgroup --time
|
# --cgroup --time
|
||||||
export PATH=/sbin:/bin
|
export PATH=/sbin:/bin
|
||||||
exec unshare \
|
exec "$unshare" \
|
||||||
--user --map-root-user \
|
--user --map-root-user \
|
||||||
--fork --pid --mount-proc \
|
--fork --pid --mount-proc \
|
||||||
--mount \
|
--mount \
|
||||||
|
|||||||
Reference in new issue
Block a user