Whamcloud - gitweb
LU-15887 test: add always_except() 37/55437/2
authorJohn L. Hammond <jhammond@whamcloud.com>
Wed, 25 May 2022 14:07:37 +0000 (09:07 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 20 Jun 2024 21:35:04 +0000 (21:35 +0000)
In test-framework.sh, add a new function (always_except()) to replace
manual manipulation of $ALWAYS_EXECPT.
Add a line to contrib/scripts/spelling.txt to suggest its use.

Do not convert sanity.sh to use always_except() in backported patch
to avoid conflict with other patches currently in flight.

Lustre-change: https://review.whamcloud.com/47452
Lustre-commit: c4ff4aef7eb939d536acffaac4465039f3cfa935

Test-Parameters: trivial
Signed-off-by: John L. Hammond <jhammond@whamcloud.com>
Change-Id: I1b39fe9555bab59e70db00cef73d13102668500a
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55437
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
contrib/scripts/spelling.txt
lustre/tests/test-framework.sh

index c011c83..055a18b 100644 (file)
@@ -1,7 +1,7 @@
 # The format of each line is:
 # mistake||correction
 #
-libcfs_debug_vmsg2|libcfs_debug_msg
+ALWAYS_EXCEPT||always_except
 alloca||malloc
 cfs_atomic_add||atomic_add
 cfs_atomic_add_return||atomic_add_return
@@ -125,6 +125,7 @@ ldlm_policy_res_t||enum ldlm_policy_res
 ldlm_side_t||enum ldlm_side
 ldlm_type_t||enum ldlm_type
 ldlm_wire_policy_data_t||union ldlm_wire_policy_data
+libcfs_debug_vmsg2||libcfs_debug_msg
 lnet_acceptor_connreq_t||struct lnet_acceptor_connreq
 lnet_counters_t||struct lnet_counters
 lnet_handle_wire_t||struct lnet_handle_wire
index 9c6384c..8881e49 100755 (executable)
@@ -6492,6 +6492,24 @@ skip_eopnotsupp() {
        skip $retstr
 }
 
+# Add a list of tests to ALWAYS_EXCEPT due to an issue.
+# Usage: always_except LU-4815 23 42q ...
+#
+function always_except() {
+       local issue="${1:-}" # single jira style issue ("LU-4815")
+       local test_num
+
+       shift
+
+       if ! [[ "$issue" =~ ^[[:upper:]]+-[[:digit:]]+$ ]]; then
+               error "always_except: invalid issue '$issue' for tests '$*'"
+       fi
+
+       for test_num in "$@"; do
+               ALWAYS_EXCEPT+=" $test_num"
+       done
+}
+
 build_test_filter() {
        EXCEPT="$EXCEPT $(testslist_filter)"