Skip Menu |

This queue is for tickets about the Error-Base CPAN distribution.

Report information
The Basics
Id: 72046
Status: open
Priority: 0/
Queue: Error-Base

People
Owner: xiong [...] cpan.org (daily)
Requestors: xiong [...] cpan.org (daily)
Cc: ANDK [...] cpan.org
BINGOS [...] cpan.org
NHORNE [...] cpan.org
TEAM [...] cpan.org
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • v0.0.2
  • v0.0.3
Fixed in: (no value)



CC: BINGOS [...] cpan.org, ANDK [...] cpan.org, NHORNE [...] cpan.org, TEAM [...] cpan.org
Subject: smoke failure: crank() warnings unexpectedly stringify
Hi, For Error::Base, some smoke reports FAIL; under closer inspection it seems that all tests pass ok except 140-crank.t. This script performs 4 subtests; all failing platforms fail the same 2 subtests, named 'null- fuzz:should-warn-fuzzily' and 'quiet-fuzz:should-warn-fuzzily'. (The word "fuzzily" is probably a poor choice but identifies the subtests uniquely.) This test script attempts to issue a warning by invoking Error::Base- Show quoted text
>crank(), which internally calls 'warn $self' (where $self is the error
object). Stringification is overloaded on $self so normally, it will print a nice warning message to STDERR. However if the warning is caught or trapped in some way, it should be possible to examine the entire object. This is what should happen in those two "fuzzily" subtests. Test::More::explain() is used to dump the object without stringifying it. This test script passes on the majority of machines (including mine) but fails on a significant minority. There does not seem to be any clear pattern linking failing machines; they span several OSes, architectures, and perl versions. Passing and failing machines appear extremely similar in some cases. I have attempted to correct the issue by localizing my for-testing $SIG{__WARN__} handler; this does not succeed. This is the only significant change in 0.0.3. At this point, I'm tempted to drop this script from the shipping test suite. The tested method, crank(), is a very thin wrapper and nearly identical to crash(), whose corresponding test (135-crash.t) seems to pass universally. Therefore, one might reasonably infer crank() should work well. Of course, I'd rather reproduce the issue on my own machine and figure out how to resolve it. I hypothesize that failing machines are installing some sort of warning handler themselves, which interferes with the handler installed by the test script. Perhaps this is installed by the test harness? I have not been able to research a truly robust approach to trapping warnings. XIONG