Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-TCP CPAN distribution.

Report information
The Basics
Id: 72779
Status: resolved
Priority: 0/
Queue: Test-TCP

People
Owner: Nobody in particular
Requestors: w.phillip.moore [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.13
Fixed in: (no value)



Subject: t/05_sigint.t fails on AIX 6 for 5.10, 5.12 and 5.14
I have just built Test-TCP-1.13 on the following platform and perl combinations: Platforms: 32 and 64 bit RHEL 5, Solaris 10, and AIX 6 Perls: 5.10.1, 5.12.4, 5.14.2 The test suite passes for RHEL5 and Solaris 10, but fails on AIX 6. The results are independent of the core perl version. The test failure output is: [efsops@shou18l560-02 Test-TCP-1.13]$ perl -Mblib t/05_sigint.t 1..2 ok 1 not ok 2 - sigint # Failed test 'sigint' # at t/05_sigint.t line 20. # got: 'ZERO' # expected: 'INT' # Looks like you failed 1 test of 2. The reason for the failure is somewhat subtle. On AIX, the value assigned to $? by wiatpid can not be passed to the POSIX functions. However, if the ${^CHILD_ERROR_NATIVE} value is used, then this works fine, and on ALL of the above platforms. While the root cause of this problem is likely a bug in perl related to how $? is handled internally, the patch I've provided seems correct when you consider that the documentation for CHILD_ERROR_NATIVE specifically documents THIS variable (and not $?/$CHILD_ERROR) as the one to pass to the POSIX functions. I suspect that passing $? works for backwards compatibility, but clearly, it doesn't work on ALL platforms, and the core perl tests seem to reflect this as well.
Subject: Test-TCP-1.13-child_error_native.patch
diff -rc ../Test-TCP-1.13-orig/t/05_sigint.t ./t/05_sigint.t *** ../Test-TCP-1.13-orig/t/05_sigint.t Wed Mar 2 19:40:07 2011 --- ./t/05_sigint.t Mon Nov 28 09:16:04 2011 *************** *** 16,23 **** sleep 1; kill 'INT', $pid; waitpid($pid, 0); ! ok POSIX::WIFSIGNALED($?); ! is [split / /, $Config{sig_name}]->[POSIX::WTERMSIG($?)], 'INT', "sigint"; # ok $killed_server, "really killed"; } elsif ($pid == 0) { # $SIG{CHLD} = sub { --- 16,23 ---- sleep 1; kill 'INT', $pid; waitpid($pid, 0); ! ok POSIX::WIFSIGNALED(${^CHILD_ERROR_NATIVE}); ! is [split / /, $Config{sig_name}]->[POSIX::WTERMSIG(${^CHILD_ERROR_NATIVE})], 'INT', "sigint"; # ok $killed_server, "really killed"; } elsif ($pid == 0) { # $SIG{CHLD} = sub {
This issue was fixed at 1.14, maybe.
I'm getting this issue now on CentOS 7 for 5.20, but only when the tests are run by our Jenkins process. When I run them manually on the same box, same build, same user, it works. Could it be that something is different when the test is run unattended (no TTY?)?
I’m having this problem in Perl 5.8.8 on OS X 10.12.6. But not on 5.16.1 or 5.24.3 on the same box.