generic/590: skip test if kernel doesn't support realtime
[xfstests-dev.git] / tests / generic / 590
index 2670fe99d21f9b8ef225e99d6768e2c02ae3dc37..45f443c3ff3fb7b0c1abe5eaacf7ec5a8e290727 100755 (executable)
@@ -55,15 +55,19 @@ if [[ $FSTYP = xfs ]]; then
                USE_EXTERNAL=yes
                SCRATCH_RTDEV="$loop"
        fi
-       extra_options="$extra_options -bsize=$bs"
        extra_options="$extra_options -r extsize=$((bs * rextsize))"
        extra_options="$extra_options -d agsize=$(((maxextlen + 1) * bs / 2)),rtinherit=1"
        # disable reflink as reflink not supported with realtime devices
        if _scratch_mkfs_xfs_supported -m reflink=0 >/dev/null 2>&1; then
                extra_options="$extra_options -m reflink=0"
        fi
+       _scratch_mkfs $extra_options >>$seqres.full 2>&1
+       _try_scratch_mount >>$seqres.full 2>&1 || \
+               _notrun "mount failed, kernel doesn't support realtime?"
+       _scratch_unmount
+else
+       _scratch_mkfs $extra_options >>$seqres.full 2>&1
 fi
-_scratch_mkfs $extra_options >>$seqres.full 2>&1
 _scratch_mount
 _require_fs_space "$SCRATCH_MNT" $((filesz / 1024))