Skip to content

Commit 1790947

Browse files
exludshuahkh
authored andcommitted
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 <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent d4e6fbd commit 1790947

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/testing/selftests/kselftest_deps.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ l4_test()
244244
l5_test()
245245
{
246246
tests=$(find $(dirname "$test") -type f -name "*.mk")
247+
[[ -z "${tests// }" ]] && return
247248
test_libs=$(grep "^IOURING_EXTRA_LIBS +\?=" $tests | \
248249
cut -d "=" -f 2)
249250

0 commit comments

Comments
 (0)