summaryrefslogtreecommitdiffstats
path: root/test/TEST-24-CRYPTSETUP/test.sh
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2023-06-04 15:45:08 +0200
committerFrantisek Sumsal <frantisek@sumsal.cz>2023-06-05 16:50:13 +0200
commit168ccb879f48b0051c2abd184c78154ab17af0fd (patch)
treea1279c53248718d1d7cfbd7abc45b41bc5c57931 /test/TEST-24-CRYPTSETUP/test.sh
parenttest: minor cleanup (diff)
downloadsystemd-168ccb879f48b0051c2abd184c78154ab17af0fd.tar.xz
systemd-168ccb879f48b0051c2abd184c78154ab17af0fd.zip
test: clean up the test cleanup a bit
Diffstat (limited to '')
-rwxr-xr-xtest/TEST-24-CRYPTSETUP/test.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/TEST-24-CRYPTSETUP/test.sh b/test/TEST-24-CRYPTSETUP/test.sh
index c7e024ffed..9bfbeac80c 100755
--- a/test/TEST-24-CRYPTSETUP/test.sh
+++ b/test/TEST-24-CRYPTSETUP/test.sh
@@ -62,6 +62,7 @@ test_create_image() {
mkdir -p "$STATEDIR/keydev"
mount "$STATEDIR/keydev.img" "$STATEDIR/keydev"
echo -n test >"$STATEDIR/keydev/keyfile"
+ sync "$STATEDIR/keydev"
umount "$STATEDIR/keydev"
cat >>"$initdir/etc/fstab" <<EOF
@@ -98,9 +99,9 @@ EOF
}
cleanup_root_var() {
- ddebug "umount ${initdir:?}/var"
- mountpoint "$initdir/var" && umount "$initdir/var"
+ mountpoint -q "$initdir/var" && umount "$initdir/var"
[[ -b "/dev/mapper/${DM_NAME:?}" ]] && cryptsetup luksClose "/dev/mapper/$DM_NAME"
+ mountpoint -q "${STATEDIR:?}/keydev" && umount "$STATEDIR/keydev"
}
test_cleanup() {