diff options
author | Lu Dai <dai.lu@exordes.com> | 2024-05-04 18:01:06 +0300 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2024-05-08 16:46:41 -0600 |
commit | 17909476d631979927109187cc7e89e4577ff5be (patch) | |
tree | 8312800f9e6f924319b86a1c1ef083b4a43dda3b /tools | |
parent | d4e6fbd245c48b272cc591d1c5e7c07aedd7f071 (diff) |
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>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/testing/selftests/kselftest_deps.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/kselftest_deps.sh b/tools/testing/selftests/kselftest_deps.sh index de59cc8f03c3..487e49fdf2a6 100755 --- a/tools/testing/selftests/kselftest_deps.sh +++ b/tools/testing/selftests/kselftest_deps.sh @@ -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) |