From c4faec22d9e38634001d310233226eccced3a889 Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Mon, 28 Sep 2015 20:53:48 +0530 Subject: [PATCH 1/4] Fix make distcheck failures in Perl SSL Tests * tests/Makefile.am: Add valgrind-suppressions-ssl to EXTRA_DIST * tests/Test-proxied-https-auth-keepalive.px: Find valgrind in correct path during make distcheck * tests/Test-proxied-https-auth.px: Same --- tests/Makefile.am | 2 +- tests/Test-proxied-https-auth-keepalive.px | 13 ++++++++++++- tests/Test-proxied-https-auth.px | 13 ++++++++++++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index daf162f..d3bb6a5 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -132,7 +132,7 @@ PX_TESTS = \ EXTRA_DIST = FTPServer.pm FTPTest.pm HTTPServer.pm HTTPTest.pm \ WgetTests.pm WgetFeature.pm WgetFeature.cfg $(PX_TESTS) \ - certs valgrind-suppressions + certs valgrind-suppressions valgrind-suppressions-ssl check_PROGRAMS = unit-tests unit_tests_SOURCES = diff --git a/tests/Test-proxied-https-auth-keepalive.px b/tests/Test-proxied-https-auth-keepalive.px index e407f31..b5c2b66 100755 --- a/tests/Test-proxied-https-auth-keepalive.px +++ b/tests/Test-proxied-https-auth-keepalive.px @@ -12,6 +12,8 @@ my $cert_path; my $key_path; my $srcdir; +our $VALGRIND_SUPP_FILE; + if (@ARGV) { $srcdir = shift @ARGV; } elsif (defined $ENV{srcdir}) { @@ -146,11 +148,20 @@ my $cmdline = $WgetTest::WGETPATH . " --user=fiddle-dee-dee" . " https://no.such.domain/needs-auth.txt"; $cmdline =~ s/{{port}}/$SOCKET->sockport()/e; +if (defined $srcdir) { + $VALGRIND_SUPP_FILE = $srcdir . '/valgrind-suppressions-ssl'; +} else { + $VALGRIND_SUPP_FILE = './valgrind-suppressions-ssl'; +} + 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 --suppressions=valgrind-suppressions-ssl --error-exitcode=301 --leak-check=yes --track-origins=yes " . $cmdline; + $cmdline = + 'valgrind --suppressions=' . $VALGRIND_SUPP_FILE + . ' --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 1daefe8..e797ef1 100755 --- a/tests/Test-proxied-https-auth.px +++ b/tests/Test-proxied-https-auth.px @@ -12,6 +12,8 @@ my $cert_path; my $key_path; my $srcdir; +our $VALGRIND_SUPP_FILE; + if (@ARGV) { $srcdir = shift @ARGV; } elsif (defined $ENV{srcdir}) { @@ -145,11 +147,20 @@ my $cmdline = $WgetTest::WGETPATH . " --user=fiddle-dee-dee" . " https://no.such.domain/needs-auth.txt"; $cmdline =~ s/{{port}}/$SOCKET->sockport()/e; +if (defined $srcdir) { + $VALGRIND_SUPP_FILE = $srcdir . '/valgrind-suppressions-ssl'; +} else { + $VALGRIND_SUPP_FILE = './valgrind-suppressions-ssl'; +} + 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 --suppressions=valgrind-suppressions-ssl --error-exitcode=301 --leak-check=yes --track-origins=yes " . $cmdline; + $cmdline = + 'valgrind --suppressions=' . $VALGRIND_SUPP_FILE + . ' --error-exitcode=301 --leak-check=yes --track-origins=yes ' + . $cmdline; } else { $cmdline = $valgrind . " " . $cmdline; } -- 2.6.1