public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs/449: test xfs_info on a mounted block device
@ 2019-07-06 14:52 Zorro Lang
  2019-07-06 15:35 ` Darrick J. Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Zorro Lang @ 2019-07-06 14:52 UTC (permalink / raw)
  To: fstests

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>
---
 tests/xfs/449 | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/tests/xfs/449 b/tests/xfs/449
index 6a031685..7aae1545 100755
--- a/tests/xfs/449
+++ b/tests/xfs/449
@@ -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
-- 
2.17.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfs/449: test xfs_info on a mounted block device
  2019-07-06 14:52 [PATCH] xfs/449: test xfs_info on a mounted block device Zorro Lang
@ 2019-07-06 15:35 ` Darrick J. Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2019-07-06 15:35 UTC (permalink / raw)
  To: Zorro Lang; +Cc: fstests

On Sat, Jul 06, 2019 at 10:52:17PM +0800, Zorro Lang wrote:
> 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>

Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
>  tests/xfs/449 | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/xfs/449 b/tests/xfs/449
> index 6a031685..7aae1545 100755
> --- a/tests/xfs/449
> +++ b/tests/xfs/449
> @@ -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
> -- 
> 2.17.2
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-06 15:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-06 14:52 [PATCH] xfs/449: test xfs_info on a mounted block device Zorro Lang
2019-07-06 15:35 ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox