diff mbox series

[v2,xfstests-dev] tests/btrfs/012: check size after mounted

Message ID 20211025032256.61557-1-yifeix.zhu@intel.com (mailing list archive)
State New, archived
Headers show
Series [v2,xfstests-dev] tests/btrfs/012: check size after mounted | expand

Commit Message

Zhu Yifei Oct. 25, 2021, 3:22 a.m. UTC
move '_require_fs_space'  after mounted.

==before patch==
btrfs/012       [not run] This test requires at least 0GB free on /fs/scratch to run

==after patch==
btrfs/012 189s ...  194s
Ran: btrfs/012
Passed all 1 tests

Signed-off-by: Zhu Yifei <yifeix.zhu@intel.com>
---
 tests/btrfs/012 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Filipe Manana Oct. 25, 2021, 10:34 a.m. UTC | #1
On Mon, Oct 25, 2021 at 4:26 AM Zhu Yifei <yifeix.zhu@intel.com> wrote:
>
> move '_require_fs_space'  after mounted.
>
> ==before patch==
> btrfs/012       [not run] This test requires at least 0GB free on /fs/scratch to run
>
> ==after patch==
> btrfs/012 189s ...  194s
> Ran: btrfs/012
> Passed all 1 tests
>
> Signed-off-by: Zhu Yifei <yifeix.zhu@intel.com>

Looks good,

Reviewed-by: Filipe Manana <fdmanana@suse.com>

In the future, for any changes related to btrfs tests, can you also
please cc linux-btrfs@vger.kernel.org?

Thanks.

> ---
>  tests/btrfs/012 | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/btrfs/012 b/tests/btrfs/012
> index 3040a655..29552b14 100755
> --- a/tests/btrfs/012
> +++ b/tests/btrfs/012
> @@ -31,8 +31,6 @@ _require_command "$E2FSCK_PROG" e2fsck
>  # ext4 does not support zoned block device
>  _require_non_zoned_device "${SCRATCH_DEV}"
>
> -_require_fs_space $SCRATCH_MNT $(du -s /lib/modules/`uname -r` | ${AWK_PROG} '{print $1}')
> -
>  BLOCK_SIZE=`_get_block_size $TEST_DIR`
>
>  # Create & populate an ext4 filesystem
> @@ -41,6 +39,8 @@ $MKFS_EXT4_PROG -F -b $BLOCK_SIZE $SCRATCH_DEV > $seqres.full 2>&1 || \
>  # Manual mount so we don't use -t btrfs or selinux context
>  mount -t ext4 $SCRATCH_DEV $SCRATCH_MNT
>
> +_require_fs_space $SCRATCH_MNT $(du -s /lib/modules/`uname -r` | ${AWK_PROG} '{print $1}')
> +
>  cp -aR /lib/modules/`uname -r`/ $SCRATCH_MNT
>  _scratch_unmount
>
> --
> 2.20.1
>
Zhu Yifei Oct. 26, 2021, 1:22 a.m. UTC | #2
> -----Original Message-----
> From: Filipe Manana <fdmanana@gmail.com>
> Sent: Monday, October 25, 2021 6:35 PM
> To: Zhu, YifeiX <yifeix.zhu@intel.com>
> Cc: Eryu <guan@eryu.me>; fstests <fstests@vger.kernel.org>; Li, Philip
> <philip.li@intel.com>
> Subject: Re: [PATCH v2 xfstests-dev] tests/btrfs/012: check size after
> mounted
> 
> On Mon, Oct 25, 2021 at 4:26 AM Zhu Yifei <yifeix.zhu@intel.com> wrote:
> >
> > move '_require_fs_space'  after mounted.
> >
> > ==before patch==
> > btrfs/012       [not run] This test requires at least 0GB free on /fs/scratch to
> run
> >
> > ==after patch==
> > btrfs/012 189s ...  194s
> > Ran: btrfs/012
> > Passed all 1 tests
> >
> > Signed-off-by: Zhu Yifei <yifeix.zhu@intel.com>
> 
> Looks good,
> 
> Reviewed-by: Filipe Manana <fdmanana@suse.com>
> 
> In the future, for any changes related to btrfs tests, can you also please cc
> linux-btrfs@vger.kernel.org?
> 
Ok, got it, let me resend and cc linux-btrfs.

> Thanks.
> 
> > ---
> >  tests/btrfs/012 | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/tests/btrfs/012 b/tests/btrfs/012 index
> > 3040a655..29552b14 100755
> > --- a/tests/btrfs/012
> > +++ b/tests/btrfs/012
> > @@ -31,8 +31,6 @@ _require_command "$E2FSCK_PROG" e2fsck  # ext4
> does
> > not support zoned block device  _require_non_zoned_device
> > "${SCRATCH_DEV}"
> >
> > -_require_fs_space $SCRATCH_MNT $(du -s /lib/modules/`uname -r` |
> > ${AWK_PROG} '{print $1}')
> > -
> >  BLOCK_SIZE=`_get_block_size $TEST_DIR`
> >
> >  # Create & populate an ext4 filesystem @@ -41,6 +39,8 @@
> > $MKFS_EXT4_PROG -F -b $BLOCK_SIZE $SCRATCH_DEV > $seqres.full 2>&1
> ||
> > \  # Manual mount so we don't use -t btrfs or selinux context  mount
> > -t ext4 $SCRATCH_DEV $SCRATCH_MNT
> >
> > +_require_fs_space $SCRATCH_MNT $(du -s /lib/modules/`uname -r` |
> > +${AWK_PROG} '{print $1}')
> > +
> >  cp -aR /lib/modules/`uname -r`/ $SCRATCH_MNT  _scratch_unmount
> >
> > --
> > 2.20.1
> >
> 
> 
> --
> Filipe David Manana,
> 
> “Whether you think you can, or you think you can't — you're right.”
diff mbox series

Patch

diff --git a/tests/btrfs/012 b/tests/btrfs/012
index 3040a655..29552b14 100755
--- a/tests/btrfs/012
+++ b/tests/btrfs/012
@@ -31,8 +31,6 @@  _require_command "$E2FSCK_PROG" e2fsck
 # ext4 does not support zoned block device
 _require_non_zoned_device "${SCRATCH_DEV}"
 
-_require_fs_space $SCRATCH_MNT $(du -s /lib/modules/`uname -r` | ${AWK_PROG} '{print $1}')
-
 BLOCK_SIZE=`_get_block_size $TEST_DIR`
 
 # Create & populate an ext4 filesystem
@@ -41,6 +39,8 @@  $MKFS_EXT4_PROG -F -b $BLOCK_SIZE $SCRATCH_DEV > $seqres.full 2>&1 || \
 # Manual mount so we don't use -t btrfs or selinux context
 mount -t ext4 $SCRATCH_DEV $SCRATCH_MNT
 
+_require_fs_space $SCRATCH_MNT $(du -s /lib/modules/`uname -r` | ${AWK_PROG} '{print $1}')
+
 cp -aR /lib/modules/`uname -r`/ $SCRATCH_MNT
 _scratch_unmount