diff --git a/tests/Makefile.am b/tests/Makefile.am index 0ea587ee..5d387aab 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 3d3b9dd4..16451663 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 00000000..4026770e --- /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 +}