* [PATCH] ktest: Store failure logs also in fatal paths
@ 2026-03-18 19:00 Ricardo B. Marlière
2026-03-18 20:01 ` Steven Rostedt
0 siblings, 1 reply; 2+ messages in thread
From: Ricardo B. Marlière @ 2026-03-18 19:00 UTC (permalink / raw)
To: Steven Rostedt, John Hawley; +Cc: linux-kernel, Ricardo B. Marlière
STORE_FAILURES was only saved from fail(), so paths that reached dodie()
could exit without preserving failure logs.
That includes fatal hook paths such as:
POST_BUILD_DIE = 1
and ordinary failures when:
DIE_ON_FAILURE = 1
Call save_logs("fail", ...) from dodie() too so fatal failures keep the
same STORE_FAILURES artifacts as non-fatal fail() paths.
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
tools/testing/ktest/ktest.pl | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index de99b82d16ad..112f9ca2444b 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -1635,6 +1635,11 @@ sub dodie {
print " See $opt{LOG_FILE} for more info.\n";
}
+ # Fatal paths bypass fail(), so STORE_FAILURES needs to be handled here.
+ if (defined($store_failures)) {
+ save_logs("fail", $store_failures);
+ }
+
if ($email_on_error) {
my $name = get_test_name;
my $log_file;
---
base-commit: 229517449879b3ca8ca5588593cbea6a67ba0ad2
change-id: 20260318-ktest-fixes-564376c0c56f
Best regards,
--
Ricardo B. Marlière <rbm@suse.com>
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] ktest: Store failure logs also in fatal paths
2026-03-18 19:00 [PATCH] ktest: Store failure logs also in fatal paths Ricardo B. Marlière
@ 2026-03-18 20:01 ` Steven Rostedt
0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2026-03-18 20:01 UTC (permalink / raw)
To: Ricardo B. Marlière; +Cc: John Hawley, linux-kernel
On Wed, 18 Mar 2026 16:00:43 -0300
Ricardo B. Marlière <rbm@suse.com> wrote:
> STORE_FAILURES was only saved from fail(), so paths that reached dodie()
> could exit without preserving failure logs.
>
> That includes fatal hook paths such as:
>
> POST_BUILD_DIE = 1
>
> and ordinary failures when:
>
> DIE_ON_FAILURE = 1
>
> Call save_logs("fail", ...) from dodie() too so fatal failures keep the
> same STORE_FAILURES artifacts as non-fatal fail() paths.
>
> Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
Applied, pending testing.
Thanks!
-- Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-18 20:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-18 19:00 [PATCH] ktest: Store failure logs also in fatal paths Ricardo B. Marlière
2026-03-18 20:01 ` Steven Rostedt
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®