From 58702ffd4f0d04bca62f1f2728cbc63fd80f03fe Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Tue, 16 Jun 2015 20:30:53 +0530 Subject: [PATCH] Add valgrind suppression files for HTTPS tests * testenv/test/base_test.py: Use Valgrind SSL suppressions file for tests * testenv/valgrind-suppression-ssl, tests/valgrind-suppression-ssl: Add new suppression files to suppress OpenSSL errors in valgrind * tests/test-proxied-https-auth.px: Use the valgrind SSL suppressions file for the test * tests/test-proxied-https-auth-keepalive.px: Same --- testenv/test/base_test.py | 1 + testenv/valgrind-suppression-ssl | 28 ++++++++++++++++++++++ tests/Test-proxied-https-auth-keepalive.px | 2 +- tests/Test-proxied-https-auth.px | 2 +- tests/valgrind-suppressions-ssl | 28 ++++++++++++++++++++++ 5 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 testenv/valgrind-suppression-ssl create mode 100644 tests/valgrind-suppressions-ssl diff --git a/testenv/test/base_test.py b/testenv/test/base_test.py index 5e7126a4..3b989100 100644 --- a/testenv/test/base_test.py +++ b/testenv/test/base_test.py @@ -113,6 +113,7 @@ class BaseTest: cmd_line = 'valgrind --error-exitcode=301 ' \ '--leak-check=yes ' \ '--track-origins=yes ' \ + '--suppressions=../valgrind-suppression-ssl ' \ '%s %s ' % (wget_path, wget_options) elif valgrind not in ("", "0"): cmd_line = '%s %s %s ' % (os.getenv("VALGRIND_TESTS", ""), diff --git a/testenv/valgrind-suppression-ssl b/testenv/valgrind-suppression-ssl new file mode 100644 index 00000000..02507850 --- /dev/null +++ b/testenv/valgrind-suppression-ssl @@ -0,0 +1,28 @@ +{ + + Memcheck:Cond + ... + obj:*/libcrypto.so.* +} + +{ + + Memcheck:Cond + ... + obj:*/libssl.so.* +} + +{ + + Memcheck:Value8 + ... + obj:*/libcrypto.so.* +} + +{ + + Memcheck:Param + write(buf) + ... + obj:*/libcrypto.so.* +} diff --git a/tests/Test-proxied-https-auth-keepalive.px b/tests/Test-proxied-https-auth-keepalive.px index 349778a1..e407f315 100755 --- a/tests/Test-proxied-https-auth-keepalive.px +++ b/tests/Test-proxied-https-auth-keepalive.px @@ -150,7 +150,7 @@ my $valgrind = $ENV{VALGRIND_TESTS}; if (!defined $valgrind || $valgrind eq "" || $valgrind == 0) { # Valgrind not requested - leave $cmdline as it is } elsif ($valgrind == 1) { - $cmdline = "valgrind --error-exitcode=301 --leak-check=yes --track-origins=yes " . $cmdline; + $cmdline = "valgrind --suppressions=valgrind-suppressions-ssl --error-exitcode=301 --leak-check=yes --track-origins=yes " . $cmdline; } else { $cmdline = $valgrind . " " . $cmdline; } diff --git a/tests/Test-proxied-https-auth.px b/tests/Test-proxied-https-auth.px index d2c710a3..1daefe83 100755 --- a/tests/Test-proxied-https-auth.px +++ b/tests/Test-proxied-https-auth.px @@ -149,7 +149,7 @@ my $valgrind = $ENV{VALGRIND_TESTS}; if (!defined $valgrind || $valgrind eq "" || $valgrind == 0) { # Valgrind not requested - leave $cmdline as it is } elsif ($valgrind == 1) { - $cmdline = "valgrind --error-exitcode=301 --leak-check=yes --track-origins=yes " . $cmdline; + $cmdline = "valgrind --suppressions=valgrind-suppressions-ssl --error-exitcode=301 --leak-check=yes --track-origins=yes " . $cmdline; } else { $cmdline = $valgrind . " " . $cmdline; } diff --git a/tests/valgrind-suppressions-ssl b/tests/valgrind-suppressions-ssl new file mode 100644 index 00000000..02507850 --- /dev/null +++ b/tests/valgrind-suppressions-ssl @@ -0,0 +1,28 @@ +{ + + Memcheck:Cond + ... + obj:*/libcrypto.so.* +} + +{ + + Memcheck:Cond + ... + obj:*/libssl.so.* +} + +{ + + Memcheck:Value8 + ... + obj:*/libcrypto.so.* +} + +{ + + Memcheck:Param + write(buf) + ... + obj:*/libcrypto.so.* +}