From: Ricardo B. Marlière Date: Wed, 18 Mar 2026 19:00:43 +0000 (-0300) Subject: ktest: Store failure logs also in fatal paths X-Git-Tag: v7.1-rc1~141^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=81fca7087466bd81fff7100d824b2c788edf7a97;p=thirdparty%2Fkernel%2Flinux.git ktest: Store failure logs also in fatal paths 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. Cc: John Hawley Link: https://patch.msgid.link/20260318-ktest-fixes-v1-1-9dd94d46d84c@suse.com Signed-off-by: Ricardo B. Marlière Signed-off-by: Steven Rostedt --- diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index de99b82d16ad3..112f9ca2444b0 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;