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>
This commit is contained in:
Richard Wareing
2018-01-11 20:16:18 -08:00
committed by Eryu Guan
parent e3c3d46978
commit ee3e001035
5 changed files with 20 additions and 0 deletions
+10
View File
@@ -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