Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Ricardo B. Marlière and committed by
Steven Rostedt
057854f8 1f318b96

+1 -1
+1 -1
tools/testing/ktest/ktest.pl
··· 2508 2508 my $save_no_reboot = $no_reboot; 2509 2509 $no_reboot = 1; 2510 2510 2511 - if (-f $warnings_file) { 2511 + if (defined($warnings_file) && -f $warnings_file) { 2512 2512 open(IN, $warnings_file) or 2513 2513 dodie "Error opening $warnings_file"; 2514 2514