diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2013-07-23 22:10:17 +0200 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2013-07-23 22:10:17 +0200 |
commit | 5aa8aae8c96f57d48169a44df139c3c0ae98c39d (patch) | |
tree | 9859a2c322128d3f8cf06f3e365415f6f81cb531 | |
download | bz987158-workaround-5aa8aae8c96f57d48169a44df139c3c0ae98c39d.tar.gz bz987158-workaround-5aa8aae8c96f57d48169a44df139c3c0ae98c39d.tar.xz bz987158-workaround-5aa8aae8c96f57d48169a44df139c3c0ae98c39d.zip |
Initial commit
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rw-r--r-- | bz987158.exp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/bz987158.exp b/bz987158.exp new file mode 100644 index 0000000..fd8e874 --- /dev/null +++ b/bz987158.exp @@ -0,0 +1,44 @@ +#!expect +# +# bz987158 workaround to conveniently suppress some red-zone related +# spurious warnings caused by OpenSSL under certain circumstances. +# +# Usage: +# $ vim bz987158.exp +# $ expect bz987158.exp | col > my.supp +# $ valgrind --suppressions=my.supp ... +# +# To debug the script uncomment the "puts" lines (note: overapprox.). +# +# jpokorny[at]redhat, distributed and terms of GPLv2+ + +set cmd "genhash" +set args "-s 127.0.0.1 -p 4433 -S -u \"/\"" +set valgrind "valgrind" +# foo|bar combination +set searchfor "aesni_cbc_encrypt" + +set cnt 0 + +log_user 0 + +spawn sh -c "$valgrind --track-origins=yes --gen-suppressions=yes -- $cmd $args 2>&1" +expect { + -re ".*($searchfor).*" { + #puts "Setting suppression for: $expect_out(1,string)\r" + #puts "Whole block:\r$expect_out(0,string)\r" + expect "*Print suppression" {send "y\r"} + expect "*{" {puts "\{"} + expect "<insert_a_suppression_name_here>" { + incr cnt + puts " bz987158-$cmd-$cnt" + } + expect "\n" {} + expect "*}" {puts "$expect_out(0,string)"} + exp_continue + } + "*Print suppression*" { + send "n\r" + exp_continue + } +} |