All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 2/3] btrfs/053: fix test failure when running with btrfs-progs v6.0+
       [not found] <cover.1668011940.git.fdmanana@suse.com>
@ 2022-11-09 16:44 ` fdmanana
  2022-11-09 17:06   ` Zorro Lang
  2022-11-14 11:08   ` Qu Wenruo
  0 siblings, 2 replies; 3+ messages in thread
From: fdmanana @ 2022-11-09 16:44 UTC (permalink / raw)
  To: fstests; +Cc: linux-btrfs, Filipe Manana

From: Filipe Manana <fdmanana@suse.com>

In btrfs-progs v6.0 the --leafsize (-l) command line option was removed
from mkfs.btrfs, so btrfs/053 can fail with v6.0+ in case the scratch
device does not have a btrfs filesystem created before running the test,
in which case mounting the scratch device fails.

The change was introduced by the following btrfs-progs commit:

  f7a768d62498 ("btrfs-progs: mkfs: remove support for option --leafsize")

Change the test to use --nodesize (-n) instead, since it exists in both
old and new btrfs-progs versions. Also redirect mkfs output to the test's
log file and fail explicitly if mkfs failed.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 tests/btrfs/053 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/btrfs/053 b/tests/btrfs/053
index fbd2e7d9..67239f10 100755
--- a/tests/btrfs/053
+++ b/tests/btrfs/053
@@ -44,7 +44,7 @@ send_files_dir=$TEST_DIR/btrfs-test-$seq
 rm -fr $send_files_dir
 mkdir $send_files_dir
 
-_scratch_mkfs "-l $leaf_size" >/dev/null 2>&1
+_scratch_mkfs "--nodesize $leaf_size" >> $seqres.full 2>&1 || _fail "mkfs failed"
 _scratch_mount
 
 echo "hello world" > $SCRATCH_MNT/foobar
@@ -72,7 +72,7 @@ _run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
 _scratch_unmount
 _check_scratch_fs
 
-_scratch_mkfs "-l $leaf_size" >/dev/null 2>&1
+_scratch_mkfs "--nodesize $leaf_size" >> $seqres.full 2>&1 || _fail "mkfs failed"
 _scratch_mount
 
 _run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
-- 
2.35.1


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

* Re: [PATCH v2 2/3] btrfs/053: fix test failure when running with btrfs-progs v6.0+
  2022-11-09 16:44 ` [PATCH v2 2/3] btrfs/053: fix test failure when running with btrfs-progs v6.0+ fdmanana
@ 2022-11-09 17:06   ` Zorro Lang
  2022-11-14 11:08   ` Qu Wenruo
  1 sibling, 0 replies; 3+ messages in thread
From: Zorro Lang @ 2022-11-09 17:06 UTC (permalink / raw)
  To: fdmanana; +Cc: fstests, linux-btrfs, Filipe Manana

On Wed, Nov 09, 2022 at 04:44:57PM +0000, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> In btrfs-progs v6.0 the --leafsize (-l) command line option was removed
> from mkfs.btrfs, so btrfs/053 can fail with v6.0+ in case the scratch
> device does not have a btrfs filesystem created before running the test,
> in which case mounting the scratch device fails.
> 
> The change was introduced by the following btrfs-progs commit:
> 
>   f7a768d62498 ("btrfs-progs: mkfs: remove support for option --leafsize")
> 
> Change the test to use --nodesize (-n) instead, since it exists in both
> old and new btrfs-progs versions. Also redirect mkfs output to the test's
> log file and fail explicitly if mkfs failed.
> 
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
> ---

This version looks good to me, thanks for fixing this.

Reviewed-by: Zorro Lang <zlang@redhat.com>

