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: 122530
Status: open
Priority: 0/
Queue: Test-Simple

People
Owner: Nobody in particular
Requestors: zefram [...] fysh.org
Cc:
AdminCc:

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



Subject: unreleased contexts on 5.13
Date: Tue, 18 Jul 2017 20:46:08 +0100
To: bug-Test-Simple [...] rt.cpan.org
From: Zefram <zefram [...] fysh.org>
Test-Simple has a problem with unreleased contexts on some 5.13 Perl versions. The attached patch renders it as workable as possible. As with the 5.19 constant subs thing, this enables testing of other modules across interesting Perl versions. The problem is that Test-Simple is relying on $@ during unwinding as an indicator of whether unwinding is due to an exception. (This was never actually a reliable mechanism, always subject to false positives.) In Perl 5.13.1 I changed the core to set $@ after unwinding, rather than before, to fix the problem of destructors clobbering $@. This had the side effect of destroying what value $@ had as such an indicator. Because some modules turned out to be relying on that, and we didn't have any proper way of introspecting the cause of unwinding, in Perl 5.13.8 I changed the core again, to set $@ both before and after unwinding. That restores $@'s use as an unreliable indicator of unwinding reason, as a temporary measure until we have proper introspection, while retaining the resistance to clobbering by destructors. So on Perl 5.13.<1-7> Test-Simple's check of the unwinding reason doesn't work, and there isn't any other way to get that information. Fortunately it only controls a warning, about unreleased contexts. I therefore think that on these Perl versions the warning should simply be suppressed entirely. That's losing a feature that was of some value, but it's not a critical feature, and anyone who's failing to release a context will presumably notice it when testing on other Perl versions. The attached patch does so, skipping the tests for warnings being generated on the affected Perls. I couldn't figure out how to properly skip tests in one of the test scripts (context()->skip() errored); maybe you can improve on my fakery. -zefram

Message body is not shown because sender requested not to inline it.

Show quoted text
> I therefore think that on these Perl versions the warning should simply > be suppressed entirely. That's losing a feature that was of some value, > but it's not a critical feature, and anyone who's failing to release a > context will presumably notice it when testing on other Perl versions.
I agree, Once I have a free moment I will happily merge this, I am at least a week out on that though. I will also look into the test in question.