xfs/449: test xfs_info on a mounted block device
authorZorro Lang <zlang@redhat.com>
Sat, 6 Jul 2019 14:52:17 +0000 (22:52 +0800)
committerEryu Guan <guaneryu@gmail.com>
Fri, 12 Jul 2019 05:25:24 +0000 (13:25 +0800)
There was a bug, xfs_info fails on a mounted block device:

  # xfs_info /dev/mapper/testdev
  xfs_info: /dev/mapper/testdev contains a mounted filesystem

  fatal error -- couldn't initialize XFS library

  xfsprogs has fixed it by:

    bbb43745 xfs_info: use findmnt to handle mounted block devices

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

index 6a03168503b91942c835ecef3be6db20fd7c4d61..7aae1545b380e798bd1e5a5e353f593de20f8ecc 100755 (executable)
@@ -60,10 +60,15 @@ echo GROWFS >> $seqres.full
 cat $tmp.growfs >> $seqres.full
 diff -u $tmp.mkfs $tmp.growfs
 
-$XFS_INFO_PROG $SCRATCH_MNT > $tmp.info
-echo INFO >> $seqres.full
-cat $tmp.info >> $seqres.full
-diff -u $tmp.mkfs $tmp.info
+$XFS_INFO_PROG $SCRATCH_MNT > $tmp.info.mnt
+echo INFO_MNT >> $seqres.full
+cat $tmp.info.mnt >> $seqres.full
+diff -u $tmp.mkfs $tmp.info.mnt
+
+$XFS_INFO_PROG $SCRATCH_DEV > $tmp.info.dev
+echo INFO_DEV >> $seqres.full
+cat $tmp.info.dev >> $seqres.full
+diff -u $tmp.mkfs $tmp.info.dev
 
 echo "Silence is golden."
 status=0