allow plotting from remote mount
This commit is contained in:
parent
4e08db297a
commit
ee15313d96
@ -1,5 +1,6 @@
|
|||||||
import csv
|
import csv
|
||||||
def_flags="--no-default-features --features std,snapshot_restore,singlecore"
|
def_flags="--no-default-features --features std,snapshot_restore,singlecore"
|
||||||
|
remote="mnt/"
|
||||||
|
|
||||||
rule build_showmap:
|
rule build_showmap:
|
||||||
output:
|
output:
|
||||||
@ -113,7 +114,7 @@ rule run_bench:
|
|||||||
export TIME_DUMP=$(pwd)/{output[0]}
|
export TIME_DUMP=$(pwd)/{output[0]}
|
||||||
export CASE_DUMP=$(pwd)/{output[2]}
|
export CASE_DUMP=$(pwd)/{output[2]}
|
||||||
export TRACE_DUMP=$(pwd)/{output[0]}.trace
|
export TRACE_DUMP=$(pwd)/{output[0]}.trace
|
||||||
export FUZZ_ITERS=10800
|
export FUZZ_ITERS=180
|
||||||
export FUZZER=$(pwd)/{input[1]}/debug/fret
|
export FUZZER=$(pwd)/{input[1]}/debug/fret
|
||||||
set +e
|
set +e
|
||||||
../fuzzer.sh > {output[1]} 2>&1
|
../fuzzer.sh > {output[1]} 2>&1
|
||||||
@ -125,12 +126,13 @@ rule run_bench:
|
|||||||
|
|
||||||
rule run_showmap:
|
rule run_showmap:
|
||||||
input:
|
input:
|
||||||
"build/{target}.elf",
|
"{remote}build/{target}.elf",
|
||||||
"bins/target_showmap",
|
"bins/target_showmap",
|
||||||
"timedump/{fuzzer}/{target}.{num}.case"
|
"bins/target_showmap_int",
|
||||||
|
"{remote}timedump/{fuzzer}/{target}.{num}.case"
|
||||||
output:
|
output:
|
||||||
"timedump/{fuzzer}/{target}.{num}.trace.ron",
|
"{remote}timedump/{fuzzer}/{target}.{num}.trace.ron",
|
||||||
"timedump/{fuzzer}/{target}.{num}.case.time",
|
"{remote}timedump/{fuzzer}/{target}.{num}.case.time",
|
||||||
run:
|
run:
|
||||||
with open('target_symbols.csv') as csvfile:
|
with open('target_symbols.csv') as csvfile:
|
||||||
reader = csv.DictReader(csvfile)
|
reader = csv.DictReader(csvfile)
|
||||||
@ -142,7 +144,12 @@ rule run_showmap:
|
|||||||
fuzz_input=line['input_symbol']
|
fuzz_input=line['input_symbol']
|
||||||
fuzz_len=line['input_size']
|
fuzz_len=line['input_size']
|
||||||
bkp=line['return_function']
|
bkp=line['return_function']
|
||||||
script="""
|
script=""
|
||||||
|
if wildcards.fuzzer.find('_int') > -1:
|
||||||
|
script="export FUZZER=$(pwd)/{input[2]}/debug/fret\n"
|
||||||
|
else:
|
||||||
|
script="export FUZZER=$(pwd)/{input[1]}/debug/fret\n"
|
||||||
|
script+="""
|
||||||
mkdir -p $(dirname {output})
|
mkdir -p $(dirname {output})
|
||||||
export KERNEL=$(pwd)/{input[0]}
|
export KERNEL=$(pwd)/{input[0]}
|
||||||
export FUZZ_MAIN={fuzz_main}
|
export FUZZ_MAIN={fuzz_main}
|
||||||
@ -150,8 +157,7 @@ rule run_showmap:
|
|||||||
export FUZZ_INPUT_LEN={fuzz_len}
|
export FUZZ_INPUT_LEN={fuzz_len}
|
||||||
export BREAKPOINT={bkp}
|
export BREAKPOINT={bkp}
|
||||||
export TRACE_DUMP=$(pwd)/{output[0]}
|
export TRACE_DUMP=$(pwd)/{output[0]}
|
||||||
export FUZZER=$(pwd)/{input[1]}/debug/fret
|
export DO_SHOWMAP=$(pwd)/{input[3]}
|
||||||
export DO_SHOWMAP=$(pwd)/{input[2]}
|
|
||||||
export TIME_DUMP=$(pwd)/{output[1]}
|
export TIME_DUMP=$(pwd)/{output[1]}
|
||||||
set +e
|
set +e
|
||||||
../fuzzer.sh
|
../fuzzer.sh
|
||||||
@ -163,17 +169,17 @@ rule run_showmap:
|
|||||||
|
|
||||||
rule tarnsform_trace:
|
rule tarnsform_trace:
|
||||||
input:
|
input:
|
||||||
"timedump/{fuzzer}/{target}.{num}.trace.ron"
|
"{remote}timedump/{fuzzer}/{target}.{num}.trace.ron"
|
||||||
output:
|
output:
|
||||||
"timedump/{fuzzer}/{target}.{num}.trace.csv"
|
"{remote}timedump/{fuzzer}/{target}.{num}.trace.csv"
|
||||||
shell:
|
shell:
|
||||||
"$(pwd)/../../../../state2gantt/target/debug/state2gantt {input} > {output[0]}"
|
"$(pwd)/../../../../state2gantt/target/debug/state2gantt {input} > {output[0]}"
|
||||||
|
|
||||||
rule trace2gantt:
|
rule trace2gantt:
|
||||||
input:
|
input:
|
||||||
"timedump/{fuzzer}/{target}.{num}.trace.csv"
|
"{remote}timedump/{fuzzer}/{target}.{num}.trace.csv"
|
||||||
output:
|
output:
|
||||||
"timedump/{fuzzer}/{target}.{num}.trace.csv.png"
|
"{remote}timedump/{fuzzer}/{target}.{num}.trace.csv.png"
|
||||||
shell:
|
shell:
|
||||||
"Rscript --vanilla $(pwd)/../../../../state2gantt/gantt.R {input}"
|
"Rscript --vanilla $(pwd)/../../../../state2gantt/gantt.R {input}"
|
||||||
|
|
||||||
@ -197,3 +203,7 @@ rule all_compare_afl_longest:
|
|||||||
rule all_micro:
|
rule all_micro:
|
||||||
input:
|
input:
|
||||||
expand("timedump/{fuzzer}/{target}.{num}", fuzzer=['random_int','afl_int','state_int','feedgeneration_int'], target=['waters_int','watersv2_int'],num=range(0,10))
|
expand("timedump/{fuzzer}/{target}.{num}", fuzzer=['random_int','afl_int','state_int','feedgeneration_int'], target=['waters_int','watersv2_int'],num=range(0,10))
|
||||||
|
|
||||||
|
rule all_images:
|
||||||
|
input:
|
||||||
|
expand("{remote}timedump/{fuzzer}/{target}.{num}.trace.csv.png",remote=remote, fuzzer=['state_int','feedgeneration_int'], target=['waters_int','watersv2_int'],num=range(0,10))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user