File: fuzz.sh

package info (click to toggle)
mtail 0.0%2Bgit20161231.ae129e9-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,900 kB
  • ctags: 505
  • sloc: yacc: 427; makefile: 121; sh: 105; lisp: 66; awk: 17
file content (23 lines) | stat: -rwxr-xr-x 332 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

set -x

d=$(dirname $0)
EMTAIL=$d/../mtail
EMGEN=$d/../emgen/emgen
OUT=$d/../fuzzout

run() {
    rm -rf $OUT/*
    $EMGEN --rand_seed $1 > $OUT/fuzz$1.mtail
    $EMTAIL --compile_only --dump_bytecode --logs foo.log --progs $OUT
    echo $?
}

if [[ -n "$1" ]]; then
	run $1
else
for i in $(seq 0 99); do
	run $i
done
fi