]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-81-GENERATORS: Do a lazy unmounts
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 8 May 2024 09:41:04 +0000 (11:41 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 8 May 2024 10:27:24 +0000 (12:27 +0200)
Otherwise we might fail if PID 1 is currently accessing these files.

Fixes #32692 (hopefully)

test/units/generator-utils.sh
test/units/testsuite-81.getty-generator.sh

index fb62747fa1f209d167df25350792af32b01fca64..97a63d804311f2f64cb3cd79f6e3c95bc36d3545 100755 (executable)
@@ -72,7 +72,7 @@ run_and_list() {
     ls -lR "$out_dir"
 
     if [[ -n "${environ:-}" ]]; then
-        umount /proc/1/environ
+        umount /proc/1/environ --lazy
         rm -f "$environ"
     fi
 }
index 103e9661913911205e93bf7e9cf715a77f789d0b..d1dd22c18ec47b467ba3ce9e5cdf3b76f39c932b 100755 (executable)
@@ -85,5 +85,5 @@ PID1_ENVIRON="SYSTEMD_GETTY_AUTO=0" run_and_list "$GENERATOR_BIN" "$OUT_DIR"
 [[ "$(find "$OUT_DIR" ! -type d | wc -l)" -eq 0 ]]
 
 # Cleanup
-umount /sys/class/tty/console/active
+umount /sys/class/tty/console/active --lazy
 rm -f "${DUMMY_CONSOLES[@]/#//dev/}" /dev/notatty99