From: Chaosheng Qu <chaosheng.qu.linux@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>,
Gabriele Monaco <gmonaco@redhat.com>
Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] rvgen/tests: cover an invalid monitor type
Date: Thu, 12 Nov 2026 18:20:20 +0800 [thread overview]
Message-ID: <179447882047.254241.3226415982233977960@gmail.com> (raw)
From 0c12bf144a7267be93a9e45d872eaaf0c8a2d841 Mon Sep 17 00:00:00 2001
From: Chaosheng Qu <chaosheng.qu.linux@gmail.com>
Date: Thu, 12 Nov 2026 14:26:11 +0800
Subject: [PATCH 2/2] rvgen/tests: cover an invalid monitor type
Add a rejection test next to the other ones, so the new check is
exercised. Without it the command exits 0 and leaves a generated tree
behind, so the test fails on both the exit code and the message.
Signed-off-by: Chaosheng Qu <chaosheng.qu.linux@gmail.com>
Assisted-by: LLM
---
tools/verification/rvgen/tests/rvgen_monitor.t | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/verification/rvgen/tests/rvgen_monitor.t b/tools/verification/rvgen/tests/rvgen_monitor.t
index 5f2562600..2a48a7b54 100644
--- a/tools/verification/rvgen/tests/rvgen_monitor.t
+++ b/tools/verification/rvgen/tests/rvgen_monitor.t
@@ -64,6 +64,10 @@ check "invalid monitor class" \
"$RVGEN monitor -c invalid -s tests/specs/test_da.dot -t per_cpu" 1 \
"Unknown monitor class" "Traceback (most recent call last)"
+check "invalid monitor type" \
+ "$RVGEN monitor -c da -s tests/specs/test_da.dot -t invalid" 2 \
+ "invalid choice: 'invalid'" "Traceback (most recent call last)"
+
check "missing dot file" \
"$RVGEN monitor -c da -s tests/specs/nonexistent.dot -t per_cpu" 1 \
"No such file or directory" "Traceback (most recent call last)"
--
2.43.0
reply other threads:[~2026-11-12 10:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=179447882047.254241.3226415982233977960@gmail.com \
--to=chaosheng.qu.linux@gmail.com \
--cc=gmonaco@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=rostedt@goodmis.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®