Subject: | Failing Author Test (t/core) |
Hi:
The error message for Perl crashing has inexplicably changed sometime
between 5.8.8 and 5.10.0. So, while your test works beautifully under
5.8.8, it fails under 5.10.0 with the message:
t/08_core.............1/3
# Failed test at t/08_core.t line 45.
# '"/usr/bin/perl" died to signal "ABRT" (6) at
t/08_core.t line 41
# '
# doesn't match '(?-xism:dumped core)'
# Looks like you failed 1 test of 3.
t/08_core............. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests
As you can see, the error message changed to only specify the signal,
and does not mention whether or not a core file has been dumped.
One of the Perl Packagers (Gregor Herrmann) for Debian came up with a
simple patch to this; instead of checking for the text, the idea is to
check for the actual core file. This is probably less than ideal, but it
works:
Index: t/08_core.t
===================================================================
--- t/08_core.t (revision 28282)
+++ t/08_core.t (working copy)
@@ -6,6 +6,9 @@
use constant SIGABRT => 6;
BEGIN {
+ unlink 't/core' if -f 't/core';
if (not $ENV{TEST_AUTHOR}) {
plan skip_all => 'Author test. Set $ENV{TEST_AUTHOR} to
true to run.'
}
@@ -42,5 +45,5 @@
};
like($@, qr/died to signal/);
- like($@, qr/dumped core/);
+ ok(-s 'core', 'core file exists');
}
Also pasted to http://paste.debian.net/23768/