From: Yu Watanabe Date: Thu, 15 Dec 2022 18:04:22 +0000 (+0900) Subject: test: systemd-mount --list and systemd-umount requires the device is initialized... X-Git-Tag: v253-rc1~255 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea4b8f4cbfffe193486c7995db49564ebea61191;p=thirdparty%2Fsystemd.git test: systemd-mount --list and systemd-umount requires the device is initialized by udevd Fixes #25674. --- diff --git a/test/units/testsuite-74.mount.sh b/test/units/testsuite-74.mount.sh index 6edff265b50..4890911fd00 100755 --- a/test/units/testsuite-74.mount.sh +++ b/test/units/testsuite-74.mount.sh @@ -3,6 +3,9 @@ set -eux set -o pipefail +# shellcheck source=test/units/assert.sh +. "$(dirname "$0")"/assert.sh + # We're going to play around with block/loop devices, so bail out early # if we're running in nspawn if systemd-detect-virt --container >/dev/null; then @@ -115,8 +118,11 @@ timeout 10s bash -c "while systemctl status '$(systemd-escape --path "$WORK_DIR/ # Mount a disk image systemd-mount --discover "$WORK_DIR/simple.img" -systemd-mount --list --full +# We can access files in the image even if the loopback block device is not initialized by udevd. test -e /run/media/system/simple.img/foo.bar +# systemd-mount --list and systemd-umount require the loopback block device is initialized by udevd. +udevadm settle --timeout 30 +assert_in "/dev/loop.* ext4 sd-mount-test" "$(systemd-mount --list --full)" systemd-umount "$WORK_DIR/simple.img" # --owner + vfat