File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,12 @@ test -e /run/media/system/simple.img/foo.bar
126126# systemd-mount --list and systemd-umount require the loopback block device is initialized by udevd.
127127udevadm settle --timeout 30
128128assert_in " /dev/loop.* ext4 +sd-mount-test" " $( systemd-mount --list --full) "
129+ LOOP_AUTO=$( systemd-mount --list --full --no-legend | awk ' $6 == "sd-mount-test" { print $1 }' )
130+ LOOP_AUTO_DEVPATH=$( udevadm info --query property --property DEVPATH --value " $LOOP_AUTO " )
129131systemd-umount " $WORK_DIR /simple.img"
132+ # Wait for 'change' uevent for the device with DISK_MEDIA_CHANGE=1.
133+ # After the event, the backing_file attribute should be removed.
134+ timeout 60 bash -c " while [[ -e /sys/$LOOP_AUTO_DEVPATH /loop/backing_file ]]; do sleep 1; done"
130135
131136# --owner + vfat
132137#
You can’t perform that action at this time.
0 commit comments