* [LTP] [PATCH] irq: informative TINFO for irqbalance01 result
@ 2025-05-30 10:22 Andrea Cervesato
2025-05-30 11:29 ` Cyril Hrubis
0 siblings, 1 reply; 4+ messages in thread
From: Andrea Cervesato @ 2025-05-30 10:22 UTC (permalink / raw)
To: ltp
From: Andrea Cervesato <andrea.cervesato@suse.com>
Change heuristic message when irqbalance01 test is sending the result.
The test can't detect if an IRQ balance service is up and running, so
after a test failure users should verify that:
- a balancing service is up and running on the system
- a balancing service is running, but it didn't perform any IRQ
assignment on any CPU
- a balancing service is running, but CPUs didn't performed any
interrupt after IRQs assignments
Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
testcases/kernel/irq/irqbalance01.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/testcases/kernel/irq/irqbalance01.c b/testcases/kernel/irq/irqbalance01.c
index f7c6b027859816052f08b07a4a700787b1460e0e..4120b2eae6e2f862e0d86b4f86e3db5b2760db84 100644
--- a/testcases/kernel/irq/irqbalance01.c
+++ b/testcases/kernel/irq/irqbalance01.c
@@ -285,9 +285,17 @@ static void evidence_of_change(void)
}
}
- tst_res(changed ? TPASS : TFAIL,
- "Heuristic: Detected %zu irq-cpu pairs have been dissallowed",
- changed);
+ if (changed) {
+ tst_res(TPASS, "IRQs assignments have changed %zu times",
+ changed);
+ return;
+ }
+
+ tst_res(TFAIL,
+ "IRQ balancing has not been detected. It might be that:\n"
+ "- balancing service is not running\n"
+ "- balancing service is running but rules didn't change\n"
+ "- balancing rules have been changed, but CPUs didn't perform any interrupt");
}
static void setup(void)
---
base-commit: a16ec9409a99d41cd4268ed3f8bbe49108d51a4d
change-id: 20250530-fix_irqbalance-c8922476bec7
Best regards,
--
Andrea Cervesato <andrea.cervesato@suse.com>
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] irq: informative TINFO for irqbalance01 result
2025-05-30 10:22 [LTP] [PATCH] irq: informative TINFO for irqbalance01 result Andrea Cervesato
@ 2025-05-30 11:29 ` Cyril Hrubis
2025-05-30 12:10 ` Andrea Cervesato via ltp
0 siblings, 1 reply; 4+ messages in thread
From: Cyril Hrubis @ 2025-05-30 11:29 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: ltp
Hi!
> + tst_res(TFAIL,
> + "IRQ balancing has not been detected. It might be that:\n"
> + "- balancing service is not running\n"
> + "- balancing service is running but rules didn't change\n"
> + "- balancing rules have been changed, but CPUs didn't perform any interrupt");
This looks like an abuse of the tst_res() interface. I would have kept
the TFAIL message as it was and added the hints with tst_printf(), which
is used in the test to print debug information anyways.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] irq: informative TINFO for irqbalance01 result
2025-05-30 11:29 ` Cyril Hrubis
@ 2025-05-30 12:10 ` Andrea Cervesato via ltp
2025-05-30 13:28 ` Cyril Hrubis
0 siblings, 1 reply; 4+ messages in thread
From: Andrea Cervesato via ltp @ 2025-05-30 12:10 UTC (permalink / raw)
To: Cyril Hrubis, Andrea Cervesato; +Cc: ltp
On 5/30/25 13:29, Cyril Hrubis wrote:
> This looks like an abuse of the tst_res() interface. I would have kept
> the TFAIL message as it was and added the hints with tst_printf(), which
> is used in the test to print debug information anyways.
The debug information is useful, but the error message is really vague,
even if correct.
The meaning of the patch is to add information so the user knows what's
going on, even if he/she doesn't know the test really well.
We have some hints for CVE as well, where we print an informative
message where to find the kernel patch etc.
Maybe we can just print verbose explanation with TINFO in case of TFAIL
and to keep "IRQs assignments have changed N times" message in case of
TPASS.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] irq: informative TINFO for irqbalance01 result
2025-05-30 12:10 ` Andrea Cervesato via ltp
@ 2025-05-30 13:28 ` Cyril Hrubis
0 siblings, 0 replies; 4+ messages in thread
From: Cyril Hrubis @ 2025-05-30 13:28 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: ltp
Hi!
> > This looks like an abuse of the tst_res() interface. I would have kept
> > the TFAIL message as it was and added the hints with tst_printf(), which
> > is used in the test to print debug information anyways.
>
> The debug information is useful, but the error message is really vague,
> even if correct.
> The meaning of the patch is to add information so the user knows what's
> going on, even if he/she doesn't know the test really well.
That's why I suggested to print the hints with tst_printf() instead of
tst_res().
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-05-30 13:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-30 10:22 [LTP] [PATCH] irq: informative TINFO for irqbalance01 result Andrea Cervesato
2025-05-30 11:29 ` Cyril Hrubis
2025-05-30 12:10 ` Andrea Cervesato via ltp
2025-05-30 13:28 ` Cyril Hrubis
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.