* [PATCH 2/2] rvgen/tests: cover an invalid monitor type
@ 2026-11-12 10:20 Chaosheng Qu
0 siblings, 0 replies; only message in thread
From: Chaosheng Qu @ 2026-11-12 10:20 UTC (permalink / raw)
To: Steven Rostedt, Gabriele Monaco; +Cc: linux-trace-kernel, linux-kernel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-12 10:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-12 10:20 [PATCH 2/2] rvgen/tests: cover an invalid monitor type Chaosheng Qu
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®