]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ktest.pl: Check kernelrelease return in get_version
authorRicardo B. Marliere <rbm@suse.com>
Thu, 5 Dec 2024 20:50:35 +0000 (17:50 -0300)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 18 Dec 2024 21:51:38 +0000 (16:51 -0500)
commita4e17a8f239a545c463f8ec27db4ed6e74b31841
tree5a10719e0a7946f42a8a84cd08aa9b99f6e92995
parent78d4f34e2115b517bcbfe7ec0d018bbbb6f9b0b8
ktest.pl: Check kernelrelease return in get_version

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: 5f9b6ced04a4e ("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>
tools/testing/ktest/ktest.pl