From 3dee6ecaa202d6037f779a9afa6efbcb100a130b Mon Sep 17 00:00:00 2001 From: "John L. Hammond" Date: Wed, 25 May 2022 09:07:37 -0500 Subject: [PATCH] LU-15887 test: add always_except() 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 Change-Id: I1b39fe9555bab59e70db00cef73d13102668500a Reviewed-by: Andreas Dilger Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55437 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin --- contrib/scripts/spelling.txt | 3 ++- lustre/tests/test-framework.sh | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/contrib/scripts/spelling.txt b/contrib/scripts/spelling.txt index c011c83..055a18b 100644 --- a/contrib/scripts/spelling.txt +++ b/contrib/scripts/spelling.txt @@ -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 diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 9c6384c..8881e49 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -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)" -- 1.8.3.1