All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: [PATCH 2/3] fstests: btrfs/195: skip raid setups not in the profile configs
Date: Tue, 19 Mar 2024 12:55:57 -0400	[thread overview]
Message-ID: <c19995ea42066da0eae381b499475c81679c8f0e.1710867187.git.josef@toxicpanda.com> (raw)
In-Reply-To: <cover.1710867187.git.josef@toxicpanda.com>

You can specify a custom BTRFS_PROFILE_CONFIGS to skip certain raid
configurations in the tests, however btrfs/195 doesn't honor this
currently.  Fix this up by getting the profile configs and skipping any
configurations that are not listed in BTRFS_PROFILE_CONFIGS.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 tests/btrfs/195 | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/btrfs/195 b/tests/btrfs/195
index 96cc4134..df8f5ed6 100755
--- a/tests/btrfs/195
+++ b/tests/btrfs/195
@@ -21,6 +21,9 @@ _require_scratch_dev_pool 4
 # Zoned btrfs only supports SINGLE profile
 _require_non_zoned_device "${SCRATCH_DEV}"
 
+# Load up the available configs
+_btrfs_get_profile_configs
+
 declare -a TEST_VECTORS=(
 # $nr_dev_min:$data:$metadata:$data_convert:$metadata_convert
 "4:single:raid1"
@@ -38,6 +41,11 @@ run_testcase() {
 	src_type=${args[1]}
 	dst_type=${args[2]}
 
+	if [[ ! "${_btrfs_profile_configs[@]}" =~ "$dst_type" ]]; then
+		echo "=== Skipping test: $1 ===" >> $seqres.full
+		return
+	fi
+
 	_scratch_dev_pool_get $num_disks
 
 	echo "=== Running test: $1 ===" >> $seqres.full
-- 
2.43.0


  parent reply	other threads:[~2024-03-19 16:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 16:55 [PATCH 0/3] fstests: various RAID56 related fixes for btrfs Josef Bacik
2024-03-19 16:55 ` [PATCH 1/3] fstests: check btrfs profile configs before allowing raid56 Josef Bacik
2024-03-19 20:59   ` Christoph Hellwig
2024-03-20 14:40     ` Josef Bacik
2024-03-21 21:37       ` Christoph Hellwig
2024-03-20 12:31   ` Anand Jain
2024-03-20 14:41     ` Josef Bacik
2024-03-19 16:55 ` Josef Bacik [this message]
2024-03-24 14:25   ` [PATCH 2/3] fstests: btrfs/195: skip raid setups not in the profile configs Anand Jain
2024-03-19 16:55 ` [PATCH 3/3] fstests: add _require_btrfs_fs_feature raid56 to a few tests Josef Bacik
2024-03-21  5:55   ` Naohiro Aota
2024-03-24 14:16     ` Anand Jain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c19995ea42066da0eae381b499475c81679c8f0e.1710867187.git.josef@toxicpanda.com \
    --to=josef@toxicpanda.com \
    --cc=fstests@vger.kernel.org \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.