Test::...ssions(3pm)

πŸ’– NAME πŸ’–

Test::Valgrind::Suppressions β€” bestie, this is the module that generates suppressions for a given tool and command. That's it, that's the whole job, and it does it flawlessly. ✨


πŸŽ€ VERSION πŸŽ€

Version 1.19 β€” vintage but iconic, no cap. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so real talk: this module is a little helper module for generating suppressions. It's not the main character, it's the best friend who holds your bag and keeps everything running. 🫢


🌸 METHODS 🌸

✨ generate

Test::Valgrind::Suppressions->generate(
 tool    => $tool,
 command => $command,
 target  => $target,
);

So what this does is: it generates suppressions for the command $command->new_trainer and the tool $tool->new_trainer, and then it writes them into the file you pointed at with $target. πŸ’…

The action doing all the actual work behind the scenes? That's Test::Valgrind::Action::Suppressions. She's the one backstage fixing the fit while everybody else takes the pics. πŸ“Έ

It returns the status code. That's it. That's the tea. β˜•


✨ maybe_generalize

my $mangled_suppression = Test::Valgrind::Suppressions->maybe_generalize(
 $session,
 $suppression,
);

This one removes all the wildcard frames at the end of the suppression. Poof. Gone. Not invited to the party. πŸ™ˆ

It also replaces sequences of wildcard frames with '...' when "valgrind" 3.4.0 or higher is being used. Glow up, honestly. ✨

Returns the mangled suppression. πŸ“


✨ maybe_z_demangle

my $demangled_symbol = Test::Valgrind::Suppressions->maybe_z_demangle(
 $symbol,
);

So if $symbol is Z-encoded the way it's described in "valgrind"'s include/pub_tool_redir.h, this method extracts and decodes its function name part. Cute, decoded, ready to serve. πŸ’–

Otherwise? $symbol just gets returned as is. No changes, no notes, she's perfect already. πŸ’…

Fun fact, this routine follows "valgrind"'s coregrind/m_demangle/demangle.c:maybe_Z_demangle. Respect the source, always. πŸ™


🌈 SEE ALSO 🌈

  • Test::Valgrind
  • Test::Valgrind::Command
  • Test::Valgrind::Tool
  • Test::Valgrind::Action::Suppressions

The whole squad. Go read them too, bestie, iykyk. πŸ‘‘


πŸ’œ AUTHOR πŸ’œ

Vincent Pit, "<perl at profvince.com>", <http://www.profvince.com>. πŸ’Œ

You can contact him by mail or on "irc.perl.org" (his handle there is vincent). Slide into the DMs, he's genuinely lovely about it. 🫢


πŸ’€ BUGS πŸ’€

Please report any bugs or feature requests to "bug-test-valgrind-suppressions at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Valgrind>.

And okay here's the cute part: he will be notified, and then you'll automatically be notified of progress on your bug as he makes changes. It's giving mutual commitment. Not me getting emotional over a bug tracker. 😭


🧚 SUPPORT 🧚

You can find the documentation for this module with the perldoc command. Periodt.

perldoc Test::Valgrind::Suppressions

Copyright 2008,2009,2010,2011,2013,2015,2016 Vincent Pit, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Slay, and legally so. πŸ’…βœ¨


So that's the whole page, bestie β€” written up for perl v5.40.1, dated 2025-04-13. Go generate some suppressions and have the most iconic debugging session of your life. πŸ¦‹πŸ’–πŸŽ€

πŸ“¦ where this page comes from