]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - tests/ts/mount/uuid
tests: consolidate ts_device_has UUID or LABEL
[thirdparty/util-linux.git] / tests / ts / mount / uuid
index efd2774ed5d9288e790ae72a2503adeae6e0b3ae..36f75cef9b848de91d726914977617389731dc1c 100755 (executable)
@@ -32,12 +32,10 @@ ts_device_init
 DEVICE=$TS_LODEV
 
 mkfs.ext3 $DEVICE &> /dev/null || ts_die "Cannot make ext3 on $DEVICE"
-
-ts_device_has_uuid $DEVICE || ts_die "Cannot find UUID on $DEVICE"
-
-UUID=$(ts_uuid_by_devname $DEVICE)
+UUID=$(ts_uuid_by_devname "$DEVICE") || ts_die "Cannot find UUID on $DEVICE"
 
 [ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+ts_udevadm_settle "$DEVICE" "UUID"
 
 # variant A)
 $TS_CMD_MOUNT -U $UUID $TS_MOUNTPOINT >> $TS_OUTPUT 2>&1