All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] generic/590: skip test if kernel doesn't support realtime
@ 2019-12-26  6:48 Yang Xu
  0 siblings, 0 replies; only message in thread
From: Yang Xu @ 2019-12-26  6:48 UTC (permalink / raw)
  To: fstests; +Cc: Yang Xu

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 <xuyang2018.jy@cn.fujitsu.com>
---
 tests/generic/590 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/generic/590 b/tests/generic/590
index 2670fe99..d2673748 100755
--- a/tests/generic/590
+++ b/tests/generic/590
@@ -55,7 +55,6 @@ 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
@@ -64,7 +63,8 @@ if [[ $FSTYP = xfs ]]; then
 	fi
 fi
 _scratch_mkfs $extra_options >>$seqres.full 2>&1
-_scratch_mount
+try_scratch_mount >>$seqres.full 2>&1 || \
+	_notrun "mount failed or kernel doesn't support realtime"
 _require_fs_space "$SCRATCH_MNT" $((filesz / 1024))
 
 # Allocate maxextlen + 1 blocks. As long as the allocator does something sane,
-- 
2.18.0




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-26  6:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-26  6:48 [PATCH] generic/590: skip test if kernel doesn't support realtime Yang Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.