From 88f76bc641f44b4b5961d2eace1d6fba72ecaf8b Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Sun, 16 May 2021 20:37:55 +0200 Subject: [PATCH] [infra] Make `targets_list` detect JVM/Python targets (#5775) * [infra] Make `targets_list` detect JVM/Python targets `targets_list` should not detect `jazzer_driver` and `jazzer_driver_asan` as fuzz targets, but should consider shell scripts that contain `LLVMFuzzerTestOneInput`. @inferno-chromium This should fix https://github.com/google/oss-fuzz/pull/5770#issuecomment-841851786. * Fix --- infra/base-images/base-runner/targets_list | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/infra/base-images/base-runner/targets_list b/infra/base-images/base-runner/targets_list index d35534258..95615c811 100755 --- a/infra/base-images/base-runner/targets_list +++ b/infra/base-images/base-runner/targets_list @@ -2,7 +2,8 @@ for binary in $(find $OUT/ -executable -type f); do [[ "$binary" != *.so ]] || continue - file "$binary" | grep ELF > /dev/null 2>&1 || continue + [[ $(basename "$binary") != jazzer_driver* ]] || continue + file "$binary" | grep -e ELF -e "shell script" > /dev/null 2>&1 || continue grep "LLVMFuzzerTestOneInput" "$binary" > /dev/null 2>&1 || continue basename "$binary"