]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
xfs/449: update test to know about xfs_db -R
authorDarrick J. Wong <djwong@kernel.org>
Tue, 6 Feb 2024 00:06:42 +0000 (16:06 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 1 Nov 2024 20:41:58 +0000 (13:41 -0700)
The realtime groups feature added a -R flag to xfs_db so that users can
pass in the realtime device.  Since we've now modified the
_scratch_xfs_db to use this facility, we can update the test to do exact
comparisons of the xfs_db info command against the mkfs output.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
tests/xfs/449

index 3d528e03a483fb3aed59d389e02534b9610f1260..a739df50e319c5708040712888ddca0408031711 100755 (executable)
@@ -30,7 +30,11 @@ echo DB >> $seqres.full
 cat $tmp.dbinfo >> $seqres.full
 # xfs_db doesn't take a rtdev argument, so it reports "realtime=external".
 # mkfs does, so make a quick substitution
-diff -u <(cat $tmp.mkfs | sed -e 's/realtime =\/.*extsz=/realtime =external               extsz=/g') $tmp.dbinfo
+if $XFS_DB_PROG --help 2>&1 | grep -q -- '-R rtdev'; then
+       diff -u $tmp.mkfs $tmp.dbinfo
+else
+       diff -u <(cat $tmp.mkfs | sed -e 's/realtime =\/.*extsz=/realtime =external               extsz=/g') $tmp.dbinfo
+fi
 
 _scratch_mount