W dniu 08.04.2015 o 22:21, Tim Rühsen pisze:
> Could you use $srcdir instead Cwd ? I didn't test it, but it could fail when 
> using DISTCHECK_CONFIGURE_FLAGS="VALGRIND_TESTS=1" make distcheck. It least 
> we 
> should use the same path mechanism as with e.g. 'certs' in 
> Test-proxied-https-auth.px.
It did fail and I have fixed the problem. (Cwd it still used, because
$srcdir contains a relative path, and current directory changes later.)
It now passes
$ DISTCHECK_CONFIGURE_FLAGS="VALGRIND_TESTS=1" make distcheck
(After applying both memory leak patch and Valgrind suppression file patch.)

Thank you in advance for the review.

Best regards,
Hubert
From 2c37bae42b01767a73489b3f74fdecb795097b5a Mon Sep 17 00:00:00 2001
From: Hubert Tarasiuk <hubert.taras...@gmail.com>
Date: Mon, 6 Apr 2015 12:33:37 +0200
Subject: [PATCH 2/2] Add Valgrind suppresion for libidn.so at
 idna_to_ascii_4z.

* tests/WgetTests.pm (run): Include suppression file when running Valgrind.
* tests/valgrind-suppressions: Add suppression for idn_to_ascii_4z.
* tests/Makefile.am: Add valgrind-suppressions to EXTRA_DIST.
---
 tests/Makefile.am           | 2 +-
 tests/WgetTests.pm          | 9 ++++++++-
 tests/valgrind-suppressions | 8 ++++++++
 3 files changed, 17 insertions(+), 2 deletions(-)
 create mode 100644 tests/valgrind-suppressions

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0ea587e..5d387aa 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -131,7 +131,7 @@ PX_TESTS = \
 
 EXTRA_DIST = FTPServer.pm FTPTest.pm HTTPServer.pm HTTPTest.pm \
              WgetTests.pm WgetFeature.pm WgetFeature.cfg $(PX_TESTS) \
-             certs
+             certs valgrind-suppressions
 
 check_PROGRAMS = unit-tests
 unit_tests_SOURCES =
diff --git a/tests/WgetTests.pm b/tests/WgetTests.pm
index 3d3b9dd..1645166 100644
--- a/tests/WgetTests.pm
+++ b/tests/WgetTests.pm
@@ -14,6 +14,12 @@ use POSIX qw(locale_h);
 use locale;
 
 our $WGETPATH = '../src/wget';
+our $VALGRIND_SUPP_FILE = Cwd::getcwd();
+if (defined $ENV{'srcdir'}) {
+    $VALGRIND_SUPP_FILE = $VALGRIND_SUPP_FILE
+                          . "/" . $ENV{'srcdir'};
+}
+$VALGRIND_SUPP_FILE = $VALGRIND_SUPP_FILE . '/valgrind-suppressions';
 
 my @unexpected_downloads = ();
 
@@ -122,7 +128,8 @@ sub run
     elsif ($valgrind == 1)
     {
         $cmdline =
-          'valgrind --error-exitcode=301 --leak-check=yes --track-origins=yes '
+          'valgrind --suppressions=' . $VALGRIND_SUPP_FILE
+          . ' --error-exitcode=301 --leak-check=yes --track-origins=yes '
           . $cmdline;
     }
     else
diff --git a/tests/valgrind-suppressions b/tests/valgrind-suppressions
new file mode 100644
index 0000000..4026770
--- /dev/null
+++ b/tests/valgrind-suppressions
@@ -0,0 +1,8 @@
+{
+   False positive in libidn.so. More info: https://bugzilla.redhat.com/show_bug.cgi?id=678518
+   Memcheck:Addr4
+   fun:idna_to_ascii_4z
+   fun:idna_to_ascii_8z
+   fun:idn_encode
+   fun:url_parse
+}
-- 
2.3.5

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to