Skip to contentSkip to conversation

selftests: fix dependency checker script

PATCH New Lu Dai 1 participant 1 message Jan 25, 2024 Kselftest

lore
Share & tools
lore

Lu Dai

author
#0 lore raw

PATCH 1/1 selftests: fix dependency checker script

grep|cut pipe will hang when there is no input for grep

---
 tools/testing/selftests/kselftest_deps.sh | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/kselftest_deps.sh +1 -0
index de59cc8f03c3..487e49fdf2a6 100755
@@ -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.34.1