mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
ktest.pl: Check kernelrelease return in get_version
commita4e17a8f23upstream. In the case of a test that uses the special option ${KERNEL_VERSION} in one of its settings but has no configuration available in ${OUTPUT_DIR}, for example if it's a new empty directory, then the `make kernelrelease` call will fail and the subroutine will chomp an empty string, silently. Fix that by adding an empty configuration and retrying. Cc: stable@vger.kernel.org Cc: John Hawley <warthog9@eaglescrag.net> Fixes:5f9b6ced04("ktest: Bisecting, install modules, add logging") Link: https://lore.kernel.org/20241205-ktest_kver_fallback-v2-1-869dae4c7777@suse.com Signed-off-by: Ricardo B. Marliere <rbm@suse.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
bab3e9f342
commit
fe215b8dd7
@@ -2406,6 +2406,11 @@ sub get_version {
|
||||
return if ($have_version);
|
||||
doprint "$make kernelrelease ... ";
|
||||
$version = `$make -s kernelrelease | tail -1`;
|
||||
if (!length($version)) {
|
||||
run_command "$make allnoconfig" or return 0;
|
||||
doprint "$make kernelrelease ... ";
|
||||
$version = `$make -s kernelrelease | tail -1`;
|
||||
}
|
||||
chomp($version);
|
||||
doprint "$version\n";
|
||||
$have_version = 1;
|
||||
|
||||
Reference in New Issue
Block a user