Open rainerjung opened 4 years ago
I used the following patch to fix this:
--- test/run_tests.pl 2020-07-02 14:45:19.000000000 +0200
+++ test/run_tests.pl 2020-07-07 13:43:57.710565760 +0200
@@ -128,7 +128,8 @@
$eres = eval {
package TAP::Parser::OpenSSL;
- use parent 'TAP::Parser';
+ use parent -norequire, 'TAP::Parser';
+ require TAP::Parser;
sub new {
my $class = shift;
@@ -212,7 +213,8 @@
}
package TAP::Harness::OpenSSL;
- use parent 'TAP::Harness';
+ use parent -norequire, 'TAP::Harness';
+ require TAP::Harness;
package main;
It may look strange, but the docs for parent.pm show, that without the "-norequire" it puts the require statement in a BGIN block which probably runs before the eval, to the loading is no longer encapsulated by the eval. Without the additional require line, the loading doesn't happen at all, so the availability testing fails. Combining the "-norequire" and an explicit "require" worked for me. Tested only on the platform that showed the original problem (SLES 11).
@levitte
@rainerjung, that looks perfect. Are you willing to make that a PR?
Yes of course, but because it is IMHO a trivial change, I wouldn't mind you simply picking it up. No need for credits or similar.
Marking as inactive to be closed at the end of 3.4 dev, barring further input
Though an eval construct is used, the new run_tests.pl bombs without TAP::Parser or TAP::Harness:
Can't locate TAP/Parser.pm in @INC (@INC contains: /path/to/bld/openssl300/test/../util/perl /path/to/local/perl/lib/perl5 /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl .) at /path/to/local/perl/lib/perl5/parent.pm line 20. BEGIN failed--compilation aborted at /path/to/bld/openssl300/test/run_tests.pl line 131.
and
Can't locate TAP/Harness.pm in @INC (@INC contains: /path/to/bld/openssl300/test/../util/perl /path/to/local/perl/lib/perl5 /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl .) at /path/to/local/perl/lib/perl5/parent.pm line 20. BEGIN failed--compilation aborted at /path/to/bld/openssl300/test/run_tests.pl line 215.
In OpenSSL 1.1.1 the script has an effective workaround to fall back to Test::Harness, if TAP::Harness is not available. That code has substantially changed, bit it seems it should still fall back but doesn't.
If this new requirement is intended, it should be documented in NOTES.PERL.
Observed on SuSE Linux Enterprise Server 11 (SLES11).