* [PATCH] btrfs/011: use $_btrfs_profile_configs to limit the tests
@ 2023-01-10 17:22 An Long
2023-01-11 12:18 ` David Disseldorp
0 siblings, 1 reply; 14+ messages in thread
From: An Long @ 2023-01-10 17:22 UTC (permalink / raw)
To: fstests; +Cc: An Long
Generally the tester need BTRFS_PROFILE_CONFIGS to test certain
profiles. For example, skip raid56 as it's not supported.
Signed-off-by: An Long <lan@suse.com>
---
tests/btrfs/011 | 48 ++++++++++++++++++++++++++++++++++++++----------
1 file changed, 38 insertions(+), 10 deletions(-)
diff --git a/tests/btrfs/011 b/tests/btrfs/011
index 6c3d037f..b9d175d1 100755
--- a/tests/btrfs/011
+++ b/tests/btrfs/011
@@ -22,6 +22,8 @@
. ./common/preamble
_begin_fstest auto replace volume
+_btrfs_get_profile_configs
+
noise_pid=0
# Override the default cleanup function.
@@ -237,18 +239,44 @@ btrfs_replace_test()
fi
}
-workout "-m single -d single" 1 no 64
+if [[ "${_btrfs_profile_configs[@]}" =~ "-m single -d single" ]]; then
+ workout "-m single -d single" 1 no 64
+fi
+
# Mixed BG & RAID/DUP profiles are not supported on zoned btrfs
if ! _scratch_btrfs_is_zoned; then
- workout "-m dup -d single" 1 no 64
- workout "-m dup -d single" 1 cancel 1024
- workout "-m raid0 -d raid0" 2 no 64
- workout "-m raid1 -d raid1" 2 no 2048
- workout "-m raid10 -d raid10" 4 no 64
- workout "-m single -d single -M" 1 no 64
- workout "-m dup -d dup -M" 1 no 64
- workout "-m raid5 -d raid5" 2 no 64
- workout "-m raid6 -d raid6" 3 no 64
+ if [[ "${_btrfs_profile_configs[@]}" =~ "-m dup -d single" ]]; then
+ workout "-m dup -d single" 1 no 64
+ workout "-m dup -d single" 1 cancel 1024
+ fi
+
+ if [[ "${_btrfs_profile_configs[@]}" =~ "-m raid0 -d raid0" ]]; then
+ workout "-m raid0 -d raid0" 2 no 64
+ fi
+
+ if [[ "${_btrfs_profile_configs[@]}" =~ "-m raid1 -d raid1" ]]; then
+ workout "-m raid1 -d raid1" 2 no 2048
+ fi
+
+ if [[ "${_btrfs_profile_configs[@]}" =~ "-m raid10 -d raid10" ]]; then
+ workout "-m raid10 -d raid10" 4 no 64
+ fi
+
+ if [[ "${_btrfs_profile_configs[@]}" =~ "-m single -d single" ]]; then
+ workout "-m single -d single -M" 1 no 64
+ fi
+
+ if [[ "${_btrfs_profile_configs[@]}" =~ "-m dup -d dup" ]]; then
+ workout "-m dup -d dup -M" 1 no 64
+ fi
+
+ if [[ "${_btrfs_profile_configs[@]}" =~ "-m raid5 -d raid5" ]]; then
+ workout "-m raid5 -d raid5" 2 no 64
+ fi
+
+ if [[ "${_btrfs_profile_configs[@]}" =~ "-m raid6 -d raid6" ]]; then
+ workout "-m raid6 -d raid6" 3 no 64
+ fi
fi
echo "*** done"
--
2.35.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] btrfs/011: use $_btrfs_profile_configs to limit the tests
2023-01-10 17:22 [PATCH] btrfs/011: use $_btrfs_profile_configs to limit the tests An Long
@ 2023-01-11 12:18 ` David Disseldorp
2023-01-13 16:35 ` [PATCH v2] " An Long
` (4 more replies)
0 siblings, 5 replies; 14+ messages in thread
From: David Disseldorp @ 2023-01-11 12:18 UTC (permalink / raw)
To: An Long; +Cc: fstests
Hi,
On Wed, 11 Jan 2023 01:22:21 +0800, An Long wrote:
> Generally the tester need BTRFS_PROFILE_CONFIGS to test certain
> profiles. For example, skip raid56 as it's not supported.
>
> Signed-off-by: An Long <lan@suse.com>
> ---
> tests/btrfs/011 | 48 ++++++++++++++++++++++++++++++++++++++----------
> 1 file changed, 38 insertions(+), 10 deletions(-)
>
> diff --git a/tests/btrfs/011 b/tests/btrfs/011
> index 6c3d037f..b9d175d1 100755
> --- a/tests/btrfs/011
> +++ b/tests/btrfs/011
> @@ -22,6 +22,8 @@
> . ./common/preamble
> _begin_fstest auto replace volume
>
> +_btrfs_get_profile_configs
...
> + if [[ "${_btrfs_profile_configs[@]}" =~ "-m raid1 -d raid1" ]]; then
> + workout "-m raid1 -d raid1" 2 no 2048
> + fi
These regexes aren't anchored, so above could match "-m raid1 -d raid10"
- not a problem given current profiles, but still not ideal.
My preference would be to use a loop for filtering workout parameters
against _btrfs_profile_configs, e.g.
for i in "-m single -d single:1 no 64" \
"-m dup -d single:1 no 64" \
"-m dup -d single:1 cancel 1024" \
...; do
# confirm "${i%:*}" is in _btrfs_profile_configs...
workout "${i%:*}" ${i#*:}
done
Cheers, David
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2] btrfs/011: use $_btrfs_profile_configs to limit the tests
2023-01-11 12:18 ` David Disseldorp
@ 2023-01-13 16:35 ` An Long
2023-01-13 18:40 ` Zorro Lang
2023-01-14 3:12 ` [PATCH v3] " An Long
` (3 subsequent siblings)
4 siblings, 1 reply; 14+ messages in thread
From: An Long @ 2023-01-13 16:35 UTC (permalink / raw)
To: fstests; +Cc: An Long
Generally the tester need BTRFS_PROFILE_CONFIGS to test certain
profiles. For example, skip raid56 as it's not supported.
Signed-off-by: An Long <lan@suse.com>
---
tests/btrfs/011 | 31 +++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/tests/btrfs/011 b/tests/btrfs/011
index 6c3d037f..6dfa1fd6 100755
--- a/tests/btrfs/011
+++ b/tests/btrfs/011
@@ -22,6 +22,8 @@
. ./common/preamble
_begin_fstest auto replace volume
+_btrfs_get_profile_configs
+
noise_pid=0
# Override the default cleanup function.
@@ -237,18 +239,27 @@ btrfs_replace_test()
fi
}
-workout "-m single -d single" 1 no 64
+if [[ "${_btrfs_profile_configs[@]}" =~ "-m single -d single"( |$) ]]; then
+ workout "-m single -d single" 1 no 64
+fi
+
# Mixed BG & RAID/DUP profiles are not supported on zoned btrfs
if ! _scratch_btrfs_is_zoned; then
- workout "-m dup -d single" 1 no 64
- workout "-m dup -d single" 1 cancel 1024
- workout "-m raid0 -d raid0" 2 no 64
- workout "-m raid1 -d raid1" 2 no 2048
- workout "-m raid10 -d raid10" 4 no 64
- workout "-m single -d single -M" 1 no 64
- workout "-m dup -d dup -M" 1 no 64
- workout "-m raid5 -d raid5" 2 no 64
- workout "-m raid6 -d raid6" 3 no 64
+ for t in "-m dup -d single:1 no 64" \
+ "-m dup -d single:1 cancel 1024" \
+ "-m raid0 -d raid0:2 no 64" \
+ "-m raid1 -d raid1:2 no 2048" \
+ "-m raid10 -d raid10:4 no 64" \
+ "-m single -d single -M:1 no 64" \
+ "-m dup -d dup -M:1 no 64" \
+ "-m raid5 -d raid5:2 no 64" \
+ "-m raid6 -d raid6:3 no 64"; do
+ mkfs_option=${t%:*}
+ workout_option=${t#*:}
+ if [[ "${_btrfs_profile_configs[@]}" =~ "${mkfs_option/ -M}"( |$) ]]; then
+ workout "$mkfs_option" $workout_option
+ fi
+ done
fi
echo "*** done"
--
2.35.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v2] btrfs/011: use $_btrfs_profile_configs to limit the tests
2023-01-13 16:35 ` [PATCH v2] " An Long
@ 2023-01-13 18:40 ` Zorro Lang
0 siblings, 0 replies; 14+ messages in thread
From: Zorro Lang @ 2023-01-13 18:40 UTC (permalink / raw)
To: An Long; +Cc: fstests
On Sat, Jan 14, 2023 at 12:35:47AM +0800, An Long wrote:
> Generally the tester need BTRFS_PROFILE_CONFIGS to test certain
> profiles. For example, skip raid56 as it's not supported.
>
> Signed-off-by: An Long <lan@suse.com>
> ---
> tests/btrfs/011 | 31 +++++++++++++++++++++----------
> 1 file changed, 21 insertions(+), 10 deletions(-)
>
> diff --git a/tests/btrfs/011 b/tests/btrfs/011
> index 6c3d037f..6dfa1fd6 100755
> --- a/tests/btrfs/011
> +++ b/tests/btrfs/011
> @@ -22,6 +22,8 @@
> . ./common/preamble
> _begin_fstest auto replace volume
>
> +_btrfs_get_profile_configs
> +
Do you need to call it such early? I think this helper should be called after
"_supported_fs btrfs" at least. Or maybe even after those _require_scratch_*
things?
> noise_pid=0
>
> # Override the default cleanup function.
> @@ -237,18 +239,27 @@ btrfs_replace_test()
> fi
> }
>
> -workout "-m single -d single" 1 no 64
> +if [[ "${_btrfs_profile_configs[@]}" =~ "-m single -d single"( |$) ]]; then
> + workout "-m single -d single" 1 no 64
> +fi
> +
> # Mixed BG & RAID/DUP profiles are not supported on zoned btrfs
> if ! _scratch_btrfs_is_zoned; then
> - workout "-m dup -d single" 1 no 64
> - workout "-m dup -d single" 1 cancel 1024
> - workout "-m raid0 -d raid0" 2 no 64
> - workout "-m raid1 -d raid1" 2 no 2048
> - workout "-m raid10 -d raid10" 4 no 64
> - workout "-m single -d single -M" 1 no 64
> - workout "-m dup -d dup -M" 1 no 64
> - workout "-m raid5 -d raid5" 2 no 64
> - workout "-m raid6 -d raid6" 3 no 64
> + for t in "-m dup -d single:1 no 64" \
> + "-m dup -d single:1 cancel 1024" \
> + "-m raid0 -d raid0:2 no 64" \
> + "-m raid1 -d raid1:2 no 2048" \
> + "-m raid10 -d raid10:4 no 64" \
> + "-m single -d single -M:1 no 64" \
> + "-m dup -d dup -M:1 no 64" \
> + "-m raid5 -d raid5:2 no 64" \
> + "-m raid6 -d raid6:3 no 64"; do
> + mkfs_option=${t%:*}
> + workout_option=${t#*:}
> + if [[ "${_btrfs_profile_configs[@]}" =~ "${mkfs_option/ -M}"( |$) ]]; then
> + workout "$mkfs_option" $workout_option
> + fi
> + done
> fi
>
> echo "*** done"
> --
> 2.35.3
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v3] btrfs/011: use $_btrfs_profile_configs to limit the tests
2023-01-11 12:18 ` David Disseldorp
2023-01-13 16:35 ` [PATCH v2] " An Long
@ 2023-01-14 3:12 ` An Long
2023-01-14 3:19 ` [PATCH v4] " An Long
` (2 subsequent siblings)
4 siblings, 0 replies; 14+ messages in thread
From: An Long @ 2023-01-14 3:12 UTC (permalink / raw)
To: fstests; +Cc: An Long
Generally the tester need BTRFS_PROFILE_CONFIGS to test certain
profiles. For example, skip raid56 as it's not supported.
Signed-off-by: An Long <lan@suse.com>
---
tests/btrfs/011 | 30 ++++++++++++++++++++----------
1 file changed, 20 insertions(+), 10 deletions(-)
diff --git a/tests/btrfs/011 b/tests/btrfs/011
index 6c3d037f..b351ca2c 100755
--- a/tests/btrfs/011
+++ b/tests/btrfs/011
@@ -47,6 +47,7 @@ _require_scratch_nocheck
_require_scratch_dev_pool 5
_require_scratch_dev_pool_equal_size
_require_scratch_size $((10 * 1024 * 1024)) #kB
+_btrfs_get_profile_configs
_require_command "$WIPEFS_PROG" wipefs
rm -f $tmp.*
@@ -237,18 +238,27 @@ btrfs_replace_test()
fi
}
-workout "-m single -d single" 1 no 64
+if [[ "${_btrfs_profile_configs[@]}" =~ "-m single -d single"( |$) ]]; then
+ workout "-m single -d single" 1 no 64
+fi
+
# Mixed BG & RAID/DUP profiles are not supported on zoned btrfs
if ! _scratch_btrfs_is_zoned; then
- workout "-m dup -d single" 1 no 64
- workout "-m dup -d single" 1 cancel 1024
- workout "-m raid0 -d raid0" 2 no 64
- workout "-m raid1 -d raid1" 2 no 2048
- workout "-m raid10 -d raid10" 4 no 64
- workout "-m single -d single -M" 1 no 64
- workout "-m dup -d dup -M" 1 no 64
- workout "-m raid5 -d raid5" 2 no 64
- workout "-m raid6 -d raid6" 3 no 64
+ for t in "-m dup -d single:1 no 64" \
+ "-m dup -d single:1 cancel 1024" \
+ "-m raid0 -d raid0:2 no 64" \
+ "-m raid1 -d raid1:2 no 2048" \
+ "-m raid10 -d raid10:4 no 64" \
+ "-m single -d single -M:1 no 64" \
+ "-m dup -d dup -M:1 no 64" \
+ "-m raid5 -d raid5:2 no 64" \
+ "-m raid6 -d raid6:3 no 64"; do
+ mkfs_option=${t%:*}
+ workout_option=${t#*:}
+ if [[ "${_btrfs_profile_configs[@]}" =~ "${mkfs_option/ -M}"( |$) ]]; then
+ workout "$mkfs_option" $workout_option
+ fi
+ done
fi
echo "*** done"
--
2.35.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v4] btrfs/011: use $_btrfs_profile_configs to limit the tests
2023-01-11 12:18 ` David Disseldorp
2023-01-13 16:35 ` [PATCH v2] " An Long
2023-01-14 3:12 ` [PATCH v3] " An Long
@ 2023-01-14 3:19 ` An Long
2023-01-20 11:49 ` David Disseldorp
2023-02-14 15:30 ` [PATCH v5] " An Long
2023-02-15 5:13 ` [PATCH v6] " An Long
4 siblings, 1 reply; 14+ messages in thread
From: An Long @ 2023-01-14 3:19 UTC (permalink / raw)
To: fstests; +Cc: An Long
Generally the tester need BTRFS_PROFILE_CONFIGS to test certain
profiles. For example, skip raid56 as it's not supported.
Signed-off-by: An Long <lan@suse.com>
---
tests/btrfs/011 | 30 ++++++++++++++++++++----------
1 file changed, 20 insertions(+), 10 deletions(-)
diff --git a/tests/btrfs/011 b/tests/btrfs/011
index 6c3d037f..ac45e735 100755
--- a/tests/btrfs/011
+++ b/tests/btrfs/011
@@ -48,6 +48,7 @@ _require_scratch_dev_pool 5
_require_scratch_dev_pool_equal_size
_require_scratch_size $((10 * 1024 * 1024)) #kB
_require_command "$WIPEFS_PROG" wipefs
+_btrfs_get_profile_configs
rm -f $tmp.*
@@ -237,18 +238,27 @@ btrfs_replace_test()
fi
}
-workout "-m single -d single" 1 no 64
+if [[ "${_btrfs_profile_configs[@]}" =~ "-m single -d single"( |$) ]]; then
+ workout "-m single -d single" 1 no 64
+fi
+
# Mixed BG & RAID/DUP profiles are not supported on zoned btrfs
if ! _scratch_btrfs_is_zoned; then
- workout "-m dup -d single" 1 no 64
- workout "-m dup -d single" 1 cancel 1024
- workout "-m raid0 -d raid0" 2 no 64
- workout "-m raid1 -d raid1" 2 no 2048
- workout "-m raid10 -d raid10" 4 no 64
- workout "-m single -d single -M" 1 no 64
- workout "-m dup -d dup -M" 1 no 64
- workout "-m raid5 -d raid5" 2 no 64
- workout "-m raid6 -d raid6" 3 no 64
+ for t in "-m dup -d single:1 no 64" \
+ "-m dup -d single:1 cancel 1024" \
+ "-m raid0 -d raid0:2 no 64" \
+ "-m raid1 -d raid1:2 no 2048" \
+ "-m raid10 -d raid10:4 no 64" \
+ "-m single -d single -M:1 no 64" \
+ "-m dup -d dup -M:1 no 64" \
+ "-m raid5 -d raid5:2 no 64" \
+ "-m raid6 -d raid6:3 no 64"; do
+ mkfs_option=${t%:*}
+ workout_option=${t#*:}
+ if [[ "${_btrfs_profile_configs[@]}" =~ "${mkfs_option/ -M}"( |$) ]]; then
+ workout "$mkfs_option" $workout_option
+ fi
+ done
fi
echo "*** done"
--
2.35.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v4] btrfs/011: use $_btrfs_profile_configs to limit the tests
2023-01-14 3:19 ` [PATCH v4] " An Long
@ 2023-01-20 11:49 ` David Disseldorp
2023-01-20 15:59 ` Long An
0 siblings, 1 reply; 14+ messages in thread
From: David Disseldorp @ 2023-01-20 11:49 UTC (permalink / raw)
To: An Long; +Cc: fstests
Hi,
On Sat, 14 Jan 2023 11:19:09 +0800, An Long wrote:
> Generally the tester need BTRFS_PROFILE_CONFIGS to test certain
> profiles. For example, skip raid56 as it's not supported.
>
> Signed-off-by: An Long <lan@suse.com>
> ---
> tests/btrfs/011 | 30 ++++++++++++++++++++----------
> 1 file changed, 20 insertions(+), 10 deletions(-)
>
> diff --git a/tests/btrfs/011 b/tests/btrfs/011
> index 6c3d037f..ac45e735 100755
> --- a/tests/btrfs/011
> +++ b/tests/btrfs/011
> @@ -48,6 +48,7 @@ _require_scratch_dev_pool 5
> _require_scratch_dev_pool_equal_size
> _require_scratch_size $((10 * 1024 * 1024)) #kB
> _require_command "$WIPEFS_PROG" wipefs
> +_btrfs_get_profile_configs
>
> rm -f $tmp.*
>
> @@ -237,18 +238,27 @@ btrfs_replace_test()
> fi
> }
>
> -workout "-m single -d single" 1 no 64
> +if [[ "${_btrfs_profile_configs[@]}" =~ "-m single -d single"( |$) ]]; then
> + workout "-m single -d single" 1 no 64
> +fi
> +
> # Mixed BG & RAID/DUP profiles are not supported on zoned btrfs
> if ! _scratch_btrfs_is_zoned; then
> - workout "-m dup -d single" 1 no 64
> - workout "-m dup -d single" 1 cancel 1024
> - workout "-m raid0 -d raid0" 2 no 64
> - workout "-m raid1 -d raid1" 2 no 2048
> - workout "-m raid10 -d raid10" 4 no 64
> - workout "-m single -d single -M" 1 no 64
> - workout "-m dup -d dup -M" 1 no 64
> - workout "-m raid5 -d raid5" 2 no 64
> - workout "-m raid6 -d raid6" 3 no 64
> + for t in "-m dup -d single:1 no 64" \
> + "-m dup -d single:1 cancel 1024" \
> + "-m raid0 -d raid0:2 no 64" \
> + "-m raid1 -d raid1:2 no 2048" \
> + "-m raid10 -d raid10:4 no 64" \
> + "-m single -d single -M:1 no 64" \
> + "-m dup -d dup -M:1 no 64" \
This dup/dup case no longer gets run with a default
_btrfs_profile_configs[]. Is that intentional?
Cheers, David
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4] btrfs/011: use $_btrfs_profile_configs to limit the tests
2023-01-20 11:49 ` David Disseldorp
@ 2023-01-20 15:59 ` Long An
2023-01-20 17:19 ` David Disseldorp
0 siblings, 1 reply; 14+ messages in thread
From: Long An @ 2023-01-20 15:59 UTC (permalink / raw)
To: ddiss; +Cc: fstests
On Fri, 2023-01-20 at 12:49 +0100, David Disseldorp wrote:
> Hi,
>
> On Sat, 14 Jan 2023 11:19:09 +0800, An Long wrote:
>
> > Generally the tester need BTRFS_PROFILE_CONFIGS to test certain
> > profiles. For example, skip raid56 as it's not supported.
> >
> > Signed-off-by: An Long <lan@suse.com>
> > ---
> > tests/btrfs/011 | 30 ++++++++++++++++++++----------
> > 1 file changed, 20 insertions(+), 10 deletions(-)
> >
> > diff --git a/tests/btrfs/011 b/tests/btrfs/011
> > index 6c3d037f..ac45e735 100755
> > --- a/tests/btrfs/011
> > +++ b/tests/btrfs/011
> > @@ -48,6 +48,7 @@ _require_scratch_dev_pool 5
> > _require_scratch_dev_pool_equal_size
> > _require_scratch_size $((10 * 1024 * 1024)) #kB
> > _require_command "$WIPEFS_PROG" wipefs
> > +_btrfs_get_profile_configs
> >
> > rm -f $tmp.*
> >
> > @@ -237,18 +238,27 @@ btrfs_replace_test()
> > fi
> > }
> >
> > -workout "-m single -d single" 1 no 64
> > +if [[ "${_btrfs_profile_configs[@]}" =~ "-m single -d single"( |$)
> > ]]; then
> > + workout "-m single -d single" 1 no 64
> > +fi
> > +
> > # Mixed BG & RAID/DUP profiles are not supported on zoned btrfs
> > if ! _scratch_btrfs_is_zoned; then
> > - workout "-m dup -d single" 1 no 64
> > - workout "-m dup -d single" 1 cancel 1024
> > - workout "-m raid0 -d raid0" 2 no 64
> > - workout "-m raid1 -d raid1" 2 no 2048
> > - workout "-m raid10 -d raid10" 4 no 64
> > - workout "-m single -d single -M" 1 no 64
> > - workout "-m dup -d dup -M" 1 no 64
> > - workout "-m raid5 -d raid5" 2 no 64
> > - workout "-m raid6 -d raid6" 3 no 64
> > + for t in "-m dup -d single:1 no 64" \
> > + "-m dup -d single:1 cancel 1024" \
> > + "-m raid0 -d raid0:2 no 64" \
> > + "-m raid1 -d raid1:2 no 2048" \
> > + "-m raid10 -d raid10:4 no 64" \
> > + "-m single -d single -M:1 no 64" \
> > + "-m dup -d dup -M:1 no 64" \
>
> This dup/dup case no longer gets run with a default
> _btrfs_profile_configs[]. Is that intentional?
>
> Cheers, David
I thought profiles from "BTRFS_PROFILE_CONFIGS" should be fine. But
this really changed behavior with default configs, and will get worse
if use "_btrfs_profile_configs replace".
In a brief, I just need a way to limit tests. If the default
config is not
suitable, how about using a new argument to
"_btrfs_get_profile_configs"?
Thanks,
An Long
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4] btrfs/011: use $_btrfs_profile_configs to limit the tests
2023-01-20 15:59 ` Long An
@ 2023-01-20 17:19 ` David Disseldorp
0 siblings, 0 replies; 14+ messages in thread
From: David Disseldorp @ 2023-01-20 17:19 UTC (permalink / raw)
To: Long An; +Cc: fstests
Hi,
On Fri, 20 Jan 2023 15:59:02 +0000, Long An wrote:
...
> > > + "-m dup -d dup -M:1 no 64" \
> >
> > This dup/dup case no longer gets run with a default
> > _btrfs_profile_configs[]. Is that intentional?
> >
> > Cheers, David
>
> I thought profiles from "BTRFS_PROFILE_CONFIGS" should be fine. But
> this really changed behavior with default configs, and will get worse
> if use "_btrfs_profile_configs replace".
>
> In a brief, I just need a way to limit tests. If the default
> config is not
> suitable, how about using a new argument to
> "_btrfs_get_profile_configs"?
Yes, a new parameter for _btrfs_get_profile_configs() which adds the
missing "dup:dup" entry sounds reasonable.
Cheers, David
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v5] btrfs/011: use $_btrfs_profile_configs to limit the tests
2023-01-11 12:18 ` David Disseldorp
` (2 preceding siblings ...)
2023-01-14 3:19 ` [PATCH v4] " An Long
@ 2023-02-14 15:30 ` An Long
2023-02-14 21:07 ` David Disseldorp
2023-02-15 5:13 ` [PATCH v6] " An Long
4 siblings, 1 reply; 14+ messages in thread
From: An Long @ 2023-02-14 15:30 UTC (permalink / raw)
To: fstests; +Cc: An Long
Generally the tester need BTRFS_PROFILE_CONFIGS to test certain
profiles. For example, skip raid56 as it's not supported.
For dup profile, add dup to default profile configs
Signed-off-by: An Long <lan@suse.com>
---
common/btrfs | 6 ++++++
tests/btrfs/011 | 30 +++++++++++++++++-------------
2 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/common/btrfs b/common/btrfs
index ee673a93..e857a40e 100644
--- a/common/btrfs
+++ b/common/btrfs
@@ -213,6 +213,12 @@ _btrfs_get_profile_configs()
"raid5:raid5"
"raid6:raid6"
)
+ if [ "$1" == "dup" ]; then
+ configs=(
+ ${configs[*]}
+ "dup:dup"
+ )
+ fi
else
# User-provided configurations.
local configs=(${BTRFS_PROFILE_CONFIGS[@]})
diff --git a/tests/btrfs/011 b/tests/btrfs/011
index 6c3d037f..852742ee 100755
--- a/tests/btrfs/011
+++ b/tests/btrfs/011
@@ -48,6 +48,7 @@ _require_scratch_dev_pool 5
_require_scratch_dev_pool_equal_size
_require_scratch_size $((10 * 1024 * 1024)) #kB
_require_command "$WIPEFS_PROG" wipefs
+_btrfs_get_profile_configs dup
rm -f $tmp.*
@@ -237,19 +238,22 @@ btrfs_replace_test()
fi
}
-workout "-m single -d single" 1 no 64
-# Mixed BG & RAID/DUP profiles are not supported on zoned btrfs
-if ! _scratch_btrfs_is_zoned; then
- workout "-m dup -d single" 1 no 64
- workout "-m dup -d single" 1 cancel 1024
- workout "-m raid0 -d raid0" 2 no 64
- workout "-m raid1 -d raid1" 2 no 2048
- workout "-m raid10 -d raid10" 4 no 64
- workout "-m single -d single -M" 1 no 64
- workout "-m dup -d dup -M" 1 no 64
- workout "-m raid5 -d raid5" 2 no 64
- workout "-m raid6 -d raid6" 3 no 64
-fi
+for t in "-m single -d single:1 no 64" \
+ "-m dup -d single:1 no 64" \
+ "-m dup -d single:1 cancel 1024" \
+ "-m raid0 -d raid0:2 no 64" \
+ "-m raid1 -d raid1:2 no 2048" \
+ "-m raid10 -d raid10:4 no 64" \
+ "-m single -d single -M:1 no 64" \
+ "-m dup -d dup -M:1 no 64" \
+ "-m raid5 -d raid5:2 no 64" \
+ "-m raid6 -d raid6:3 no 64"; do
+ mkfs_option=${t%:*}
+ workout_option=${t#*:}
+ if [[ "${_btrfs_profile_configs[@]}" =~ "${mkfs_option/ -M}"( |$) ]]; then
+ workout "$mkfs_option" $workout_option
+ fi
+done
echo "*** done"
status=0
--
2.35.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v5] btrfs/011: use $_btrfs_profile_configs to limit the tests
2023-02-14 15:30 ` [PATCH v5] " An Long
@ 2023-02-14 21:07 ` David Disseldorp
2023-02-15 5:12 ` Long An
0 siblings, 1 reply; 14+ messages in thread
From: David Disseldorp @ 2023-02-14 21:07 UTC (permalink / raw)
To: An Long; +Cc: fstests
Hi,
On Tue, 14 Feb 2023 23:30:57 +0800, An Long wrote:
> Generally the tester need BTRFS_PROFILE_CONFIGS to test certain
> profiles. For example, skip raid56 as it's not supported.
>
> For dup profile, add dup to default profile configs
>
> Signed-off-by: An Long <lan@suse.com>
> ---
> common/btrfs | 6 ++++++
> tests/btrfs/011 | 30 +++++++++++++++++-------------
> 2 files changed, 23 insertions(+), 13 deletions(-)
>
> diff --git a/common/btrfs b/common/btrfs
> index ee673a93..e857a40e 100644
> --- a/common/btrfs
> +++ b/common/btrfs
> @@ -213,6 +213,12 @@ _btrfs_get_profile_configs()
> "raid5:raid5"
> "raid6:raid6"
> )
> + if [ "$1" == "dup" ]; then
> + configs=(
> + ${configs[*]}
> + "dup:dup"
> + )
> + fi
nit: configs+=("dup:dup") can be used for appending to bash arrays.
> else
> # User-provided configurations.
> local configs=(${BTRFS_PROFILE_CONFIGS[@]})
> diff --git a/tests/btrfs/011 b/tests/btrfs/011
> index 6c3d037f..852742ee 100755
> --- a/tests/btrfs/011
> +++ b/tests/btrfs/011
> @@ -48,6 +48,7 @@ _require_scratch_dev_pool 5
> _require_scratch_dev_pool_equal_size
> _require_scratch_size $((10 * 1024 * 1024)) #kB
> _require_command "$WIPEFS_PROG" wipefs
> +_btrfs_get_profile_configs dup
>
> rm -f $tmp.*
>
> @@ -237,19 +238,22 @@ btrfs_replace_test()
> fi
> }
>
> -workout "-m single -d single" 1 no 64
> -# Mixed BG & RAID/DUP profiles are not supported on zoned btrfs
> -if ! _scratch_btrfs_is_zoned; then
> - workout "-m dup -d single" 1 no 64
> - workout "-m dup -d single" 1 cancel 1024
> - workout "-m raid0 -d raid0" 2 no 64
> - workout "-m raid1 -d raid1" 2 no 2048
> - workout "-m raid10 -d raid10" 4 no 64
> - workout "-m single -d single -M" 1 no 64
> - workout "-m dup -d dup -M" 1 no 64
> - workout "-m raid5 -d raid5" 2 no 64
> - workout "-m raid6 -d raid6" 3 no 64
> -fi
> +for t in "-m single -d single:1 no 64" \
> + "-m dup -d single:1 no 64" \
> + "-m dup -d single:1 cancel 1024" \
> + "-m raid0 -d raid0:2 no 64" \
> + "-m raid1 -d raid1:2 no 2048" \
> + "-m raid10 -d raid10:4 no 64" \
> + "-m single -d single -M:1 no 64" \
> + "-m dup -d dup -M:1 no 64" \
> + "-m raid5 -d raid5:2 no 64" \
> + "-m raid6 -d raid6:3 no 64"; do
> + mkfs_option=${t%:*}
> + workout_option=${t#*:}
> + if [[ "${_btrfs_profile_configs[@]}" =~ "${mkfs_option/ -M}"( |$) ]]; then
> + workout "$mkfs_option" $workout_option
> + fi
> +done
>
> echo "*** done"
> status=0
With the minor nit above fixed, feel free to add:
Reviewed-by: David Disseldorp <ddiss@suse.de>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v5] btrfs/011: use $_btrfs_profile_configs to limit the tests
2023-02-14 21:07 ` David Disseldorp
@ 2023-02-15 5:12 ` Long An
0 siblings, 0 replies; 14+ messages in thread
From: Long An @ 2023-02-15 5:12 UTC (permalink / raw)
To: ddiss; +Cc: fstests
On Tue, 2023-02-14 at 22:07 +0100, David Disseldorp wrote:
> Hi,
>
> On Tue, 14 Feb 2023 23:30:57 +0800, An Long wrote:
>
> > Generally the tester need BTRFS_PROFILE_CONFIGS to test certain
> > profiles. For example, skip raid56 as it's not supported.
> >
> > For dup profile, add dup to default profile configs
> >
> > Signed-off-by: An Long <lan@suse.com>
> > ---
> > common/btrfs | 6 ++++++
> > tests/btrfs/011 | 30 +++++++++++++++++-------------
> > 2 files changed, 23 insertions(+), 13 deletions(-)
> >
> > diff --git a/common/btrfs b/common/btrfs
> > index ee673a93..e857a40e 100644
> > --- a/common/btrfs
> > +++ b/common/btrfs
> > @@ -213,6 +213,12 @@ _btrfs_get_profile_configs()
> > "raid5:raid5"
> > "raid6:raid6"
> > )
> > + if [ "$1" == "dup" ]; then
> > + configs=(
> > + ${configs[*]}
> > + "dup:dup"
> > + )
> > + fi
>
> nit: configs+=("dup:dup") can be used for appending to bash arrays.
>
> > else
> > # User-provided configurations.
> > local configs=(${BTRFS_PROFILE_CONFIGS[@]})
> > diff --git a/tests/btrfs/011 b/tests/btrfs/011
> > index 6c3d037f..852742ee 100755
> > --- a/tests/btrfs/011
> > +++ b/tests/btrfs/011
> > @@ -48,6 +48,7 @@ _require_scratch_dev_pool 5
> > _require_scratch_dev_pool_equal_size
> > _require_scratch_size $((10 * 1024 * 1024)) #kB
> > _require_command "$WIPEFS_PROG" wipefs
> > +_btrfs_get_profile_configs dup
> >
> > rm -f $tmp.*
> >
> > @@ -237,19 +238,22 @@ btrfs_replace_test()
> > fi
> > }
> >
> > -workout "-m single -d single" 1 no 64
> > -# Mixed BG & RAID/DUP profiles are not supported on zoned btrfs
> > -if ! _scratch_btrfs_is_zoned; then
> > - workout "-m dup -d single" 1 no 64
> > - workout "-m dup -d single" 1 cancel 1024
> > - workout "-m raid0 -d raid0" 2 no 64
> > - workout "-m raid1 -d raid1" 2 no 2048
> > - workout "-m raid10 -d raid10" 4 no 64
> > - workout "-m single -d single -M" 1 no 64
> > - workout "-m dup -d dup -M" 1 no 64
> > - workout "-m raid5 -d raid5" 2 no 64
> > - workout "-m raid6 -d raid6" 3 no 64
> > -fi
> > +for t in "-m single -d single:1 no 64" \
> > + "-m dup -d single:1 no 64" \
> > + "-m dup -d single:1 cancel 1024" \
> > + "-m raid0 -d raid0:2 no 64" \
> > + "-m raid1 -d raid1:2 no 2048" \
> > + "-m raid10 -d raid10:4 no 64" \
> > + "-m single -d single -M:1 no 64" \
> > + "-m dup -d dup -M:1 no 64" \
> > + "-m raid5 -d raid5:2 no 64" \
> > + "-m raid6 -d raid6:3 no 64"; do
> > + mkfs_option=${t%:*}
> > + workout_option=${t#*:}
> > + if [[ "${_btrfs_profile_configs[@]}" =~ "${mkfs_option/ -
> > M}"( |$) ]]; then
> > + workout "$mkfs_option" $workout_option
> > + fi
> > +done
> >
> > echo "*** done"
> > status=0
>
> With the minor nit above fixed, feel free to add:
> Reviewed-by: David Disseldorp <ddiss@suse.de>
Thanks David! It's really a elegance way for appending.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v6] btrfs/011: use $_btrfs_profile_configs to limit the tests
2023-01-11 12:18 ` David Disseldorp
` (3 preceding siblings ...)
2023-02-14 15:30 ` [PATCH v5] " An Long
@ 2023-02-15 5:13 ` An Long
2023-02-16 14:55 ` Zorro Lang
4 siblings, 1 reply; 14+ messages in thread
From: An Long @ 2023-02-15 5:13 UTC (permalink / raw)
To: fstests; +Cc: An Long
Generally the tester need BTRFS_PROFILE_CONFIGS to test certain
profeils. For example, skip raid56 as it's not supported.
For dup profile, add dup to default profile configs.
Signed-off-by: An Long <lan@suse.com>
---
common/btrfs | 3 +++
tests/btrfs/011 | 30 +++++++++++++++++-------------
2 files changed, 20 insertions(+), 13 deletions(-)
diff --git a/common/btrfs b/common/btrfs
index ee673a93..6557af86 100644
--- a/common/btrfs
+++ b/common/btrfs
@@ -213,6 +213,9 @@ _btrfs_get_profile_configs()
"raid5:raid5"
"raid6:raid6"
)
+ if [ "$1" == "dup" ]; then
+ configs+=("dup:dup")
+ fi
else
# User-provided configurations.
local configs=(${BTRFS_PROFILE_CONFIGS[@]})
diff --git a/tests/btrfs/011 b/tests/btrfs/011
index 6c3d037f..852742ee 100755
--- a/tests/btrfs/011
+++ b/tests/btrfs/011
@@ -48,6 +48,7 @@ _require_scratch_dev_pool 5
_require_scratch_dev_pool_equal_size
_require_scratch_size $((10 * 1024 * 1024)) #kB
_require_command "$WIPEFS_PROG" wipefs
+_btrfs_get_profile_configs dup
rm -f $tmp.*
@@ -237,19 +238,22 @@ btrfs_replace_test()
fi
}
-workout "-m single -d single" 1 no 64
-# Mixed BG & RAID/DUP profiles are not supported on zoned btrfs
-if ! _scratch_btrfs_is_zoned; then
- workout "-m dup -d single" 1 no 64
- workout "-m dup -d single" 1 cancel 1024
- workout "-m raid0 -d raid0" 2 no 64
- workout "-m raid1 -d raid1" 2 no 2048
- workout "-m raid10 -d raid10" 4 no 64
- workout "-m single -d single -M" 1 no 64
- workout "-m dup -d dup -M" 1 no 64
- workout "-m raid5 -d raid5" 2 no 64
- workout "-m raid6 -d raid6" 3 no 64
-fi
+for t in "-m single -d single:1 no 64" \
+ "-m dup -d single:1 no 64" \
+ "-m dup -d single:1 cancel 1024" \
+ "-m raid0 -d raid0:2 no 64" \
+ "-m raid1 -d raid1:2 no 2048" \
+ "-m raid10 -d raid10:4 no 64" \
+ "-m single -d single -M:1 no 64" \
+ "-m dup -d dup -M:1 no 64" \
+ "-m raid5 -d raid5:2 no 64" \
+ "-m raid6 -d raid6:3 no 64"; do
+ mkfs_option=${t%:*}
+ workout_option=${t#*:}
+ if [[ "${_btrfs_profile_configs[@]}" =~ "${mkfs_option/ -M}"( |$) ]]; then
+ workout "$mkfs_option" $workout_option
+ fi
+done
echo "*** done"
status=0
--
2.35.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v6] btrfs/011: use $_btrfs_profile_configs to limit the tests
2023-02-15 5:13 ` [PATCH v6] " An Long
@ 2023-02-16 14:55 ` Zorro Lang
0 siblings, 0 replies; 14+ messages in thread
From: Zorro Lang @ 2023-02-16 14:55 UTC (permalink / raw)
To: An Long; +Cc: fstests
On Wed, Feb 15, 2023 at 01:13:19PM +0800, An Long wrote:
> Generally the tester need BTRFS_PROFILE_CONFIGS to test certain
> profeils. For example, skip raid56 as it's not supported.
>
> For dup profile, add dup to default profile configs.
>
> Signed-off-by: An Long <lan@suse.com>
> ---
David has given his RVB to V5 patch, so if no other review points, I'll merge
this patch with:
Reviewed-by: David Disseldorp <ddiss@suse.de>
> common/btrfs | 3 +++
> tests/btrfs/011 | 30 +++++++++++++++++-------------
> 2 files changed, 20 insertions(+), 13 deletions(-)
>
> diff --git a/common/btrfs b/common/btrfs
> index ee673a93..6557af86 100644
> --- a/common/btrfs
> +++ b/common/btrfs
> @@ -213,6 +213,9 @@ _btrfs_get_profile_configs()
> "raid5:raid5"
> "raid6:raid6"
> )
> + if [ "$1" == "dup" ]; then
> + configs+=("dup:dup")
> + fi
> else
> # User-provided configurations.
> local configs=(${BTRFS_PROFILE_CONFIGS[@]})
> diff --git a/tests/btrfs/011 b/tests/btrfs/011
> index 6c3d037f..852742ee 100755
> --- a/tests/btrfs/011
> +++ b/tests/btrfs/011
> @@ -48,6 +48,7 @@ _require_scratch_dev_pool 5
> _require_scratch_dev_pool_equal_size
> _require_scratch_size $((10 * 1024 * 1024)) #kB
> _require_command "$WIPEFS_PROG" wipefs
> +_btrfs_get_profile_configs dup
>
> rm -f $tmp.*
>
> @@ -237,19 +238,22 @@ btrfs_replace_test()
> fi
> }
>
> -workout "-m single -d single" 1 no 64
> -# Mixed BG & RAID/DUP profiles are not supported on zoned btrfs
> -if ! _scratch_btrfs_is_zoned; then
> - workout "-m dup -d single" 1 no 64
> - workout "-m dup -d single" 1 cancel 1024
> - workout "-m raid0 -d raid0" 2 no 64
> - workout "-m raid1 -d raid1" 2 no 2048
> - workout "-m raid10 -d raid10" 4 no 64
> - workout "-m single -d single -M" 1 no 64
> - workout "-m dup -d dup -M" 1 no 64
> - workout "-m raid5 -d raid5" 2 no 64
> - workout "-m raid6 -d raid6" 3 no 64
> -fi
> +for t in "-m single -d single:1 no 64" \
> + "-m dup -d single:1 no 64" \
> + "-m dup -d single:1 cancel 1024" \
> + "-m raid0 -d raid0:2 no 64" \
> + "-m raid1 -d raid1:2 no 2048" \
> + "-m raid10 -d raid10:4 no 64" \
> + "-m single -d single -M:1 no 64" \
> + "-m dup -d dup -M:1 no 64" \
> + "-m raid5 -d raid5:2 no 64" \
> + "-m raid6 -d raid6:3 no 64"; do
> + mkfs_option=${t%:*}
> + workout_option=${t#*:}
> + if [[ "${_btrfs_profile_configs[@]}" =~ "${mkfs_option/ -M}"( |$) ]]; then
> + workout "$mkfs_option" $workout_option
> + fi
> +done
>
> echo "*** done"
> status=0
> --
> 2.35.3
>
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2023-02-16 14:56 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10 17:22 [PATCH] btrfs/011: use $_btrfs_profile_configs to limit the tests An Long
2023-01-11 12:18 ` David Disseldorp
2023-01-13 16:35 ` [PATCH v2] " An Long
2023-01-13 18:40 ` Zorro Lang
2023-01-14 3:12 ` [PATCH v3] " An Long
2023-01-14 3:19 ` [PATCH v4] " An Long
2023-01-20 11:49 ` David Disseldorp
2023-01-20 15:59 ` Long An
2023-01-20 17:19 ` David Disseldorp
2023-02-14 15:30 ` [PATCH v5] " An Long
2023-02-14 21:07 ` David Disseldorp
2023-02-15 5:12 ` Long An
2023-02-15 5:13 ` [PATCH v6] " An Long
2023-02-16 14:55 ` Zorro Lang
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.