All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] test: shell: run-test.sh: introduce NFT_TEST_EXCLUDES
@ 2026-02-04 14:49 Yi Chen
  2026-02-04 15:06 ` Florian Westphal
  0 siblings, 1 reply; 4+ messages in thread
From: Yi Chen @ 2026-02-04 14:49 UTC (permalink / raw)
  To: pablo, fw; +Cc: phil, netfilter-devel

Introduce the NFT_TEST_EXCLUDES environment variable to allow excluding
one or more specific test cases.
This is useful for some releases where certain tests are not yet supported.
allowing them to be skipped directly in the test script
without modifying the run-test.sh itself.

Signed-off-by: Yi Chen <yiche@redhat.com>
---
 tests/shell/run-tests.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/shell/run-tests.sh b/tests/shell/run-tests.sh
index 46f523b9..6273c9a2 100755
--- a/tests/shell/run-tests.sh
+++ b/tests/shell/run-tests.sh
@@ -255,6 +255,7 @@ usage() {
 	echo "                 Supported <FEATURE>s are: ${_HAVE_OPTS[@]}."
 	echo " NFT_TEST_SKIP_<OPTION>=*|y: if set, certain tests are skipped."
 	echo "                 Supported <OPTION>s are: ${_SKIP_OPTS[@]}."
+	echo " NFT_TEST_EXCLUDES=\"TEST1 TEST2 ...\": Specify tests to be excluded from running"
 }
 
 NFT_TEST_BASEDIR="$(dirname "$0")"
@@ -455,6 +456,11 @@ done
 
 NFT_TEST_SHUFFLE_TESTS="$(bool_y "$NFT_TEST_SHUFFLE_TESTS")"
 
+if [ -n "$NFT_TEST_EXCLUDES" ]; then
+	TESTS=( $(printf '%s\n' "${TESTS[@]}" |
+            grep -vE "$(printf '%s|' $NFT_TEST_EXCLUDES | sed 's/|$//')") )
+fi
+
 if [ "$DO_LIST_TESTS" = y ] ; then
 	printf '%s\n' "${TESTS[@]}"
 	exit 0
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-05  2:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-04 14:49 [PATCH] test: shell: run-test.sh: introduce NFT_TEST_EXCLUDES Yi Chen
2026-02-04 15:06 ` Florian Westphal
2026-02-05  2:03   ` Yi Chen
2026-02-05  2:10     ` Florian Westphal

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.