Przeglądaj źródła

fuzz: add script to generate .zk file corpus

y 2 lat temu
rodzic
commit
f9ed0b825c
1 zmienionych plików z 15 dodań i 0 usunięć
  1. 15 0
      fuzz/honggfuzz/script/generate-zk-corpus.sh

+ 15 - 0
fuzz/honggfuzz/script/generate-zk-corpus.sh

@@ -0,0 +1,15 @@
+#/usr/bin/env bash
+: '
+Copies all ZK binary files (.zk.bin) from the main repository into a destination folder
+in the fuzzing directory. This allows the compiled example binaries to be used as
+test inputs for the fuzzer. This should in turn allow for more efficient fuzzing.
+'
+set -e
+
+# Run from inside fuzz/honggfuzz/ directory
+CWD=$(pwd)
+DST=$CWD/hfuzz_workspace/zkas-compile/input/
+cd ../..
+mkdir -p $DST
+find -name "*.zk" -exec cp {} $CWD/hfuzz_workspace/zkas-compile/input/ \;
+cd $CWD