>  tests/btrfs/053 | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/btrfs/053 b/tests/btrfs/053
> index fbd2e7d9..67239f10 100755
> --- a/tests/btrfs/053
> +++ b/tests/btrfs/053
> @@ -44,7 +44,7 @@ send_files_dir=$TEST_DIR/btrfs-test-$seq
>  rm -fr $send_files_dir
>  mkdir $send_files_dir
>  
> -_scratch_mkfs "-l $leaf_size" >/dev/null 2>&1
> +_scratch_mkfs "--nodesize $leaf_size" >> $seqres.full 2>&1 || _fail "mkfs failed"
>  _scratch_mount
>  
>  echo "hello world" > $SCRATCH_MNT/foobar
> @@ -72,7 +72,7 @@ _run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
>  _scratch_unmount
>  _check_scratch_fs
>  
> -_scratch_mkfs "-l $leaf_size" >/dev/null 2>&1
> +_scratch_mkfs "--nodesize $leaf_size" >> $seqres.full 2>&1 || _fail "mkfs failed"
>  _scratch_mount
>  
>  _run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT
> -- 
> 2.35.1
> 


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

* Re: [PATCH v2 2/3] btrfs/053: fix test failure when running with btrfs-progs v6.0+
  2022-11-09 16:44 ` [PATCH v2 2/3] btrfs/053: fix test failure when running with btrfs-progs v6.0+ fdmanana
  2022-11-09 17:06   ` Zorro Lang
@ 2022-11-14 11:08   ` Qu Wenruo
  1 sibling, 0 replies; 3+ messages in thread
From: Qu Wenruo @ 2022-11-14 11:08 UTC (permalink / raw)
  To: fdmanana, fstests; +Cc: linux-btrfs, Filipe Manana



On 2022/11/10 00:44, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> In btrfs-progs v6.0 the --leafsize (-l) command line option was removed
> from mkfs.btrfs, so btrfs/053 can fail with v6.0+ in case the scratch
> device does not have a btrfs filesystem created before running the test,
> in which case mounting the scratch device fails.
> 
> The change was introduced by the following btrfs-progs commit:
> 
>    f7a768d62498 ("btrfs-progs: mkfs: remove support for option --leafsize")
> 
> Change the test to use --nodesize (-n) instead, since it exists in both
> old and new btrfs-progs versions. Also redirect mkfs output to the test's
> log file and fail explicitly if mkfs failed.
> 
> Signed-off-by: Filipe Manana <fdmanana@suse.com>

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu
> ---
>   tests/btrfs/053 | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/btrfs/053 b/tests/btrfs/053
> index fbd2e7d9..67239f10 100755
> --- a/tests/btrfs/053
> +++ b/tests/btrfs/053
> @@ -44,7 +44,7 @@ send_files_dir=$TEST_DIR/btrfs-test-$seq
>   rm -fr $send_files_dir
>   mkdir $send_files_dir
>   
> -_scratch_mkfs "-l $leaf_size" >/dev/null 2>&1
> +_scratch_mkfs "--nodesize $leaf_size" >> $seqres.full 2>&1 || _fail "mkfs failed"
>   _scratch_mount
>   
>   echo "hello world" > $SCRATCH_MNT/foobar
> @@ -72,7 +72,7 @@ _run_btrfs_util_prog send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
>   _scratch_unmount
>   _check_scratch_fs
>   
> -_scratch_mkfs "-l $leaf_size" >/dev/null 2>&1
> +_scratch_mkfs "--nodesize $leaf_size" >> $seqres.full 2>&1 || _fail "mkfs failed"
>   _scratch_mount
>   
>   _run_btrfs_util_prog receive -f $send_files_dir/1.snap $SCRATCH_MNT

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

end of thread, other threads:[~2022-11-14 11:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1668011940.git.fdmanana@suse.com>
2022-11-09 16:44 ` [PATCH v2 2/3] btrfs/053: fix test failure when running with btrfs-progs v6.0+ fdmanana
2022-11-09 17:06   ` Zorro Lang
2022-11-14 11:08   ` Qu Wenruo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.