Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BBC: Blead Breaks Test::Strict #20252

Closed
cjg-cguevara opened this issue Sep 5, 2022 · 4 comments
Closed

BBC: Blead Breaks Test::Strict #20252

cjg-cguevara opened this issue Sep 5, 2022 · 4 comments
Labels
BBC Blead Breaks CPAN - changes in blead broke a cpan module(s) Not a Release Blocker

Comments

@cjg-cguevara
Copy link

This is a bug report for perl from "Carlos Guevara" carlos@carlosguevara.com,
generated with the help of perlbug 1.42 running under perl 5.37.4.


[Please describe your issue here]

BBC: Blead Breaks Test::Strict

Please see http://matrix.cpantesters.org/?dist=Test::Strict

[Please do not change anything below this line]


Flags:
category=core
severity=low

Site configuration information for perl 5.37.4:

Configured by cpan at Sun Sep 4 21:56:55 EDT 2022.

Summary of my perl5 (revision 5 version 37 subversion 4) configuration:
Commit id: 202773e
Platform:
osname=linux
osvers=5.15.63-0-lts
archname=x86_64-linux
uname='linux cjg-alpine3 5.15.63-0-lts #1-alpine smp mon, 29 aug 2022 07:17:28 +0000 x86_64 linux '
config_args='-des -Dprefix=/bin/perl-blead -Dscriptdir=/bin/perl-blead/bin -Dusedevel -Duse64bitall'
hint=recommended
useposix=true
d_sigaction=define
useithreads=undef
usemultiplicity=undef
use64bitint=define
use64bitall=define
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
Compiler:
cc='cc'
ccflags ='-D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
optimize='-O2'
cppflags='-D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong'
ccversion=''
gccversion='11.2.1 20220219'
gccosandvers=''
intsize=4
longsize=8
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=16
longdblkind=3
ivtype='long'
ivsize=8
nvtype='double'
nvsize=8
Off_t='off_t'
lseeksize=8
alignbytes=8
prototype=define
Linker and Libraries:
ld='cc'
ldflags =' -fstack-protector-strong -L/usr/local/lib'
libpth=/usr/lib /usr/local/lib /lib
libs=-lpthread -ldb -ldl -lm -lcrypt -lutil -lc
perllibs=-lpthread -ldl -lm -lcrypt -lutil -lc
libc=/usr/lib/libc.a
so=so
useshrplib=false
libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs
dlext=so
d_dlsymun=undef
ccdlflags='-Wl,-E'
cccdlflags='-fPIC'
lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'


@inc for perl 5.37.4:
/home/cpan/bin/perl-blead/lib/site_perl/5.37.4/x86_64-linux
/home/cpan/bin/perl-blead/lib/site_perl/5.37.4
/home/cpan/bin/perl-blead/lib/5.37.4/x86_64-linux
/home/cpan/bin/perl-blead/lib/5.37.4


Environment for perl 5.37.4:
HOME=/home/cpan
LANG=C.UTF-8
LANGUAGE (unset)
LC_COLLATE=C
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/cpan/bin/perl-blead/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PERL_BADLANG (unset)
SHELL=/bin/bash

@demerphq
Copy link
Collaborator

demerphq commented Sep 5, 2022

Pretty sure this is related to fixing up the rules for what happens with exit in BEGIN.

The module is testing what happens if it compiles with -c a program like this:

#!/usr/bin/perl -vw
use strict;
print "Hello world";

in previous perls we would fire INIT blocks even though we had done an exit() in the begin that implements -v. This no longer happens, and this program no longer does a compile test. This is not a bug. The test should be changed to remove the -v.

@jkeenan jkeenan added the BBC Blead Breaks CPAN - changes in blead broke a cpan module(s) label Sep 5, 2022
@jkeenan
Copy link
Contributor

jkeenan commented Sep 5, 2022

Bisection points to this commit:

197bb3f4412b47e2f91dcf54c64d12d9fd05967b is the first bad commit
commit 197bb3f4412b47e2f91dcf54c64d12d9fd05967b
Author: Yves Orton <demerphq@gmail.com>
Date:   Mon Aug 29 13:25:56 2022 +0200
Commit:     Yves Orton <demerphq@gmail.com>
CommitDate: Sat Sep 3 10:05:54 2022 +0200


    Revert "postpone perl_parse() exit(0) bugfix"
    
    This reverts commit 857320cbf85e762add18885ae8a197b5e0c21b69.

Also reported upstream as manwar/Test-Strict#32.

jkeenan added a commit to jkeenan/Test-Strict that referenced this issue Jan 14, 2023
Up through perl-5.37.3, there was a bug in perl (see
Perl/perl5#20252 (comment))
which permitted simultaneous use of the '-c' and '-v' switches to the
perl interpreter.  Once this bug was corrected, t/01all.t began to fail.
As Test::Strict has many CPAN distributions depending on it, this test
failure has had wide impact.

This pull request modifies tests appropriately and has been tested on
bleadperl (v5.37.7-134-g25948dfb24) and on perl-5.32.1, in both cases on
threaded builds on FreeBSD-12.  Devel::Cover was not installed on
bleadperl, hence t/04cover.t was skipped on that build.  Otherwise, all
tests are passing.  In the course of testing, certain additions were
made to .gitignore and MANIFEST.SKIP to get metadata-oriented tests to
pass.

NOTE:  In my git checkout I find the following file:

        .git/hooksfsmonitor-watchman.sample

This is deemed by 'file' to be a Perl executable.  As such, it is pushed
onto the list of files tested by 'all_perl_files_ok()' at the start of
t/01all.t.  This in turn means that in my 'git checkout' the count of
tests is off by 2 and the test is reported to fail.

        "Looks like you planned 59 tests but ran 61."

Because the files in .git/hooks/ should not be included in the tarball,
the count of tests is correct when run from the tarball.  I leave to the
maintainer to determine how to square this circle.  You should probably
check for the presence of a .git/ directory and exclude that directory
from the list of directories passed to all_perl_files_ok().

For manwar#32
@jkeenan
Copy link
Contributor

jkeenan commented Jan 14, 2023

Pull request submitted upstream at manwar/Test-Strict#33.

@jkeenan
Copy link
Contributor

jkeenan commented Jul 29, 2024

This was fixed upstream with the release of Test-Strict-0.54.

@jkeenan jkeenan closed this as completed Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BBC Blead Breaks CPAN - changes in blead broke a cpan module(s) Not a Release Blocker
Projects
None yet
Development

No branches or pull requests

4 participants