selftests: kselftest_deps: fix l5_test() empty variable
PATCH 1/1 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 stuck.
This fix check the variable $tests, return when it is empty.
Signed-off-by Lu Dai <[email protected]>
--- tools/testing/selftests/kselftest_deps.sh | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/kselftest_deps.sh +1 -0
@@ -244,6 +244,7 @@ l4_test() l5_test() { tests=$(find $(dirname "$test") -type f -name "*.mk") + [[ -z "${tests// }" ]] && return test_libs=$(grep "^IOURING_EXTRA_LIBS +\?=" $tests | \ cut -d "=" -f 2)
Signature · 1 line
2.39.2