diff options
author | Richard Wareing <rwareing@fb.com> | 2018-01-11 20:16:18 -0800 |
---|---|---|
committer | Eryu Guan <eguan@redhat.com> | 2018-01-19 12:47:03 +0800 |
commit | ee3e00103527fbd0d2eeedd2a8e40f8d36d10c4a (patch) | |
tree | 6594e54e701556700878c44ef093604661f563cc | |
parent | e3c3d46978025aa9581beb4ae9955fef5483d862 (diff) | |
download | xfstests-ee3e00103527fbd0d2eeedd2a8e40f8d36d10c4a.tar.gz |
xfs/realtime: add _require_no_rtinherit function
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>
-rw-r--r-- | common/rc | 10 | ||||
-rwxr-xr-x | tests/generic/250 | 3 | ||||
-rwxr-xr-x | tests/generic/252 | 3 | ||||
-rwxr-xr-x | tests/generic/441 | 3 | ||||
-rwxr-xr-x | tests/xfs/170 | 1 |
5 files changed, 20 insertions, 0 deletions
@@ -33,6 +33,16 @@ BC=$(which bc 2> /dev/null) || BC= 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 diff --git a/tests/generic/250 b/tests/generic/250 index 3c4fe6dbf2..a8fd97e31f 100755 --- a/tests/generic/250 +++ b/tests/generic/250 @@ -48,6 +48,9 @@ _require_scratch _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 diff --git a/tests/generic/252 b/tests/generic/252 index ffedd569ec..b506d599f6 100755 --- a/tests/generic/252 +++ b/tests/generic/252 @@ -47,6 +47,9 @@ _supported_os Linux _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" diff --git a/tests/generic/441 b/tests/generic/441 index 075d87723c..5fbfececad 100755 --- a/tests/generic/441 +++ b/tests/generic/441 @@ -47,6 +47,9 @@ _cleanup() # 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 diff --git a/tests/xfs/170 b/tests/xfs/170 index c5ae8e4521..6deef1b297 100755 --- a/tests/xfs/170 +++ b/tests/xfs/170 @@ -50,6 +50,7 @@ _supported_fs xfs _supported_os Linux _require_scratch +_require_no_rtinherit _check_filestreams_support || _notrun "filestreams not available" |