]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ktest: Avoid undef warning when WARNINGS_FILE is unset
authorRicardo B. Marlière <rbm@suse.com>
Sat, 7 Mar 2026 22:07:56 +0000 (19:07 -0300)
committerSteven Rostedt <rostedt@goodmis.org>
Mon, 9 Mar 2026 14:32:06 +0000 (10:32 -0400)
commit057854f8a595160656fe77ed7bf0d2403724b915
treed3639fd45a96538069236ce61bd77c0a185f4762
parent1f318b96cc84d7c2ab792fcc0bfd42a7ca890681
ktest: Avoid undef warning when WARNINGS_FILE is unset

check_buildlog() probes $warnings_file with -f even when WARNINGS_FILE is
not configured. Perl warns about the uninitialized value and adds noise to
the test log, which can hide the output we actually care about.

Check that WARNINGS_FILE is defined before testing whether the file exists.

Cc: John Hawley <warthog9@eaglescrag.net>
Cc: Andrea Righi <arighi@nvidia.com>
Cc: Marcos Paulo de Souza <mpdesouza@suse.com>
Cc: Matthieu Baerts <matttbe@kernel.org>
Cc: Fernando Fernandez Mancera <fmancera@suse.de>
Cc: Pedro Falcato <pfalcato@suse.de>
Link: https://patch.msgid.link/20260307-ktest-fixes-v1-1-565d412f4925@suse.com
Fixes: 4283b169abfb ("ktest: Add make_warnings_file and process full warnings")
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
tools/testing/ktest/ktest.pl