selftests: livepatch: Avoid running the tests if kernel-devel is missing
authorMarcos Paulo de Souza <mpdesouza@suse.com>
Wed, 21 Feb 2024 17:17:04 +0000 (14:17 -0300)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 28 Feb 2024 00:03:35 +0000 (17:03 -0700)
commit54ee3526796f56c249124686a33e1cc05f76ea21
treee951f15cd4f1cdd167eb470200d79a54f5f7e88d
parent8ab37b0d98cfe7463cb75a62156ebad9a47d3417
selftests: livepatch: Avoid running the tests if kernel-devel is missing

By checking if KDIR is a valid directory we can safely skip the tests if
kernel-devel isn't installed (default value of KDIR), or if KDIR
variable passed doesn't exists.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202402191417.XULH88Ct-lkp@intel.com/
Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/livepatch/functions.sh
tools/testing/selftests/livepatch/test_modules/Makefile