xfs/{019, 031}: make sure we don't set rtinherit=1 on mkfs
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 15 Sep 2020 01:43:27 +0000 (18:43 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 20 Sep 2020 16:46:26 +0000 (00:46 +0800)
mkfs.xfs does not support setting rtinherit on the root directory /and/
pre-populating the filesystem with protofiles, so don't run this test if
rtinherit is in the mkfs options.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/xfs/019
tests/xfs/031

index f42b62bb20c0a48b9cd499ac181ead59d50435a3..aa5365e7d07abb6904e6ea89ad15e8efb01caf38 100755 (executable)
@@ -51,6 +51,11 @@ _supported_os Linux
 
 _require_scratch
 
 
 _require_scratch
 
+# mkfs cannot create a filesystem with protofiles if realtime is enabled, so
+# don't run this test if the rtinherit is anywhere in the mkfs options.
+echo "$MKFS_OPTIONS" | grep -q "rtinherit" && \
+       _notrun "Cannot mkfs with a protofile and -d rtinherit."
+
 protofile=$tmp.proto
 tempfile=$tmp.file
 
 protofile=$tmp.proto
 tempfile=$tmp.file
 
index 6403fd400c8055b159786447151eb060c1610061..671b6727d4520711011e0ff9665e0cb89511db53 100755 (executable)
@@ -81,6 +81,11 @@ _supported_os Linux
 _require_scratch
 _require_no_large_scratch_dev
 
 _require_scratch
 _require_no_large_scratch_dev
 
+# mkfs cannot create a filesystem with protofiles if realtime is enabled, so
+# don't run this test if the rtinherit is anywhere in the mkfs options.
+echo "$MKFS_OPTIONS" | grep -q "rtinherit" && \
+       _notrun "Cannot mkfs with a protofile and -d rtinherit."
+
 # sanity test - default + one root directory entry
 # Note: must do this proto/mkfs now for later inode size calcs
 _create_proto 0
 # sanity test - default + one root directory entry
 # Note: must do this proto/mkfs now for later inode size calcs
 _create_proto 0