Message ID | 2684eb3da262f10c546a464850d063954a7250ae.1646744615.git.wqu@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | common/btrfs: don't skip the test if BTRFS_PROFILE_CONFIGS contains unsupported profile | expand |
diff --git a/common/btrfs b/common/btrfs index 670d9d1f2b09..ac597ca465a1 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
[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> --- common/btrfs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)