From 64954c0ead685841eda7773639ea9bed008b3e80 Mon Sep 17 00:00:00 2001 From: Yang Xu Date: Thu, 26 Dec 2019 14:48:36 +0800 Subject: [PATCH] generic/590: skip test if kernel doesn't support realtime IMHO, if kernel doesn't supprt realtime, we should skip test. So add it. Also, when we use _scratch_mkfs on xfs, we will get the following error: mkfs failed with extra mkfs options added to "-bsize=4096" by test 590 ** This failure occurs because we have used "export XFS_MKFS_OPTIONS= ${XFS_MKFS_OPTIONS:=-bsize=4096}" in common/config, we don't need to set it again in extra_options, so remove it. Signed-off-by: Yang Xu Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- tests/generic/590 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/generic/590 b/tests/generic/590 index 2670fe99..45f443c3 100755 --- a/tests/generic/590 +++ b/tests/generic/590 @@ -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)) -- 2.39.5