From 255d90cee96fdbb0b4af308524f3c5906020f341 Mon Sep 17 00:00:00 2001 From: Jacques de Laval Date: Sat, 27 Feb 2021 13:45:05 +0100 Subject: [PATCH] test: Mount /tmp as tmpfs again, but copy any existing files in /tmp back into it Signed-off-by: Jacques de Laval --- test/add-remove-dynamic-service/test.sh | 13 ------------- test/chrootsetup.sh | 7 ++++++- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/test/add-remove-dynamic-service/test.sh b/test/add-remove-dynamic-service/test.sh index 950b8a4f..fc17f5ff 100755 --- a/test/add-remove-dynamic-service/test.sh +++ b/test/add-remove-dynamic-service/test.sh @@ -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." diff --git a/test/chrootsetup.sh b/test/chrootsetup.sh index 22581683..e30c75c4 100755 --- a/test/chrootsetup.sh +++ b/test/chrootsetup.sh @@ -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