Closed haarg closed 11 years ago
D'oh!
I don't suppose you have sample test output you can cut/paste/attach?
$ perl -Ilib t/08_core.t
1..3
ok 1 - use IPC::System::Simple;
ok 2 - Signal caught, $? = 6
not ok 3 - Coredump caught, $? = 6
# Failed test 'Coredump caught, $? = 6'
# at t/08_core.t line 41.
# '"/Users/gknop/perl5/perls/v5.18.1/bin/perl" died to signal "ABRT" (6) at t/08_core.t line 37.
# '
# doesn't match '(?^:dumped core)'
# Looks like you failed 1 test of 3.
Same here, same error. I am at your disposal for test cases.
I suspect this is a consequence of #6, previously this issue wasn't visible because most people don't have BSD::Resource installed. That said, solving that bug only hides this issue to people who don't have BSD::Resource installed, it won't actually solve it.
Well, poo. How do we classify the bug here? If you're on a Mac, and it doesn't dump core because you don't have the directory, then IPC::Simple::Simple is correctly detecting there's no core-dump.
The best I can spot is that we skip the test on OSX, or we do some kind of complicated dance to figure out when core should be dumped and isn't, or vice-versa. I think we're skipping.
Anyone (@rjbs?) able to quickly grab the latest head (623f5ee) and do a dzil test
on OS X? I'm presuming that testing $^O
is sufficient, but I don't have a mac to verify on myself.
The test would basically be skip if $^O eq 'darwin' && !(-d "/cores" && -w _); So it's not all that complex, but still feels rather ugly and arbitrary. I wouldn't mind just always skipping on OS X.
Confirmed that the latest commit skips properly on OS X.
@haarg : Awesome, thank you!
Released as v1.24 to the CPAN. Thanks everyone!
On Mac OS X, core dumps are generated in the /cores directory. If the directory doesn't exist (the default) or isn't writable, no core dump is generated, and thus isn't shown in $? or ${^CHILD_ERROR_NATIVE}.