Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Perl: porters

[perl #112750] tests fail if PERL_JSON_BACKEND env var set

 

 

Perl porters RSS feed   Index | Next | Previous | View Threaded


perlbug-followup at perl

May 3, 2012, 7:28 PM

Post #1 of 6 (129 views)
Permalink
[perl #112750] tests fail if PERL_JSON_BACKEND env var set

# New Ticket Created by Ricardo SIGNES
# Please include the string: [perl #112750]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=112750 >



This is a bug report for perl from rjbs [at] cpan,
generated with the help of perlbug 1.39 running under perl 5.15.9.


-----------------------------------------------------------------
[Please describe your issue here]

On any(?) platform, if PERL_JSON_BACKEND or PERL_YAML_BACKEND is set, the
core tests will fail when trying parse CPAN metafiles. This env var may
be set for other reasons, unbeknownst to the user, and we should be clearing
it during testing or at least alerting the user to unset it before building.

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=high
---
Site configuration information for perl 5.15.9:

Configured by rjbs at Tue Mar 20 15:40:48 EDT 2012.

Summary of my perl5 (revision 5 version 15 subversion 9) configuration:

Platform:
osname=darwin, osvers=11.3.0, archname=darwin-2level
uname='darwin walrus.local 11.3.0 darwin kernel version 11.3.0: thu jan 12 18:47:41 pst 2012; root:xnu-1699.24.23~1release_x86_64 x86_64 '
config_args='-de -Dprefix=/Users/rjbs/perl5/perlbrew/perls/15.9 -Dusedevel'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include',
optimize='-O3',
cppflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include'
ccversion='', gccversion='4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-protector -L/usr/local/lib -L/opt/local/lib'
libpth=/usr/local/lib /opt/local/lib /usr/lib
libs=-lgdbm -ldbm -ldl -lm -lutil -lc
perllibs=-ldl -lm -lutil -lc
libc=, so=dylib, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -L/opt/local/lib -fstack-protector'

Locally applied patches:


---
@INC for perl 5.15.9:
/Users/rjbs/.perlbrew/libs/15.9 [at] st/lib/perl5/darwin-2level
/Users/rjbs/.perlbrew/libs/15.9 [at] st/lib/perl5/darwin-2level
/Users/rjbs/.perlbrew/libs/15.9 [at] st/lib/perl5
/Users/rjbs/perl5/perlbrew/perls/15.9/lib/site_perl/5.15.9/darwin-2level
/Users/rjbs/perl5/perlbrew/perls/15.9/lib/site_perl/5.15.9
/Users/rjbs/perl5/perlbrew/perls/15.9/lib/5.15.9/darwin-2level
/Users/rjbs/perl5/perlbrew/perls/15.9/lib/5.15.9
.

---
Environment for perl 5.15.9:
DYLD_LIBRARY_PATH (unset)
HOME=/Users/rjbs
LANG=en_US.UTF-8
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/Users/rjbs/.perlbrew/libs/15.9 [at] st/bin:/Users/rjbs/perl5/perlbrew/bin:/Users/rjbs/perl5/perlbrew/perls/15.9/bin:/Users/rjbs/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin:/Users/rjbs/code/hla
PERL5LIB=/Users/rjbs/.perlbrew/libs/15.9 [at] st/lib/perl5/darwin-2level:/Users/rjbs/.perlbrew/libs/15.9 [at] st/lib/perl5
PERLBREW_BASHRC_VERSION=0.41
PERLBREW_HOME=/Users/rjbs/.perlbrew
PERLBREW_LIB=std
PERLBREW_MANPATH=/Users/rjbs/.perlbrew/libs/15.9 [at] st/man:/Users/rjbs/perl5/perlbrew/perls/15.9/man
PERLBREW_PATH=/Users/rjbs/.perlbrew/libs/15.9 [at] st/bin:/Users/rjbs/perl5/perlbrew/bin:/Users/rjbs/perl5/perlbrew/perls/15.9/bin
PERLBREW_PERL=15.9
PERLBREW_ROOT=/Users/rjbs/perl5/perlbrew
PERLBREW_VERSION=0.41
PERLDOC=-n/opt/local/bin/groff
PERL_AUTOINSTALL=--skipdeps
PERL_BADLANG (unset)
PERL_LOCAL_LIB_ROOT=/Users/rjbs/.perlbrew/libs/15.9 [at] st
PERL_MB_OPT=--install_base /Users/rjbs/.perlbrew/libs/15.9 [at] st
PERL_MM_OPT=INSTALL_BASE=/Users/rjbs/.perlbrew/libs/15.9 [at] st
SHELL=/opt/local/bin/zsh


xdaveg at gmail

May 4, 2012, 4:15 AM

Post #2 of 6 (121 views)
Permalink
Re: [perl #112750] tests fail if PERL_JSON_BACKEND env var set [In reply to]

On Thu, May 3, 2012 at 10:28 PM, Ricardo SIGNES
<perlbug-followup [at] perl> wrote:
> On any(?) platform, if PERL_JSON_BACKEND or PERL_YAML_BACKEND is set, the
> core tests will fail when trying parse CPAN metafiles.  This env var may
> be set for other reasons, unbeknownst to the user, and we should be clearing
> it during testing or at least alerting the user to unset it before building.

Which tests for which modules? I've already been whacking away at
localizing those during most testing where it matters, but it may have
been after the code freeze.

-- David


xdaveg at gmail

May 4, 2012, 7:05 AM

Post #3 of 6 (123 views)
Permalink
Re: [perl #112750] tests fail if PERL_JSON_BACKEND env var set [In reply to]

On Fri, May 4, 2012 at 7:15 AM, David Golden <xdaveg [at] gmail> wrote:
> On Thu, May 3, 2012 at 10:28 PM, Ricardo SIGNES
> <perlbug-followup [at] perl> wrote:
>> On any(?) platform, if PERL_JSON_BACKEND or PERL_YAML_BACKEND is set, the
>> core tests will fail when trying parse CPAN metafiles.  This env var may
>> be set for other reasons, unbeknownst to the user, and we should be clearing
>> it during testing or at least alerting the user to unset it before building.
>
> Which tests for which modules?  I've already been whacking away at
> localizing those during most testing where it matters, but it may have
> been after the code freeze.

c.f. https://metacpan.org/diff/release/DAGOLDEN/Parse-CPAN-Meta-1.4402/DAGOLDEN/Parse-CPAN-Meta-1.4404

A more aggressive option would be to modify Parse::CPAN::Meta itself
(the .pm) to ignore PERL_(YAML|JSON)_BACKEND if PERL_CORE is set.
That's a little gross, since it leaves a perl compile-time env
variable test in the final code, but it would be a single point to
bypass those issues entirely.


nick at ccl4

May 4, 2012, 7:47 AM

Post #4 of 6 (128 views)
Permalink
Re: [perl #112750] tests fail if PERL_JSON_BACKEND env var set [In reply to]

On Fri, May 04, 2012 at 10:05:34AM -0400, David Golden wrote:

> c.f. https://metacpan.org/diff/release/DAGOLDEN/Parse-CPAN-Meta-1.4402/DAGOLDEN/Parse-CPAN-Meta-1.4404
>
> A more aggressive option would be to modify Parse::CPAN::Meta itself
> (the .pm) to ignore PERL_(YAML|JSON)_BACKEND if PERL_CORE is set.
> That's a little gross, since it leaves a perl compile-time env
> variable test in the final code, but it would be a single point to
> bypass those issues entirely.

Maybe better to add them to this bit of t/TEST (line 94 onwards) which zaps
environment variables:

# delete env vars that may influence the results
# but allow override via *_TEST env var if wanted
# (e.g. PERL5OPT_TEST=-d:NYTProf)
for my $envname (qw(PERL5LIB PERLLIB PERL5OPT)) {
my $override = $ENV{"${envname}_TEST"};
if (defined $override) {
warn "$0: $envname=$override\n";
$ENV{$envname} = $override;
}
else {
delete $ENV{$envname};
}
}


That code is also run by t/harness

Nicholas Clark


perlbug-followup at perl

May 4, 2012, 10:38 AM

Post #5 of 6 (119 views)
Permalink
[perl #112750] tests fail if PERL_JSON_BACKEND env var set [In reply to]

On Fri May 04 09:54:42 2012, sprout wrote:
> Fixed in commit b664668356.

...but we're not done thinking about what Nick suggested.


---
via perlbug: queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=112750


perlbug-followup at perl

May 4, 2012, 10:54 AM

Post #6 of 6 (136 views)
Permalink
[perl #112750] tests fail if PERL_JSON_BACKEND env var set [In reply to]

On Fri May 04 10:38:49 2012, rjbs wrote:
> On Fri May 04 09:54:42 2012, sprout wrote:
> > Fixed in commit b664668356.
>
> ...but we're not done thinking about what Nick suggested.

Apparently the bugfix that went in isn't the one we talked about, it's the better one that Nick
suggested. Fantastic!

---
via perlbug: queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=112750

Perl porters RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.