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>
Download (untitled) / with headers
text/plain 1.7k
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
Download d1
text/plain 3.7k

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

Download (untitled) / with headers
text/plain 445b
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.


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.