aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2022-03-08 21:03:42 +0800
committerEryu Guan <guaneryu@gmail.com>2022-04-10 23:35:13 +0800
commit1133ecda69f92cee3875b9f12fb4a1957d97aef1 (patch)
treec52e4c216ee6ae061f337220e9cfbd91eedfd9df
parent7834a74058c2543aa3d85465a5e52c9af7b2ab91 (diff)
downloadxfstests-dev-1133ecda69f92cee3875b9f12fb4a1957d97aef1.tar.gz
common/btrfs: don't skip the test if BTRFS_PROFILE_CONFIGS contains unsupported profile
[BUG] Sometimes the tester wants to use $BTRFS_PROFILE_CONFIGS to limit the tests to certain profiles. This is especially useful for btrfs subpage tests, as we don't yet support RAID56 for it yet. But unfortunately, if we specify $BTRFS_PROFILE_CONFIGS with the following content: export BTRFS_PROFILE_CONFIGS="single:single dup:single raid0:raid0 \ raid1:raid1 raid10:raid10" A lot of tests will not run, like: btrfs/064 30s ... [not run] Profile dup not supported for replace btrfs/065 26s ... [not run] Profile dup not supported for replace btrfs/066 27s ... 14s btrfs/069 25s ... [not run] Profile dup not supported for replace btrfs/070 59s ... [not run] Profile dup not supported for replace btrfs/071 25s ... [not run] Profile dup not supported for replace [CAUSE] Those test cases uses _btrfs_get_profile_configs() to grab the profiles which support given workload (like replace/repace-missing). But _btrfs_get_profile_configs() will behave different based on whether BTRFS_PROFILE_CONFIGS is defined. If not defined, it goes with default profiles, and just skip those unsupported. This is what we want. But if the environment variable is defined, it will not run if there is any unsupported profile in it. [FIX] Unify the behaivor by always skip the unsupported profiles, no matter if $BTRFS_PROFILE_CONFIGS is defined or not. Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
-rw-r--r--common/btrfs8
1 files changed, 1 insertions, 7 deletions
diff --git a/common/btrfs b/common/btrfs
index 670d9d1f2b..ac597ca465 100644
--- a/common/btrfs
+++ b/common/btrfs
@@ -258,13 +258,7 @@ _btrfs_get_profile_configs()
for unsupp in "${unsupported[@]}"; do
if [ "${profiles[0]}" == "$unsupp" -o "${profiles[1]}" == "$unsupp" ]; then
- if [ -z "$BTRFS_PROFILE_CONFIGS" ]; then
- # For the default config, just omit it.
- supported=false
- else
- # For user-provided config, don't run the test.
- _notrun "Profile $unsupp not supported for $1"
- fi
+ supported=false
fi
done
if "$supported"; then