WIP: Unshare/Chroot test wrapper script

This commit is contained in:
Jacques de Laval committed 2021-02-17 16:20:17 +01:00
1 parent 352ffb1582
commit aa9a5fbb99
2 files changed
+24

No files matched your search

Executable
+15
View File
@@ -0,0 +1,15 @@
#!/bin/sh
set -eux
TEST_DIR=$(dirname "$0")
TESTS_ROOT="${TEST_DIR}/test_root"
cp "${TEST_DIR}/testwrapper.sh" "${TESTS_ROOT}/usr/local/bin/"
unshare \
--user --map-root-user \
--fork --pid --mount-proc \
--mount \
--mount-proc \
chroot "$TESTS_ROOT" /usr/local/bin/testwrapper.sh "$@"