This is an automated email from the ASF dual-hosted git repository.

vy pushed a commit to branch fuzzing
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/fuzzing by this push:
     new e90bd3c32b Improve diagnostics
e90bd3c32b is described below

commit e90bd3c32bcc60a0a50e09a37e100474987d31f2
Author: Volkan Yazıcı <vol...@yazi.ci>
AuthorDate: Thu Aug 29 12:24:54 2024 +0200

    Improve diagnostics
---
 oss-fuzz-build.sh | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/oss-fuzz-build.sh b/oss-fuzz-build.sh
index 9e9794a663..991f8291c9 100755
--- a/oss-fuzz-build.sh
+++ b/oss-fuzz-build.sh
@@ -53,8 +53,8 @@ mkdir -p "$outputDir"
 cd -- "$(dirname -- "${BASH_SOURCE[0]}")"
 
 # To contain all Maven dependencies under `$outputDir`, explicitly provide the 
Maven local repository.
-# I presume(!?) this helps with caching and reproducibility.
-export MAVEN_OPTS="-Dmaven.repo.local=$outputDir/.m2"
+# I presume(!?) this helps with caching and reproducibility too.
+export MAVEN_OPTS="-Dmaven.repo.local=$outputDir/m2"
 
 # Make Maven executions scripting friendly
 export MAVEN_ARGS="--batch-mode --no-transfer-progress --errors"
@@ -126,16 +126,17 @@ else
   jvmArgs="-Xmx2048m:-Xss1024k"
 fi
 
-# Temporarily increase verbosity to troubleshoot fuzzer failures
-# See https://github.com/google/oss-fuzz/issues/12349
-set -x
-
 # Verify the classpath
 classPath="$classPath"
-echo "\$classPath" | sed 's/:/\n/g' | while read classPathFile; do
-  if [[ ! -f "\$classPathFile" ]]; then
-    echo "ERROR: Could not find class path file: \"\$classPathFile\"" 1>&2
-    echo "ERROR: Complete class path: \"\$classPath\"" 1>&2
+echo "\$classPath" | sed 's/:/\n/g' | while read classPathFilePath; do
+  if [[ ! -f "\$classPathFilePath" ]]; then
+    echo "ERROR: Could not find class path file: \"\$classPathFilePath\""
+    echo "ERROR: Complete class path: \"\$classPath\""
+    echo "DEBUG: \"ls\" output"
+    ls -al | sed "s/^/DEBUG: /g"
+    classPathFileName=\$(basename "\$classPathFilePath")
+    echo "DEBUG: \"find\" output"
+    find / -name "\$classPathFileName" 2>/dev/null | sed "s/^/DEBUG: /g"
     exit 1
   fi
 done

Reply via email to