From 5aa8aae8c96f57d48169a44df139c3c0ae98c39d Mon Sep 17 00:00:00 2001 From: Jan Pokorný Date: Tue, 23 Jul 2013 22:10:17 +0200 Subject: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan Pokorný --- bz987158.exp | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 bz987158.exp 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 "" { + incr cnt + puts " bz987158-$cmd-$cnt" + } + expect "\n" {} + expect "*}" {puts "$expect_out(0,string)"} + exp_continue + } + "*Print suppression*" { + send "n\r" + exp_continue + } +} -- cgit