To better exercise the data path code of realtime subvolumes, we
will set rtinherit=1 during mkfs calls. For tests which this is not
desired we introduce a _require_no_rtinherit function to opt out of
this behavior.
Signed-off-by: Richard Wareing <rwareing@fb.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
VALID_TEST_ID="[0-9]\{3\}"
VALID_TEST_NAME="$VALID_TEST_ID-\?[[:alnum:]-]*"
+# Some tests are not relevant or functional when testing XFS realtime
+# subvolumes along with the rtinherit=1 mkfs option. In these cases,
+# this test will opt-out of the test.
+_require_no_rtinherit()
+{
+ [ "$FSTYP" = "xfs" ] && echo "$MKFS_OPTIONS" |
+ egrep -q "rtinherit([^=]|=1|$)" && \
+ _notrun "rtinherit mkfs option is not supported by this test."
+}
+
_require_math()
{
if [ -z "$BC" ]; then
_require_dm_target error
_require_xfs_io_command "falloc"
_require_odirect
+# This test uses "dm" without taking into account the data could be on
+# realtime subvolume, thus the test will fail with rtinherit=1
+_require_no_rtinherit
rm -f $seqres.full
_require_scratch
_require_dm_target error
_require_xfs_io_command "falloc"
+# This test uses "dm" without taking into account the data could be on
+# realtime subvolume, thus the test will fail with rtinherit=1
+_require_no_rtinherit
_require_aiodio "aiocp"
AIO_TEST="src/aio-dio-regress/aiocp"
# real QA test starts here
_supported_os Linux
_require_scratch
+# This test uses "dm" without taking into account the data could be on
+# realtime subvolume, thus the test will fail with rtinherit=1
+_require_no_rtinherit
# Generally, we want to avoid journal errors on the extended testcase. Only
# unset the -s flag if we have a logdev
_supported_os Linux
_require_scratch
+_require_no_rtinherit
_check_filestreams_support || _notrun "filestreams not available"