Skip Menu |
 

This queue is for tickets about the Socket CPAN distribution.

Report information
The Basics
Id: 123436
Status: resolved
Priority: 0/
Queue: Socket

People
Owner: Nobody in particular
Requestors: ilmari+cpan [...] ilmari.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.025

Attachments
0001-Print-to-STDERR-on-socketpair-test-failures.patch



Subject: [PATCH] Print $! to STDERR on socketpair test failures
Download (untitled) / with headers
text/plain 246b
t/socketpair.t is failing on Cygwin before 5.20, but CPANtesters is not giving much clue to what the failure is, because the diagnostic only goes to stdout. The attached patch makes all the diagnostic prints of $! go to STDERR instead. - ilmari
Subject: 0001-Print-to-STDERR-on-socketpair-test-failures.patch
From 41fc69f006f36e75ee5d7c728733254c0324db96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilmari@ilmari.org> Date: Sat, 28 Oct 2017 15:59:42 +0100 Subject: [PATCH 1/2] Print $! to STDERR on socketpair test failures So it shows up even in non-verbose test output. --- t/socketpair.t | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/socketpair.t b/t/socketpair.t index 823306e..cb11e26 100644 --- a/t/socketpair.t +++ b/t/socketpair.t @@ -83,7 +83,7 @@ $SIG{ALRM} = sub {die "Unexpected alarm during testing"}; ok (socketpair (LEFT, RIGHT, AF_UNIX, SOCK_STREAM, PF_UNSPEC), "socketpair (LEFT, RIGHT, AF_UNIX, SOCK_STREAM, PF_UNSPEC)") - or print "# \$\! = $!\n"; + or print STDERR "# \$\! = $!\n"; if ($has_perlio) { binmode(LEFT, ":bytes"); @@ -148,7 +148,7 @@ $SIG{PIPE} = 'IGNORE'; # should help $! = $err; ok (($!{EPIPE} or $!{ESHUTDOWN}), '$! should be EPIPE or ESHUTDOWN') - or printf "\$\!=%d(%s)\n", $err, $err; + or printf STDERR "# \$\! = %d (%s)\n", $err, $err; } my @gripping = (chr 255, chr 127); @@ -178,7 +178,7 @@ SKIP: { ok (socketpair (LEFT, RIGHT, AF_UNIX, SOCK_DGRAM, PF_UNSPEC), "socketpair (LEFT, RIGHT, AF_UNIX, SOCK_DGRAM, PF_UNSPEC)") - or print "# \$\! = $!\n"; + or print STDERR "# \$\! = $!\n"; if ($has_perlio) { binmode(LEFT, ":bytes"); -- 2.7.4
Download (untitled) / with headers
text/plain 160b
On Sat Oct 28 11:16:06 2017, ilmari wrote: Show quoted text
> The attached patch makes all the diagnostic prints of $! go to STDERR > instead.
Thanks, applied. -- Paul Evans
Released in 2.025 -- Paul Evans


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.