Commit 17909476 authored by Lu Dai's avatar Lu Dai Committed by Shuah Khan

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: default avatarLu Dai <dai.lu@exordes.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent d4e6fbd2
...@@ -244,6 +244,7 @@ l4_test() ...@@ -244,6 +244,7 @@ l4_test()
l5_test() l5_test()
{ {
tests=$(find $(dirname "$test") -type f -name "*.mk") tests=$(find $(dirname "$test") -type f -name "*.mk")
[[ -z "${tests// }" ]] && return
test_libs=$(grep "^IOURING_EXTRA_LIBS +\?=" $tests | \ test_libs=$(grep "^IOURING_EXTRA_LIBS +\?=" $tests | \
cut -d "=" -f 2) cut -d "=" -f 2)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment