X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=README;fp=README;h=e39dbd5e696ffb3f1e1f601114f351006bd29bda;hb=a456fae6c2fb9c8f449131634e12df99a085e986;hp=10e0c557bfaf13520d9108514d06eb5463266515;hpb=8d66aa098b18f8c9724b12bf446d330905122c57;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/README b/README index 10e0c55..e39dbd5 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ NAME Test::Valgrind - Test Perl code through valgrind. VERSION - Version 0.04 + Version 0.05 SYNOPSIS use Test::More; @@ -24,30 +24,55 @@ DESCRIPTION perl -MTest::Valgrind leaky.pl + 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 + cycles. However, it can track leaks of chunks of memory allocated in XS + extensions with "Newx" and friends or "malloc". As such, it's + complementary to the other very good leak detectors listed in the "SEE + ALSO" section. + CONFIGURATION You can pass parameters to "import" as a list of key / value pairs, where valid keys are : - "supp => $file" + * "supp => $file" + Also use suppressions from $file besides perl's. - "no_supp => $bool" + * "no_supp => $bool" + If true, do not use any suppressions. - "callers => $number" + * "callers => $number" + Specify the maximum stack depth studied when valgrind encounters an - error. Raising this number improves granularity. Default is 50. + error. Raising this number improves granularity. Default is 12. + + * "extra => [ @args ]" - "extra => [ @args ]" Add @args to valgrind parameters. - "diag => $bool" + * "diag => $bool" + If true, print the raw output of valgrind as diagnostics (may be quite verbose). - "no_test => $bool" + * "no_test => $bool" + If true, do not actually output the plan and the tests results. + * "cb => sub { my ($val, $name) = @_; ...; return $passed }" + + Specifies a subroutine to execute for each test instead of + "Test::More::is". It receives the number of bytes leaked in $_[0] + and the test name in $_[1], and is expected to return true if the + test passed and false otherwise. Defaults to + + sub { + is($_[0], 0, $_[1]); + (defined $_[0] and $_[0] == 0) : 1 : 0 + } + CAVEATS You can't use this module to test code given by the "-e" command-line switch. @@ -69,6 +94,9 @@ DEPENDENCIES Perl::Destruct::Level. +SEE ALSO + Devel::Leak, Devel::LeakTrace, Devel::LeakTrace::Fast. + AUTHOR Vincent Pit, "", .