Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 11650
Status: resolved
Priority: 0/
Queue: Test-Simple

People
Owner: Nobody in particular
Requestors: to2958 [...] sbc.com
Cc:
AdminCc:

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



Subject: Test-Simple-0.54
Date: Fri, 28 Jan 2005 13:39:35 -0600
From: "ODELL, TODD E (SWBT)" <to2958 [...] sbc.com>
To: <mschwern [...] cpan.org>
Michael, I wasn't sure what mailing list you may be available on so I'm mailing you direct. I was installing the Test-Simple-0.54 and keep getting this error: Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------ ------- t/More.t 1 256 48 1 2.08% 48 4 tests and 9 subtests skipped. Failed 1/54 test scripts, 98.15% okay. 1/355 subtests failed, 99.72% okay. make: 1254-004 The error code from the last command is 11. After inserting extra cmp_ok's at different places it looks like it's the eq_array test where the $! changes, though the eq_array is successful itself. t/More.t #### the next test seems to change the $! for some reason ok( eq_array([qw(this that whatever)], [qw(this that whatever)]), 'eq_array with simple arrays' ); #### TEST remove cmp_ok( $!, '==', $Errno, '$! untouched' ); I'm just curious since the eq_array test itself is ok if not for the $! it would pass fine. I'll go ahead and use this since it seems ok. Thanks, Todd E. O'Dell Network Services ( DATA ) Room 1118 500 E. 8th Kansas City, MO 64106 Office: (816)275-3626 Alpha Page: 8162125424@archwireless.net to2958@sbc.com Rigidity and inflexibility are forever the enemy of ingenuity and creativity. -- Teodor Zlatanov
[to2958@sbc.com - Thu Feb 24 05:19:36 2005]: Show quoted text
> #### the next test seems to change the $! for some reason
There was trouble in the past with eval altering $! and $@ so I'm careful to localize them before using eval. I thought I had them all covered... can't find any which aren't. Can't imagine why eq_array() would be causing this problem. Do 0.53 and 0.53_01 work? I don't see anything obvious in the changes between 0.53 and 0.54 which could cause this. More.t was not changed. What perl version and operating system?
From: gozer [...] cpan.org
I've seen the same exact problem happen, but with eq_hash. I have not been able to fully understand what is causing this, but the errno I get is 22 "A system call received a parameter that is not valid." Attached is a simple patch to _deep_check() that localizes $! and $@ and makes the failure go away. Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=aix, osvers=5.1.0.0, archname=aix-thread-multi uname='aix rs6000v51 1 5 00058028a100 ' config_args='-ders -Dcc=cc -Dusethreads -Duseithreads -Ud_sigsetjmp -Uinstallusrbinperl -Ulocincpth= -Uloclibpth= -Dinc _version_list=5.6.0/$archname 5.6.0 -Duseshrplib -Dprefix=/home/gozer/perl/ActivePerlEE-5.6.1.638.2-aix-5.1-cc-157353 -Accf lags=-DBUILT_BY_ACTIVESTATE -Dcf_by=ActiveState -Dcf_email=support@ActiveState.com' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef
--- lib/Test/More.pm.~1~ Thu Jul 7 12:18:28 2005 +++ lib/Test/More.pm Thu Jul 7 12:18:28 2005 @@ -1170,6 +1170,9 @@ # Quiet uninitialized value warnings when comparing undefs. local $^W = 0; + local($!, $@); # don't interfere with caller's $@ + # eval sometimes resets $! + $Test->_unoverload(\$e1, \$e2); # Either they're both references or both not. End of Patch.
[guest - Thu Jul 7 17:02:09 2005]: Show quoted text
> Attached is a simple patch to _deep_check() that localizes $! and $@ > and makes the failure go away.
That's very strange because _unoverload() already has a local($!, $@) in it. What happens if you put your local($!, @$) after _unoverload? Also, can you try the alpha? I've twiddled a lot of things in and around _deep_check(), maybe the buglet went away. I'm quite sure this is a perlbug. http://search.cpan.org/dist/Test-Simple/
[MSCHWERN - Fri Jul 8 03:20:14 2005]: Show quoted text
> [guest - Thu Jul 7 17:02:09 2005]:
> > Attached is a simple patch to _deep_check() that localizes $! and $@ > > and makes the failure go away.
> > That's very strange because _unoverload() already has a local($!, $@) > in > it. What happens if you put your local($!, @$) after _unoverload?
Same thing, it makes the problem go away. Show quoted text
> Also, can you try the alpha? I've twiddled a lot of things in and > around _deep_check(), maybe the buglet went away. I'm quite sure this > is a perlbug. > http://search.cpan.org/dist/Test-Simple/
I've tried this against Test-Simple-0.61 and Test-Simple-0.62: t/More.t....1..51 ok 1 - use Text::Soundex; ok 2 - require Test::More; [...] ok 46 - The object isa Wibblemeister ok 47 - the same function ref ok 48 - the same glob ok 49 ok 50 - $@ untouched not ok 51 - $! untouched # Failed test '$! untouched' # in t/More.t at line 172. # got: 22 # expected: 42 # Looks like you failed 1 test of 51.
I believe the problem is this: $ perl -wle 'use overload; print $!' Bad file descriptor $! is reliable only after I/O failure, but there was a change in 5.10 which made it even less so. This has just been fixed with c6757210fa44035178e0a2501e1022995a42b70d An unrelated change to _unoverload() has fixed this problem. Loading overload is now done inside try() which localizes $! and $@. Any damage done to errno by loading the module is trapped.