From: Jim Cromie <jim.cromie@gmail.com>
To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
amd-gfx@lists.freedesktop.org,
intel-gvt-dev@lists.freedesktop.org,
intel-gfx@lists.freedesktop.org
Cc: Jim Cromie <jim.cromie@gmail.com>,
Jason Baron <jbaron@akamai.com>, Shuah Khan <shuah@kernel.org>,
linux-kselftest@vger.kernel.org
Subject: [RFC PATCH 7/7] dyndbg-test: test keyword !value negation
Date: Thu, 5 Mar 2026 18:50:10 -0700 [thread overview]
Message-ID: <20260306015022.1940986-8-jim.cromie@gmail.com> (raw)
In-Reply-To: <20260306015022.1940986-1-jim.cromie@gmail.com>
---
.../dynamic_debug/dyndbg_selftest.sh | 35 +++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh b/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh
index 09937dca3056..5c35d7cc5ecf 100755
--- a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh
+++ b/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh
@@ -350,12 +350,47 @@ function test_mod_submod {
ifrmmod test_dynamic_debug
}
+function test_negated_keywords {
+ echo -e "${GREEN}# TEST_NEGATED_KEYWORDS ${NC}"
+
+ # Test 1: Disable negated subset from enabled set
+ # Enables all 6 in init/main.c, then pulses ONLY those that are NOT run_init_process (the 2 blacklist sites) OFF.
+ ddcmd =_
+ ddcmd file init/main.c +p
+ check_match_ct 'init/main.c:.*=p' 6 -r
+ ddcmd file init/main.c func !run_init_process -p
+ # Result: 6 - 2 = 4 sites (run_init_process) remain enabled.
+ check_match_ct 'init/main.c:.*=p' 4 -r
+ check_match_ct 'run_init_process' 4 -r
+
+ # Test 2: Enable negated subset from clean slate
+ # Negation !run_init_process should match the 2 blacklist sites.
+ ddcmd =_
+ ddcmd file init/main.c func !run_init_process +p
+ # Verify exactly 2 sites enabled
+ check_match_ct 'init/main.c:.*=p' 2 -r
+ check_match_ct 'initcall_blacklist[[:space:]]' 1 -r
+ check_match_ct 'initcall_blacklisted[[:space:]]' 1 -r
+
+ # Test 3: Enable negated subset with wildcard
+ # Negation !run_init_* should match the same 2 blacklist sites.
+ ddcmd =_
+ ddcmd file init/main.c func !run_init_* +p
+ # Verify exactly 2 sites enabled
+ check_match_ct 'init/main.c:.*=p' 2 -r
+ check_match_ct 'initcall_blacklist[[:space:]]' 1 -r
+ check_match_ct 'initcall_blacklisted[[:space:]]' 1 -r
+
+ ddcmd =_
+}
+
tests_list=(
basic_tests
# these require test_dynamic_debug*.ko
comma_terminator_tests
test_percent_splitting
test_mod_submod
+ test_negated_keywords
)
# Run tests
--
2.53.0
prev parent reply other threads:[~2026-03-06 1:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-06 1:50 [RFC PATCH 0/7] queued static-key API reduces IPIs to 134/16154 in dyndbg Jim Cromie
2026-03-06 1:50 ` [RFC PATCH 1/7] jump_label: expose queueing API for batched static key updates Jim Cromie
2026-03-08 9:54 ` Peter Zijlstra
2026-03-06 1:50 ` [RFC PATCH 2/7] virtio: use pr_debug_ratelimited to avoid flooding Jim Cromie
2026-03-06 1:50 ` [RFC PATCH 3/7] drivers/tty/serial/serial_core: ratelimit uart_wait_until_sent Jim Cromie
2026-03-06 6:32 ` Jiri Slaby
2026-03-06 14:02 ` jim.cromie
2026-03-06 1:50 ` [RFC PATCH 4/7] dyndbg: use static-key queueing API in dynamic-debug Jim Cromie
2026-03-06 1:50 ` [RFC PATCH 5/7] dyndbg: hoist static_key_apply_queued up Jim Cromie
2026-03-06 1:50 ` [RFC PATCH 6/7] lib/dynamic_debug: add negation support to queries Jim Cromie
2026-03-06 1:50 ` Jim Cromie [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260306015022.1940986-8-jim.cromie@gmail.com \
--to=jim.cromie@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-gvt-dev@lists.freedesktop.org \
--cc=jbaron@akamai.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®