From: Vincent Pit Date: Sun, 29 Nov 2009 16:40:03 +0000 (+0100) Subject: This is 1.12 X-Git-Tag: v1.12^0 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FTest-Valgrind.git;a=commitdiff_plain;h=90b6c795c9fab6343c3501923aacc8f43f7a82ea This is 1.12 --- diff --git a/Changes b/Changes index 8827144..7278298 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,12 @@ Revision history for Test-Valgrind +1.12 2009-11-29 16:45 UTC + + Doc : The front documentation in Test::Valgrind was improved. + + Fix : Don't install Valgrind.so, as it's only used for testing. + + Fix : "Non-portable hex number" warnings. + + Fix : Old versions of valgrind could leave some Z-encoded symbols in + the stack traces. We now make sure they're always decoded. + 1.11 2009-10-08 20:55 UTC + Doc : Completion and improvements. + Fix : Work around Kwalitee test misfailures. diff --git a/META.yml b/META.yml index be42e0e..9b6bac6 100644 --- a/META.yml +++ b/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name: Test-Valgrind -version: 1.11 +version: 1.12 abstract: Generate suppressions, analyse and test any command with valgrind. author: - Vincent Pit diff --git a/README b/README index c032c30..72776c2 100644 --- a/README +++ b/README @@ -3,7 +3,7 @@ NAME with valgrind. VERSION - Version 1.11 + Version 1.12 SYNOPSIS # From the command-line @@ -24,17 +24,21 @@ SYNOPSIS DESCRIPTION This module is a front-end to the "Test::Valgrind::*" API that lets you run Perl code through the "memcheck" tool of the "valgrind" memory - debugger, to test it for memory errors and leaks. If they aren't - available yet, it will first generate suppressions for the current - "perl" interpreter and store them in the portable flavour of + debugger, to test for memory errors and leaks. If they aren't available + yet, it will first generate suppressions for the current "perl" + interpreter and store them in the portable flavour of ~/.perl/Test-Valgrind/suppressions/$VERSION. The actual run will then take place, and tests will be passed or failed according to the result of the analysis. - The complete API is much more versatile than this. It allows you to run - *any* executable under valgrind, generate the corresponding suppressions - and convert the analysis output to TAP so that it can be incorporated - into your project's testsuite. + The complete API is much more versatile than this. By declaring an + appropriate Test::Valgrind::Command class, you can run any executable + (that is, not only Perl scripts) under valgrind, generate the + corresponding suppressions on-the-fly and convert the analysis result to + TAP output so that it can be incorporated into your project's testsuite. + If you're not interested in producing TAP, you can output the results in + whatever format you like (for example HTML pages) by defining your own + Test::Valgrind::Action class. Due to the nature of perl's memory allocator, this module can't track leaks of Perl objects. This includes non-mortalized scalars and memory @@ -103,10 +107,16 @@ METHODS In the parent process, "import" calls "analyse" with the arguments it received itself - except that if no "file" option was supplied, it tries to pick the first caller context that looks like a script. When the - analyse ends, it exits with the status that was returned. + analysis ends, it exits with the status returned by the action (for the + default TAP-generator action, it's the number of failed tests). In the child process, it just "return"s so that the calling code is - actually run under "valgrind". + actually run under "valgrind", albeit two side-effects : + + * Perl::Destruct::Level is loaded and the destruction level is set to + 3. + + * Autoflush on "STDOUT" is turned on. VARIABLES $dl_unload @@ -118,9 +128,9 @@ VARIABLES CAVEATS Perl 5.8 is notorious for leaking like there's no tomorrow, so the - suppressions are very likely not to be very accurate on it. Anyhow, - results will most likely be better if your perl is built with debugging - enabled. Using the latest "valgrind" available will also help. + suppressions are very likely not to be complete on it. You also have a + better chance to get more accurate results if your perl is built with + debugging enabled. Using the latest "valgrind" available will also help. This module is not really secure. It's definitely not taint safe. That shouldn't be a problem for test files. @@ -160,12 +170,17 @@ SUPPORT perldoc Test::Valgrind ACKNOWLEDGEMENTS - Rafaël Garcia-Suarez, for writing and instructing me about the - existence of Perl::Destruct::Level (Elizabeth Mattijsen is a close - second). + Rafaël Garcia-Suarez, for writing and instructing me about the existence + of Perl::Destruct::Level (Elizabeth Mattijsen is a close second). H.Merijn Brand, for daring to test this thing. + David Cantrell, for providing shell access to one of his smokers where + the tests were failing. + + The debian-perl team, for offering all the feedback they could regarding + the build issues they met. + All you people that showed interest in this module, which motivated me into completely rewriting it. diff --git a/lib/Test/Valgrind.pm b/lib/Test/Valgrind.pm index 483e713..bca1141 100644 --- a/lib/Test/Valgrind.pm +++ b/lib/Test/Valgrind.pm @@ -9,11 +9,11 @@ Test::Valgrind - Generate suppressions, analyse and test any command with valgri =head1 VERSION -Version 1.11 +Version 1.12 =cut -our $VERSION = '1.11'; +our $VERSION = '1.12'; =head1 SYNOPSIS diff --git a/lib/Test/Valgrind/Action.pm b/lib/Test/Valgrind/Action.pm index f4a03dc..ac20778 100644 --- a/lib/Test/Valgrind/Action.pm +++ b/lib/Test/Valgrind/Action.pm @@ -9,11 +9,11 @@ Test::Valgrind::Action - Base class for Test::Valgrind actions. =head1 VERSION -Version 1.11 +Version 1.12 =cut -our $VERSION = '1.11'; +our $VERSION = '1.12'; =head1 DESCRIPTION diff --git a/lib/Test/Valgrind/Action/Captor.pm b/lib/Test/Valgrind/Action/Captor.pm index 8463fda..9202708 100644 --- a/lib/Test/Valgrind/Action/Captor.pm +++ b/lib/Test/Valgrind/Action/Captor.pm @@ -9,11 +9,11 @@ Test::Valgrind::Action::Captor - Mock Test::Valgrind::Action for capturing outpu =head1 VERSION -Version 1.11 +Version 1.12 =cut -our $VERSION = '1.11'; +our $VERSION = '1.12'; =head1 DESCRIPTION diff --git a/lib/Test/Valgrind/Action/Suppressions.pm b/lib/Test/Valgrind/Action/Suppressions.pm index 5dbdddd..c80d56f 100644 --- a/lib/Test/Valgrind/Action/Suppressions.pm +++ b/lib/Test/Valgrind/Action/Suppressions.pm @@ -9,11 +9,11 @@ Test::Valgrind::Action::Suppressions - Generate suppressions for a given tool. =head1 VERSION -Version 1.11 +Version 1.12 =cut -our $VERSION = '1.11'; +our $VERSION = '1.12'; =head1 DESCRIPTION diff --git a/lib/Test/Valgrind/Action/Test.pm b/lib/Test/Valgrind/Action/Test.pm index ab802a5..316bb35 100644 --- a/lib/Test/Valgrind/Action/Test.pm +++ b/lib/Test/Valgrind/Action/Test.pm @@ -9,11 +9,11 @@ Test::Valgrind::Action::Test - Test that an analysis didn't generate any error r =head1 VERSION -Version 1.11 +Version 1.12 =cut -our $VERSION = '1.11'; +our $VERSION = '1.12'; =head1 DESCRIPTION diff --git a/lib/Test/Valgrind/Carp.pm b/lib/Test/Valgrind/Carp.pm index 90884eb..dd21641 100644 --- a/lib/Test/Valgrind/Carp.pm +++ b/lib/Test/Valgrind/Carp.pm @@ -9,11 +9,11 @@ Test::Valgrind::Carp - Carp-like private methods for Test::Valgrind objects. =head1 VERSION -Version 1.11 +Version 1.12 =cut -our $VERSION = '1.11'; +our $VERSION = '1.12'; =head1 DESCRIPTION diff --git a/lib/Test/Valgrind/Command.pm b/lib/Test/Valgrind/Command.pm index 0a649d6..9e1e116 100644 --- a/lib/Test/Valgrind/Command.pm +++ b/lib/Test/Valgrind/Command.pm @@ -9,11 +9,11 @@ Test::Valgrind::Command - Base class for Test::Valgrind commands. =head1 VERSION -Version 1.11 +Version 1.12 =cut -our $VERSION = '1.11'; +our $VERSION = '1.12'; =head1 DESCRIPTION diff --git a/lib/Test/Valgrind/Command/Aggregate.pm b/lib/Test/Valgrind/Command/Aggregate.pm index aa78fd8..f7a7eae 100644 --- a/lib/Test/Valgrind/Command/Aggregate.pm +++ b/lib/Test/Valgrind/Command/Aggregate.pm @@ -9,11 +9,11 @@ Test::Valgrind::Command::Aggregate - A Test::Valgrind command that aggregates se =head1 VERSION -Version 1.11 +Version 1.12 =cut -our $VERSION = '1.11'; +our $VERSION = '1.12'; =head1 DESCRIPTION diff --git a/lib/Test/Valgrind/Command/Perl.pm b/lib/Test/Valgrind/Command/Perl.pm index 6dda0e8..1894b8d 100644 --- a/lib/Test/Valgrind/Command/Perl.pm +++ b/lib/Test/Valgrind/Command/Perl.pm @@ -9,11 +9,11 @@ Test::Valgrind::Command::Perl - A Test::Valgrind command that invokes perl. =head1 VERSION -Version 1.11 +Version 1.12 =cut -our $VERSION = '1.11'; +our $VERSION = '1.12'; =head1 DESCRIPTION diff --git a/lib/Test/Valgrind/Command/PerlScript.pm b/lib/Test/Valgrind/Command/PerlScript.pm index 331a281..a50c30f 100644 --- a/lib/Test/Valgrind/Command/PerlScript.pm +++ b/lib/Test/Valgrind/Command/PerlScript.pm @@ -9,11 +9,11 @@ Test::Valgrind::Command::PerlScript - A Test::Valgrind command that invokes a pe =head1 VERSION -Version 1.11 +Version 1.12 =cut -our $VERSION = '1.11'; +our $VERSION = '1.12'; =head1 DESCRIPTION diff --git a/lib/Test/Valgrind/Component.pm b/lib/Test/Valgrind/Component.pm index bcba447..2b790e3 100644 --- a/lib/Test/Valgrind/Component.pm +++ b/lib/Test/Valgrind/Component.pm @@ -9,11 +9,11 @@ Test::Valgrind::Component - Base class for Test::Valgrind components. =head1 VERSION -Version 1.11 +Version 1.12 =cut -our $VERSION = '1.11'; +our $VERSION = '1.12'; =head1 DESCRIPTION diff --git a/lib/Test/Valgrind/Parser.pm b/lib/Test/Valgrind/Parser.pm index 4a07478..5a8a9cd 100644 --- a/lib/Test/Valgrind/Parser.pm +++ b/lib/Test/Valgrind/Parser.pm @@ -9,11 +9,11 @@ Test::Valgrind::Parser - Base class for Test::Valgrind parsers. =head1 VERSION -Version 1.11 +Version 1.12 =cut -our $VERSION = '1.11'; +our $VERSION = '1.12'; =head1 DESCRIPTION diff --git a/lib/Test/Valgrind/Parser/Suppressions/Text.pm b/lib/Test/Valgrind/Parser/Suppressions/Text.pm index c8e6e9f..9c35155 100644 --- a/lib/Test/Valgrind/Parser/Suppressions/Text.pm +++ b/lib/Test/Valgrind/Parser/Suppressions/Text.pm @@ -9,11 +9,11 @@ Test::Valgrind::Parser::Suppressions::Text - Parse valgrind suppressions output =head1 VERSION -Version 1.11 +Version 1.12 =cut -our $VERSION = '1.11'; +our $VERSION = '1.12'; =head1 DESCRIPTION diff --git a/lib/Test/Valgrind/Parser/Text.pm b/lib/Test/Valgrind/Parser/Text.pm index f6098a7..abf4e9d 100644 --- a/lib/Test/Valgrind/Parser/Text.pm +++ b/lib/Test/Valgrind/Parser/Text.pm @@ -9,11 +9,11 @@ Test::Valgrind::Parser::Text - Parse valgrind output as a text stream. =head1 VERSION -Version 1.11 +Version 1.12 =cut -our $VERSION = '1.11'; +our $VERSION = '1.12'; =head1 DESCRIPTION diff --git a/lib/Test/Valgrind/Parser/XML.pm b/lib/Test/Valgrind/Parser/XML.pm index 4c0216f..7232203 100644 --- a/lib/Test/Valgrind/Parser/XML.pm +++ b/lib/Test/Valgrind/Parser/XML.pm @@ -9,11 +9,11 @@ Test::Valgrind::Parser::XML - Parse valgrind output as an XML stream. =head1 VERSION -Version 1.11 +Version 1.12 =cut -our $VERSION = '1.11'; +our $VERSION = '1.12'; =head1 DESCRIPTION diff --git a/lib/Test/Valgrind/Parser/XML/Twig.pm b/lib/Test/Valgrind/Parser/XML/Twig.pm index e4acb2c..8b6d29b 100644 --- a/lib/Test/Valgrind/Parser/XML/Twig.pm +++ b/lib/Test/Valgrind/Parser/XML/Twig.pm @@ -9,11 +9,11 @@ Test::Valgrind::Parser::XML::Twig - Parse valgrind XML output with XML::Twig. =head1 VERSION -Version 1.11 +Version 1.12 =cut -our $VERSION = '1.11'; +our $VERSION = '1.12'; =head1 DESCRIPTION @@ -190,7 +190,7 @@ This program is free software; you can redistribute it and/or modify it under th package Test::Valgrind::Parser::XML::Twig::Elt; -our $VERSION = '1.11'; +our $VERSION = '1.12'; BEGIN { require XML::Twig; } diff --git a/lib/Test/Valgrind/Report.pm b/lib/Test/Valgrind/Report.pm index 5bc50b0..67b6ce9 100644 --- a/lib/Test/Valgrind/Report.pm +++ b/lib/Test/Valgrind/Report.pm @@ -9,11 +9,11 @@ Test::Valgrind::Report - Base class for Test::Valgrind error reports. =head1 VERSION -Version 1.11 +Version 1.12 =cut -our $VERSION = '1.11'; +our $VERSION = '1.12'; =head1 DESCRIPTION diff --git a/lib/Test/Valgrind/Session.pm b/lib/Test/Valgrind/Session.pm index 27aa973..81f1956 100644 --- a/lib/Test/Valgrind/Session.pm +++ b/lib/Test/Valgrind/Session.pm @@ -9,11 +9,11 @@ Test::Valgrind::Session - Test::Valgrind session object. =head1 VERSION -Version 1.11 +Version 1.12 =cut -our $VERSION = '1.11'; +our $VERSION = '1.12'; =head1 DESCRIPTION diff --git a/lib/Test/Valgrind/Suppressions.pm b/lib/Test/Valgrind/Suppressions.pm index dc18782..cd59fc2 100644 --- a/lib/Test/Valgrind/Suppressions.pm +++ b/lib/Test/Valgrind/Suppressions.pm @@ -9,11 +9,11 @@ Test::Valgrind::Suppressions - Generate suppressions for given tool and command. =head1 VERSION -Version 1.11 +Version 1.12 =cut -our $VERSION = '1.11'; +our $VERSION = '1.12'; =head1 DESCRIPTION diff --git a/lib/Test/Valgrind/Tool.pm b/lib/Test/Valgrind/Tool.pm index dc7ba2f..186b75a 100644 --- a/lib/Test/Valgrind/Tool.pm +++ b/lib/Test/Valgrind/Tool.pm @@ -9,11 +9,11 @@ Test::Valgrind::Tool - Base class for Test::Valgrind tools. =head1 VERSION -Version 1.11 +Version 1.12 =cut -our $VERSION = '1.11'; +our $VERSION = '1.12'; =head1 DESCRIPTION diff --git a/lib/Test/Valgrind/Tool/memcheck.pm b/lib/Test/Valgrind/Tool/memcheck.pm index 281d3f3..2c0c684 100644 --- a/lib/Test/Valgrind/Tool/memcheck.pm +++ b/lib/Test/Valgrind/Tool/memcheck.pm @@ -9,11 +9,11 @@ Test::Valgrind::Tool::memcheck - Run an analysis through the memcheck tool. =head1 VERSION -Version 1.11 +Version 1.12 =cut -our $VERSION = '1.11'; +our $VERSION = '1.12'; =head1 DESCRIPTION @@ -161,7 +161,7 @@ package Test::Valgrind::Tool::memcheck::Report; use base qw/Test::Valgrind::Report/; -our $VERSION = '1.11'; +our $VERSION = '1.12'; my @kinds = qw/ InvalidFree