Skip Menu |

This queue is for tickets about the TAPx-Parser CPAN distribution.

Report information
The Basics
Id: 21624
Status: resolved
Priority: 0/
Queue: TAPx-Parser

People
Owner: ovid [...] cpan.org
Requestors: link [...] redbrick.dcu.ie
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.32
Fixed in: (no value)



Subject: t\10-regression.t - segfault (kill portability issue)
The segfault regression test fails on windows as kill behaves differently on windows. (from perlport) kill kill(0, LIST) is implemented for the sake of taint checking; use with other signals is unimplemented. (Mac OS) Not implemented, hence not useful for taint checking. (RISC OS) kill() doesn't have the semantics of raise() , i.e. it doesn't send a signal to the identified process like it does on Unix platforms. Instead kill($sig, $pid) terminates the process identified by $pid, and makes it exit immediately with exit status $sig. As in Unix, if $sig is 0 and the specified process exists, it returns true without actually terminating it. (Win32) C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/00-load.................ok t/10-regression...........dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 1612 Failed 1/2613 tests, 99.96% okay t/20-parse................ok t/30-bailout..............ok t/40-errors...............ok t/50-streams..............ok t/60-aggregator...........ok t/70-callbacks............ok t/80-premature-bailout....ok t/90-iterators............ok t/pod-coverage............skipped all skipped: Test::Pod::Coverage 1.04 required for testing POD coverage t/pod.....................skipped all skipped: Test::Pod 1.14 required for testing POD Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/10-regression.t 1 256 2613 1 0.04% 1612 2 tests skipped. # Testing TAPx::Parser 0.33, Perl 5.008008, C:\Perl\bin\perl.exe # Failed test '... and exit should equal 0' # in t/10-regression.t at line 2310. # got: '11' # expected: '0' # Looks like you failed 1 test of 2613. Failed 1/12 test scripts, 91.67% okay. 1/3044 subtests failed, 99.97% okay. dmake: Error code 255, while making 'test_dynamic'
From: MSCHWERN [...] cpan.org
This seems to come from the t/sample-tests/segfault sample test. This appears to have been copied over from Test::Harness. Test::Harness does not run this test, probably because of exactly the portability issues you're encountering. So one way to deal with this is to simply not run the test. That's what Test::Harness does. Another way is to put in the appropriate "do not run on these operating systems" logic. But looking at the test, its not clear what benefit there is to this test. Neither Test::Harness nor TAPx::Parser should treat a segfault any differently than a die or an abnormal exit. The various "die" sample tests should be sufficient. If you want to simulate a segfault you could exit with 11 but as the entire concept of a segfault only exists on Unix I'm not sure what this is buying you. Recommendation: Delete the test, its not testing anything new and not worth the portability headache.
Following the feedback on this ticket from Schwern, I believe this issue is now resolved. Further, ActiveState's build process shows all tests passing for TAPx::Parser on Windows (http://ppm.activestate.com/BuildStatus/5.8-windows/windows-5.8/TAPx-Parser-0.41.txt), lending credence to this. Please do not respond to this email unless there is a problem as this will automatically re-open the ticket. If you have any other questions or concerns, feel free to email me directly. Cheers, Ovid