summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLu Dai <dai.lu@exordes.com>2024-05-04 18:01:06 +0300
committerShuah Khan <skhan@linuxfoundation.org>2024-05-08 16:46:41 -0600
commit17909476d631979927109187cc7e89e4577ff5be (patch)
tree8312800f9e6f924319b86a1c1ef083b4a43dda3b
parentd4e6fbd245c48b272cc591d1c5e7c07aedd7f071 (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>
-rwxr-xr-xtools/testing/selftests/kselftest_deps.sh1
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)