test: Mount /tmp as tmpfs again, but copy any existing files in /tmp back into it

Signed-off-by: Jacques de Laval <jacques@de-laval.se>
This commit is contained in:
Jacques de Laval
2021-02-27 13:45:05 +01:00
parent 8b680b1b14
commit 255d90cee9
2 changed files with 6 additions and 14 deletions
-13
View File
@@ -7,19 +7,6 @@ TEST_DIR=$(dirname "$0")/..
# shellcheck source=/dev/null
. "$TEST_DIR/lib.sh"
say 'environment:'
texec env
say 'initctl:'
texec busybox-x86_64 which initctl
say 'ldd initctl:'
texec sh -c 'LD_TRACE_LOADED_OBJECTS=1 initctl'
say 'finit:'
texec busybox-x86_64 which finit
say 'ldd finit:'
texec sh -c 'LD_TRACE_LOADED_OBJECTS=1 finit'
say 'tree:'
texec find / | grep -v '^/sys' | grep -v '^/proc'
test_teardown() {
say "Test done $(date)"
say "Running test teardown."
+6 -1
View File
@@ -16,7 +16,12 @@ mount -n -t tmpfs none /dev
mount -t proc none /proc
mount -t sysfs none /sys
# mount -t tmpfs none /tmp
mkdir -p /tmp.shadow
mount --bind /tmp /tmp.shadow
mount -t tmpfs none /tmp
cp -a /tmp.shadow/* /tmp/
# mount -t tmpfs none /etc
# mkdir -p /dev/pts