kou commented on code in PR #51091:
URL: https://github.com/apache/arrow/pull/51091#discussion_r3945904926


##########
cpp/build-support/fuzzing/generate_corpuses.sh:
##########
@@ -39,51 +39,59 @@ OUT=$1
 
 # Arrow IPC
 
-rm -rf ${CORPUS_DIR}
-${OUT}/arrow-ipc-generate-fuzz-corpus -stream ${CORPUS_DIR}
+rm -rf "${CORPUS_DIR}"
+"${OUT}/arrow-ipc-generate-fuzz-corpus" -stream "${CORPUS_DIR}"
+
+IPC_INTEGRATION_DIR="${ARROW_ROOT}/testing/data/arrow-ipc-stream/integration"
+
 # Add "golden" IPC integration files
-IPC_INTEGRATION_FILES=$(find 
${ARROW_ROOT}/testing/data/arrow-ipc-stream/integration -name "*.stream")
-[ -z "${IPC_INTEGRATION_FILES}" ] && exit 1
 # Several IPC integration files can have the same name, make sure
 # they all appear in the corpus by numbering the duplicates.
-cp --backup=numbered ${IPC_INTEGRATION_FILES} ${CORPUS_DIR}
-${ARROW_CPP}/build-support/fuzzing/pack_corpus.py ${CORPUS_DIR} 
${OUT}/arrow-ipc-stream-fuzz_seed_corpus.zip
+# Use shell globbing to keep this ShellCheck-safe and compatible with Bash 3.2 
on macOS.
+# IPC integration files are expected to be directly under each subdirectory.
+cp --backup=numbered \
+  "${IPC_INTEGRATION_DIR}"/*/*.stream \
+  "${CORPUS_DIR}"

Review Comment:
   I think that we can remove the `[ "${#IPC_INTEGRATION_FILES[@]}" -eq 0 ]` 
check. If we don't have it, can we simplify this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to