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

selftests: kselftest_deps: fix l5_test() empty variable

In the function l5_test(), variable $tests is empty when there is no .mk
file in the subsystem to be tested. It causes the following grep operation
get stuck.

This fix check the variable $tests, return when it is empty.

Signed-off-by: Lu Dai <dai.lu@exordes.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

authored by

Lu Dai and committed by
Shuah Khan
17909476 d4e6fbd2

+1
+1
tools/testing/selftests/kselftest_deps.sh
··· 244 244 l5_test() 245 245 { 246 246 tests=$(find $(dirname "$test") -type f -name "*.mk") 247 + [[ -z "${tests// }" ]] && return 247 248 test_libs=$(grep "^IOURING_EXTRA_LIBS +\?=" $tests | \ 248 249 cut -d "=" -f 2) 249 250