Skip to content

Commit c5d5df6

Browse files
committed
Merge rust-bitcoin#5138: fuzz: fix shell script bugs and remove dead code
b0b7c07 fuzz: fix shell script bugs and remove dead code (Klaklax) Pull request description: Fixes two shell script issues in fuzz utilities: 1. Remove unused function `targetFileToHFuzzInputArg()` with undefined variable `$FILE` 2. Fix syntax error: remove extra quote in `HFUZZ_INPUT_ARGS` assignment Added in 2023 as a stub but never used due to the $FILE bug. Logic was implemented inline instead, leaving this as forgotten dead code. ACKs for top commit: tcharding: ACK b0b7c07 apoelstra: ACK b0b7c07; successfully ran local tests; thanks for finding this! Tree-SHA512: ebbea05b6a6a8236b8bca396748b4cf668f6a4b3677db7091d28a1d3185a106cb8995ae50e2ea6abc8799b57cd1ebc33403a3ce48cef640c0dc176836b26a25b
2 parents fc592e2 + b0b7c07 commit c5d5df6

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

fuzz/fuzz-util.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@ targetFileToName() {
2020
| sed 's/^_//g'
2121
}
2222

23-
targetFileToHFuzzInputArg() {
24-
baseName=$(basename "$1")
25-
dirName="${baseName%.*}"
26-
if [ -d "hfuzz_input/$dirName" ]; then
27-
echo "HFUZZ_INPUT_ARGS=\"-f hfuzz_input/$FILE/input\""
28-
fi
29-
}
30-
3123
listTargetNames() {
3224
for target in $(listTargetFiles); do
3325
targetFileToName "$target"

fuzz/fuzz.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ for targetFile in $targetFiles; do
2525
targetName=$(targetFileToName "$targetFile")
2626
echo "Fuzzing target $targetName ($targetFile)"
2727
if [ -d "hfuzz_input/$targetName" ]; then
28-
HFUZZ_INPUT_ARGS="-f hfuzz_input/$targetName/input\""
28+
HFUZZ_INPUT_ARGS="-f hfuzz_input/$targetName/input"
2929
else
3030
HFUZZ_INPUT_ARGS=""
3131
fi

0 commit comments

Comments
 (0)