All of lore.kernel.org
 help / color / mirror / Atom feed
* [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

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.