aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-02-27 12:20:36 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-02-27 12:47:33 -0800
commitf9554664570205c2a0c813f9d46ac8814b999bc3 (patch)
tree20f6e4d2c4d846ac1b2aca251c8c5c79ad4668a8 /tests
parentd57fad6e2f987a4f8991865cdfc43456c0257e4b (diff)
fuzz -Os and -Oz as well
Diffstat (limited to 'tests')
-rwxr-xr-xtests/fuzz/csmith_driver.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/fuzz/csmith_driver.py b/tests/fuzz/csmith_driver.py
index ad5a7021..a4f506b8 100755
--- a/tests/fuzz/csmith_driver.py
+++ b/tests/fuzz/csmith_driver.py
@@ -35,7 +35,13 @@ notes = { 'invalid': 0, 'unaligned': 0, 'embug': 0 }
fails = 0
while 1:
- opts = '-O' + str(random.randint(0, 3))
+ if random.random() < 0.666:
+ opts = '-O' + str(random.randint(0, 3))
+ else:
+ if random.random() < 0.5:
+ opts = '-Os'
+ else:
+ opts = '-Oz'
print 'opt level:', opts
print 'Tried %d, notes: %s' % (tried, notes)