aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/fuzz/csmith_driver.py5
-rwxr-xr-xtests/fuzz/test.sh13
2 files changed, 13 insertions, 5 deletions
diff --git a/tests/fuzz/csmith_driver.py b/tests/fuzz/csmith_driver.py
index 90c7df2e..f43ac60e 100755
--- a/tests/fuzz/csmith_driver.py
+++ b/tests/fuzz/csmith_driver.py
@@ -40,7 +40,10 @@ while 1:
print 'Tried %d, notes: %s' % (tried, notes)
print '1) Generate C'
- check_call([CSMITH, '--no-volatiles', '--no-packed-struct'],# '--no-math64'
+ extra_args = []
+ if random.random() < 0.5: extra_args += ['--no-math64']
+ print extra_args
+ check_call([CSMITH, '--no-volatiles', '--no-packed-struct'] + extra_args,
#['--max-block-depth', '2', '--max-block-size', '2', '--max-expr-complexity', '2', '--max-funcs', '2'],
stdout=open(filename + '.c', 'w'))
#shutil.copyfile(filename + '.c', 'testcase%d.c' % tried)
diff --git a/tests/fuzz/test.sh b/tests/fuzz/test.sh
index 166d4bab..208e97e0 100755
--- a/tests/fuzz/test.sh
+++ b/tests/fuzz/test.sh
@@ -8,8 +8,9 @@ gcc $@ -I/home/alon/Dev/csmith/runtime -o n1.out &> /dev/null
/home/alon/Dev/fastcomp/build/Release/bin/clang $@ -I/home/alon/Dev/csmith/runtime -emit-llvm -c -o bc.bc &> o
~/Dev/emscripten/emcc $@ -I/home/alon/Dev/csmith/runtime -o js.out.js &> /dev/null
#~/Dev/emscripten/emcc $@ -s UNALIGNED_MEMORY=1 -I/home/alon/Dev/csmith/runtime -o ua.out.js &> /dev/null
-#~/Dev/emscripten/emcc $@ -s SAFE_HEAP=1 -I/home/alon/Dev/csmith/runtime -o sh.out.js &> /dev/null
+~/Dev/emscripten/emcc $@ -s SAFE_HEAP=1 -I/home/alon/Dev/csmith/runtime -o sh.out.js &> /dev/null
EMCC_FAST_COMPILER=1 ~/Dev/emscripten/emcc $@ -I/home/alon/Dev/csmith/runtime -o fc.out.js &> /dev/null
+EMCC_FAST_COMPILER=1 ~/Dev/emscripten/emcc $@ -s SAFE_HEAP=1 -I/home/alon/Dev/csmith/runtime -o fc-sh.out.js &> /dev/null
echo "run n1"
./n1.out &> n1
echo "run n2"
@@ -21,9 +22,11 @@ mozjs js.out.js &> js
echo "run ua"
#mozjs ua.out.js &> ua
echo "run sh"
-#mozjs sh.out.js &> sh
+mozjs sh.out.js &> sh
echo "run fc"
mozjs fc.out.js &> fc
+echo "run fc-sh"
+mozjs fc-sh.out.js &> fc-sh
echo "n/n"
diff n1 n2
echo "n/bc"
@@ -33,7 +36,9 @@ diff n1 js | grep -v warning
echo "n/js-ua"
#diff n1 ua | grep -v warning
echo "n/js-sh"
-#diff n1 sh | grep -v warning
-echo "js/js"
+diff n1 sh | grep -v warning
+echo "js/fc"
diff js fc | grep -v warning
+echo "js/fc-sh"
+diff js fc-sh | grep -v warning