a hacky derivation thing
@@ -18,7 +18,7 @@ mkdir -p "$DIR"
is_first_rs=true
prev_rs=""
-for rs in $(find "$1" -name 'out.json' | sort); do
+for rs in $(find $1 -name 'out.json' | sort); do
if [ "$(jq '.status' "$rs")" = "CRASH" ]; then
echo "WARNING: SKIPPING CRASHED RULESET!"
echo "$rs"
@@ -31,7 +31,6 @@ for rs in $(find "$1" -name 'out.json' | sort); do
continue
fi
- # MYDIR/output/2021-04-12_1705/32-fuzz-1000-samples-343/out.json
IFS='/ ' read -r -a array1 <<< "$prev_rs"
IFS='/ ' read -r -a array2 <<< "$rs"
@@ -39,12 +38,15 @@ for rs in $(find "$1" -name 'out.json' | sort); do
# indexing like this will break if directory structure changes.
name1="${array1[-2]}"
name2="${array2[-2]}"
-
+ echo "$name1"
+ echo "$name2"
IFS='- ' read -r -a dm1 <<< "$name1"
IFS='- ' read -r -a dm2 <<< "$name2"
dom1="${dm1[0]}"
dom2="${dm2[0]}"
+ echo "$dom1"
+ echo "$dom2"
if [ "$dom1" = "4" ] || [ "$dom1" = "32" ]; then
d1="bv$dom1"
@@ -63,16 +65,19 @@ for rs in $(find "$1" -name 'out.json' | sort); do
dout="$DIR/derive-$name1-$name2.json"
echo "Sending output to '$dout'"
- cargo run --bin "$2" --release -- derive "$prev_rs" "$rs" "$dout" 2> "$dout.stderr"
+ #cargo run --bin "$2" --release -- derive "$prev_rs" "$rs" "$dout" >&2 "$dout.stderr"
+ cargo run --bin "$2" --release -- derive "$prev_rs" "$rs" "$dout"
if [ "$(jq '.forward.not_derivable' "$dout")" != "[]" ]; then
echo "FORWARD FAILED!!!"
echo "Not derivable:"
jq '.forward.not_derivable' "$dout"
+ jq '.forward.not_derivable' "$dout" >> "$DIR/derive-$name1-$name2-forward.json"
fi
if [ "$(jq '.reverse.not_derivable' "$dout")" != "[]" ]; then
echo "REVERSE FAILED!!!"
jq '.reverse.not_derivable' "$dout"
+ jq '.reverse.not_derivable' "$dout" >> "$DIR/derive-$name1-$name2-reverse.json"
fi
echo
fi
@@ -82,6 +87,7 @@ for rs in $(find "$1" -name 'out.json' | sort); do
done
+
# for out1 in $(find $1 -name 'out.json' | sort); do
# for out2 in $(find $1 -name 'out.json' | sort); do
# echo "$out1 $out2"
