Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JUnit don't report when segfault occure #6

Open
bleargh45 opened this issue Jan 6, 2021 · 1 comment
Open

JUnit don't report when segfault occure #6

bleargh45 opened this issue Jan 6, 2021 · 1 comment

Comments

@bleargh45
Copy link
Owner

Migrated from rt.cpan.org #91219 (status was 'open')

Requestors:

From [email protected] on 2013-12-06 16:24:53
:

cat segfault2.t
#!/usr/bin/perl

use strict;
use warnings;
use POSIX;

$|=1;
print "1..1\nok\n";
kill POSIX::SIGSEGV => $$;

Let's try test it

prove --formatter TAP::Formatter::JUnit ./segfault2.t






So we don't see a problem and think that all right.
I've pathed TAP/Formatter/JUnit/Session.pm
181a182,183

} elsif ( my $wait = $parser->wait ) {
    $die_msg = "Non-zero wait status: $wait";

after apply this patch, when we run test

prove --formatter TAP::Formatter::JUnit ./segfault2.t






@bleargh45
Copy link
Owner Author

From [email protected] on 2017-09-05 13:51:59
:

We ran into this bug, which still affects version 0.11 of TAP::Formatter::JUnit.

As the patch indicates, the problem is that the close_test method only checks $parser->exit(), which happens to return 0 for processes that don't have an exit status because they were killed by a signal. It should test $parser->wait() in the first place.

Or maybe check $parser->has_problems as a fallback.

--
Lukas Mai / Software Developer
Jochen Schweizer Technology Solutions GmbH, München
Amtsgericht München, HRB 203111
Geschäftsführer: Florian Herschke, Saad Daoud; Prokurist: Herbert Leitz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant