]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
skip btrfs tests if kernel support for btrfs is missing
authorAnatoly Pugachev <matorola@gmail.com>
Wed, 9 Nov 2022 09:00:12 +0000 (12:00 +0300)
committerAnatoly Pugachev <matorola@gmail.com>
Wed, 9 Nov 2022 09:04:23 +0000 (12:04 +0300)
tests/ts/mount/fstab-btrfs

index dff707047152d7c72db97b9f187c716d397ff3fe..7233941ef98e05c3ccd581cc8665c29cedfe4507 100755 (executable)
@@ -51,6 +51,8 @@ DEVICE=$TS_LODEV
 [ -d "$TS_MOUNTPOINT_BIND" ] || mkdir -p "$TS_MOUNTPOINT_BIND"
 mkfs.btrfs -d single -m single $DEVICE &> /dev/null || ts_die "Cannot make btrfs on $DEVICE"
 
+btrfs device ready $DEVICE 2>/dev/null || ts_skip "btrfs kernel support is missing"
+
 $TS_CMD_MOUNT -o loop "$DEVICE" "$TS_MOUNTPOINT_CREATE" &> /dev/null
 pushd . >/dev/null
 cd "$TS_MOUNTPOINT_CREATE"