[PATCH 3/3] xfs/530: Bail out if either of reflink or rmapbt is enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



_scratch_do_mkfs constructs a mkfs command line by concatenating the values of
1. $mkfs_cmd
2. $MKFS_OPTIONS
3. $extra_mkfs_options

The corresponding mkfs command line fails if $MKFS_OPTIONS enables either
reflink or rmapbt feature. The failure occurs because the test tries to create
a filesystem with realtime device enabled. In such a case, _scratch_do_mkfs()
will construct and invoke an mkfs command line without including the value of
$MKFS_OPTIONS.

To prevent such silent failures, this commit causes the test to exit if it
detects either reflink or rmapbt feature being enabled.

Signed-off-by: Chandan Babu R <chandanrlinux@xxxxxxxxx>
---
 tests/xfs/530 | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/xfs/530 b/tests/xfs/530
index 16dc426c..669b061d 100755
--- a/tests/xfs/530
+++ b/tests/xfs/530
@@ -39,6 +39,12 @@ _require_scratch_nocheck
 echo "* Test extending rt inodes"
 
 _scratch_mkfs | _filter_mkfs >> $seqres.full 2> $tmp.mkfs
+
+_xfs_is_reflink_enabled $SCRATCH_DEV && \
+	_notrun "Realtime device cannot be used when reflink feature is enabled"
+_xfs_is_rmapbt_enabled $SCRATCH_DEV && \
+	_notrun "Realtime device cannot be used when rmapbt feature is enabled"
+
 . $tmp.mkfs
 
 echo "Create fake rt volume"
-- 
2.30.2




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux