xfs/449: fix xfs info report output if realtime device specified
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 15 Sep 2020 01:45:02 +0000 (18:45 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 20 Sep 2020 17:06:48 +0000 (01:06 +0800)
Modify the mkfs.xfs output so that "realtime =/dev/XXX" becomes
"realtime =external" so that the output will match xfs_db, which doesn't
take a rt device argument and thus does not know.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/xfs/449

index 83c3c49313b7677d3840cf43eac9b5791486d54a..938dbe28ca18228e12ec7c5137eba6885795ccf0 100755 (executable)
@@ -46,7 +46,9 @@ cat $tmp.mkfs >> $seqres.full
 _scratch_xfs_db -c "info" > $tmp.dbinfo
 echo DB >> $seqres.full
 cat $tmp.dbinfo >> $seqres.full
-diff -u $tmp.mkfs $tmp.dbinfo
+# 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
 
 _scratch_mount