From 62531376d502082cdefbfeec76e916b5b9276955 Mon Sep 17 00:00:00 2001 From: John Regehr Date: Wed, 10 Aug 2011 10:50:57 -0600 Subject: [PATCH] Script hacking, nobody else needs to care... --- utah/scripts/john_driver/random_test.pl | 12 ++++++------ utah/scripts/reduce/c_delta.pl | 5 ++++- utah/scripts/reduce/test1_wrong_code.sh | 1 + 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/utah/scripts/john_driver/random_test.pl b/utah/scripts/john_driver/random_test.pl index 27df61a42..94c333fc7 100755 --- a/utah/scripts/john_driver/random_test.pl +++ b/utah/scripts/john_driver/random_test.pl @@ -18,8 +18,8 @@ my $XTRA = ""; -$XTRA .= "--force-non-uniform-arrays "; -#$XTRA .= "--no-unions "; +#$XTRA .= "--force-non-uniform-arrays "; +$XTRA .= "--no-unions "; #$XTRA .= "--no-argc"; #$XTRA .= "--concise "; #$XTRA .= "--no-paranoid "; @@ -42,10 +42,10 @@ my $platform = "x86_64"; # remove the comment below to enable ccomp test -#my $CSMITH_CCOMP = "$BF --quiet --no_return_dead_ptr --no-math64 --no-volatiles --ccomp --math-notmp"; +my $CSMITH_CCOMP = "--bitfields --no-math64 --no-volatiles --ccomp"; # my $CSMITH_CCOMP = "$BF --quiet --enable-volatile-tests x86 --vol-addr-file $PINTOOL_VOL_ADDR --no-math64 --ccomp --max-array-dim 3 --max-array-len-per-dim 5 --max-struct-fields 5 --math-notmp"; -my $CSMITH_CCOMP = ""; +#my $CSMITH_CCOMP = ""; # set up pintool for volatile testing my $use_pintool = 0; @@ -137,7 +137,7 @@ ($$) $cmd = "$CSMITH_HOME/src/csmith $SEED $PACK $XTRA --output $cfile"; } else { - $cmd = "$CSMITH_HOME/src/csmith $SEED $CSMITH_CCOMP --output $cfile"; + $cmd = "$CSMITH_HOME/src/csmith $SEED $CSMITH_CCOMP $XTRA --output $cfile"; } if ($PROVIDE_SEED) { print "$cmd\n"; @@ -199,7 +199,7 @@ ($$) return; } - if ($CSMITH_CCOMP ne "") { + if (0 && $CSMITH_CCOMP ne "") { # ccomp doesn't like asserts, regenerate random programs without asserts. my $noparanoid_cfile = "${fn}_small.c"; my $cmd1 = "$CSMITH_HOME/src/csmith $CSMITH_CCOMP -s $seed --output $noparanoid_cfile"; diff --git a/utah/scripts/reduce/c_delta.pl b/utah/scripts/reduce/c_delta.pl index 76f8c2b9f..9612232fc 100755 --- a/utah/scripts/reduce/c_delta.pl +++ b/utah/scripts/reduce/c_delta.pl @@ -83,6 +83,7 @@ my $DEBUG = 0; my $INDENT_OPTS = "-bad -bap -bc -cs -pcs -prs -saf -sai -saw -sob -ss -bl "; +my $SANITY = 0; ###################################################################### @@ -374,7 +375,9 @@ ($) $bad_cnt = 0; %funcs_seen = (); - sanity_check(); + if ($SANITY) { + sanity_check(); + } print "\n"; print "========== starting pass <$method> ==========\n"; diff --git a/utah/scripts/reduce/test1_wrong_code.sh b/utah/scripts/reduce/test1_wrong_code.sh index 878f45657..9266c6660 100755 --- a/utah/scripts/reduce/test1_wrong_code.sh +++ b/utah/scripts/reduce/test1_wrong_code.sh @@ -16,6 +16,7 @@ if ! grep 'no semicolon at end' outa.txt &&\ ! grep 'incompatible pointer' outa.txt &&\ ! grep 'ordered comparison of pointer with integer' outa.txt &&\ + ! grep 'declaration does not declare anything' outa.txt &&\ ! grep 'pointer from integer' outa.txt &&\ ! grep 'incompatible implicit' outa.txt &&\ ! grep 'excess elements in struct initializer' outa.txt &&\