Skip Menu |
Report information
Id: 127533
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: tomhukins <tom [at] eborcom.com>
Cc:
AdminCc:

Operating System: freebsd
PatchStatus: (no value)
Severity: low
Type:
Perl Version: 5.20.3
Fixed In: (no value)

Attachments
0001-Handle-FreeBSD-jails-that-lack-SysV-IPC-support.patch
0001-perl-127533-only-test-semctl-if-we-have-everything-n.patch



Date: Sat, 13 Feb 2016 14:46:18 +0000
To: perlbug [...] perl.org
Subject: [PATCH] Fix tests in a FreeBSD jail
From: tom [...] eborcom.com
Download (untitled) / with headers
text/plain 4.1k
This is a bug report for perl from tom@eborcom.com, generated with the help of perlbug 1.40 running under perl 5.20.3. ----------------------------------------------------------------- [Please describe your issue here] This patch fixes a test failure in a FreeBSD jail that lacks SysV IPC support. [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=low Type=Patch PatchStatus=HasPatch --- Site configuration information for perl 5.20.3: Configured by perl at Sat Sep 12 19:09:14 UTC 2015. Summary of my perl5 (revision 5 version 20 subversion 3) configuration: Platform: osname=freebsd, osvers=9.3-release-p26, archname=amd64-freebsd-thread-multi uname='freebsd 93amd64-default-job-12 9.3-release-p26 freebsd 9.3-release-p26 amd64 ' config_args='-sde -Dprefix=/usr/local -Dlibperl=libperl.so.5.20.3 -Darchlib=/usr/local/lib/perl5/5.20/mach -Dprivlib=/usr/local/lib/perl5/5.20 -Dman3dir=/usr/local/lib/perl5/5.20/perl/man/man3 -Dman1dir=/usr/local/lib/perl5/5.20/perl/man/man1 -Dsitearch=/usr/local/lib/perl5/site_perl/mach/5.20 -Dsitelib=/usr/local/lib/perl5/site_perl -Dscriptdir=/usr/local/bin -Dsiteman3dir=/usr/local/lib/perl5/site_perl/man/man3 -Dsiteman1dir=/usr/local/lib/perl5/site_perl/man/man1 -Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dusenm=n -Dcc=cc -Duseshrplib -Dinc_version_list=none -Dcf_by=perl -Dcf_email=perl@FreeBSD.org -Dcf_time=Sat Sep 12 19:09:14 UTC 2015 -Alddlflags=-L/wrkdirs/usr/ports/lang/perl5.20/work/perl-5.20.3 -L/usr/local/lib/perl5/5.20/mach/CORE -Wl,-rpath=/usr/local/lib/perl5/5.20/mach/CORE -lperl -Dshrpldflags=$(LDDLFLAGS:N-L/wrkdirs/usr/ports/lang/perl5.20/work/perl-5.20.3:N-L/usr/local/lib/perl5/5.20/mach/CORE:N-Wl,-rpath=/usr/local/lib/perl5/5.20/mach/CORE:N-lperl) -Wl,-soname,$(LIBPERL:R) -Dotherlibdirs=/usr/local/lib/perl5/site_perl/5.20:/usr/local/lib/perl5/site_perl/5.20/mach -Doptimize=-O2 -pipe -fstack-protector -fno-strict-aliasing -Ui_gdbm -Dusemultiplicity=y -Duse64bitint -Dusethreads=y -Dusemymalloc=n' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include', optimize='-O2 -pipe -fstack-protector -fno-strict-aliasing', cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='', gccversion='4.2.1 20070831 patched [FreeBSD]', 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='cc', ldflags ='-lpthread -Wl,-E -fstack-protector -L/usr/local/lib' libpth=/usr/lib /usr/local/lib /usr/include/gcc/4.2 /usr/lib libs=-lpthread -lm -lcrypt -lutil perllibs=-lpthread -lm -lcrypt -lutil libc=, so=so, useshrplib=true, libperl=libperl.so.5.20.3 gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-R/usr/local/lib/perl5/5.20/mach/CORE' cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/wrkdirs/usr/ports/lang/perl5.20/work/perl-5.20.3 -L/usr/local/lib/perl5/5.20/mach/CORE -Wl,-rpath=/usr/local/lib/perl5/5.20/mach/CORE -lperl -L/usr/local/lib -fstack-protector' --- @INC for perl 5.20.3: /usr/local/lib/perl5/site_perl/mach/5.20 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.20/mach /usr/local/lib/perl5/5.20 /usr/local/lib/perl5/site_perl/5.20 /usr/local/lib/perl5/site_perl/5.20/mach . --- Environment for perl 5.20.3: HOME=/home/tom LANG=en_GB.UTF-8 LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/tom/bin PERL_BADLANG (unset) SHELL=/usr/local/bin/zsh

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

RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.1k
On Sat Feb 13 06:46:40 2016, tomhukins wrote: Show quoted text
> This is a bug report for perl from tom@eborcom.com, > generated with the help of perlbug 1.40 running under perl 5.20.3. > > > ----------------------------------------------------------------- > [Please describe your issue here] > > This patch fixes a test failure in a FreeBSD jail that lacks SysV IPC > support. >
1. Tom, can you provide the output of the actual test failure? 2. Just above the point in this test file where you provide a patch I see a SKIP for certain conditions: ##### 12 skip_all('no SysV semaphores on this platform') if !$Config{d_sem}; 13 14 my @warnings; 15 { 16 local $SIG{__WARN__} = sub { push @warnings, $_[0] }; 17 local $SIG{SYS} = sub { skip_all("SIGSYS caught") } if exists $SIG{SYS}; 18 my $test = (semctl(-1,0,0,0))[0]; 19 ok(!defined $test, "erroneous semctl list slice yields undef"); 20 } ##### I'm surprised that you experienced a failure. Should we have detected a lack of semaphores during Configure? 3. Aaron Crane, the test in question is mostly your work. Can you evaluate this? Thank you very much. -- James E Keenan (jkeenan@cpan.org)
Date: Sun, 14 Feb 2016 14:24:04 +0000
To: James E Keenan via RT <perlbug-followup [...] perl.org>
From: Tom Hukins <tom [...] eborcom.com>
Subject: Re: [perl #127533] [PATCH] Fix tests in a FreeBSD jail
Download (untitled) / with headers
text/plain 1.2k
On Sat, Feb 13, 2016 at 08:58:12AM -0800, James E Keenan via RT wrote: Show quoted text
> 1. Tom, can you provide the output of the actual test failure?
# ./perl -Ilib t/TEST -v io/semctl.t t/io/semctl ... semctl not implemented at io/semctl.t line 18. FAILED--no leader found Failed 1 test out of 0, 0.00% okay. io/semctl.t ### Since not all tests were successful, you may want to run some of ### them individually and examine any diagnostic messages they produce. ### See the INSTALL document's section on "make test". ### You may have to set your dynamic library search path, ### LD_LIBRARY_PATH, to point to the build directory: ### setenv LD_LIBRARY_PATH `pwd`; cd t; ./perl harness ### LD_LIBRARY_PATH=`pwd`; export LD_LIBRARY_PATH; cd t; ./perl harness ### export LD_LIBRARY_PATH=`pwd`; cd t; ./perl harness ### for csh-style shells, like tcsh; or for traditional/modern ### Bourne-style shells, like bash, ksh, and zsh, respectively. Elapsed: 0 sec u=0.00 s=0.02 cu=0.02 cs=0.00 scripts=0 tests=0 Show quoted text
> 2. Just above the point in this test file where you provide a patch I see a SKIP for certain conditions:
Indeed. Those SKIP conditions do not match the case of building perl in a FreeBSD jail that lacks SysV IPC when the host supports it. Tom
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.8k
On Sun Feb 14 06:24:41 2016, tomhukins wrote: Show quoted text
> On Sat, Feb 13, 2016 at 08:58:12AM -0800, James E Keenan via RT wrote:
> > 1. Tom, can you provide the output of the actual test failure?
> > # ./perl -Ilib t/TEST -v io/semctl.t > t/io/semctl ... semctl not implemented at io/semctl.t line 18. > FAILED--no leader found > Failed 1 test out of 0, 0.00% okay. > io/semctl.t > ### Since not all tests were successful, you may want to run some of > ### them individually and examine any diagnostic messages they > produce. > ### See the INSTALL document's section on "make test". > ### You may have to set your dynamic library search path, > ### LD_LIBRARY_PATH, to point to the build directory: > ### setenv LD_LIBRARY_PATH `pwd`; cd t; ./perl harness > ### LD_LIBRARY_PATH=`pwd`; export LD_LIBRARY_PATH; cd t; ./perl > harness > ### export LD_LIBRARY_PATH=`pwd`; cd t; ./perl harness > ### for csh-style shells, like tcsh; or for traditional/modern > ### Bourne-style shells, like bash, ksh, and zsh, respectively. > Elapsed: 0 sec > u=0.00 s=0.02 cu=0.02 cs=0.00 scripts=0 tests=0 >
> > 2. Just above the point in this test file where you provide a patch I > > see a SKIP for certain conditions:
> > Indeed. Those SKIP conditions do not match the case of building perl > in > a FreeBSD jail that lacks SysV IPC when the host supports it.
I'm confused too, this test failure might be hiding a configuration issue. Could you please provide the values of the d_sem values? Doing: ./perl -Ilib '-V:d_sem.*' should do it. For example, on Linux I see: tony@mars:.../git/perl$ ./perl -Ilib '-V:d_sem.*' d_sem='define'; d_semctl='define'; d_semctl_semid_ds='define'; d_semctl_semun='define'; d_semget='define'; d_semop='define'; I *suspect* the jail is messing up detection of the structure information in d_semctl_semid_ds and d_semctl_semun. Thanks, Tony
To: Tony Cook via RT <perlbug-followup [...] perl.org>
From: Tom Hukins <tom [...] eborcom.com>
Date: Mon, 15 Feb 2016 08:02:36 +0000
Subject: Re: [perl #127533] [PATCH] Fix tests in a FreeBSD jail
Download (untitled) / with headers
text/plain 703b
On Sun, Feb 14, 2016 at 04:04:34PM -0800, Tony Cook via RT wrote: Show quoted text
> I'm confused too, this test failure might be hiding a configuration issue.
Good point. Show quoted text
> Could you please provide the values of the d_sem values? Doing: > > ./perl -Ilib '-V:d_sem.*'
# ./perl -Ilib '-V:d_sem.*' d_sem='define'; d_semctl='define'; d_semctl_semid_ds='undef'; d_semctl_semun='undef'; d_semget='define'; d_semop='define'; Show quoted text
> I *suspect* the jail is messing up detection of the structure > information in d_semctl_semid_ds and d_semctl_semun.
Let me know if I can provide any more information to help track down this problem. If nobody beats me to it, I'll try to investigate some time in the next few weeks. Tom
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 251b
On Mon Feb 15 00:03:22 2016, tomhukins wrote: Show quoted text
> Let me know if I can provide any more information to help track down > this problem. If nobody beats me to it, I'll try to investigate some > time in the next few weeks.
Please try the attached. Tony
Subject: 0001-perl-127533-only-test-semctl-if-we-have-everything-n.patch
From 9ee798dad4e9c43d3b6749b577490673680f6b17 Mon Sep 17 00:00:00 2001 From: Tony Cook <tony@develop-help.com> Date: Tue, 1 Mar 2016 11:35:21 +1100 Subject: [perl #127533] only test semctl() if we have everything needed to use it In a FreeBSD jail, the semctl() entry point might exist, but can be disabled by policy, when it is disabled, the Configure code that tests for the different structures that can be supplied to semctl() fail. The code that implements semctl() for perl treats semctl() as unimplemented if neither structure is available, so avoid testing semctl() if the structures couldn't be detected. --- t/io/semctl.t | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/io/semctl.t b/t/io/semctl.t index 53ae296..2e970a7 100644 --- a/t/io/semctl.t +++ b/t/io/semctl.t @@ -10,6 +10,8 @@ use strict; use warnings; skip_all('no SysV semaphores on this platform') if !$Config{d_sem}; +skip_all('SysV semaphore structures not detected') + if !$Config{d_semctl_semid_ds} && !$Config{d_semctl_semun}; my @warnings; { -- 2.1.4
Date: Mon, 7 Mar 2016 14:53:52 +0000
To: perl5-porters [...] perl.org
From: Tom Hukins <tom [...] eborcom.com>
Subject: Re: [perl #127533] [PATCH] Fix tests in a FreeBSD jail
Download (untitled) / with headers
text/plain 589b
On Mon, Feb 29, 2016 at 04:36:07PM -0800, Tony Cook via RT wrote: Show quoted text
> On Mon Feb 15 00:03:22 2016, tomhukins wrote:
> > Let me know if I can provide any more information to help track down > > this problem. If nobody beats me to it, I'll try to investigate some > > time in the next few weeks.
> > Please try the attached.
Thanks, Tony. I confirm this patch stops the skipped tests running and failing. Please apply it. However, cpan/IPC-SysV/t/ipcsysv.t now fails due to changes in 38e3b2, but that's a separate problem, so I'll file a new report against the CPAN distribution. Tom
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 830b
On Mon Mar 07 06:54:19 2016, tomhukins wrote: Show quoted text
> On Mon, Feb 29, 2016 at 04:36:07PM -0800, Tony Cook via RT wrote:
> > On Mon Feb 15 00:03:22 2016, tomhukins wrote:
> > > Let me know if I can provide any more information to help track down > > > this problem. If nobody beats me to it, I'll try to investigate some > > > time in the next few weeks.
> > > > Please try the attached.
> > Thanks, Tony. I confirm this patch stops the skipped tests running and > failing. Please apply it.
Thanks for the update, applied as 9234e5bdb7cb62dbf09ea4fd4ae5f3831cf78890. Show quoted text
> However, cpan/IPC-SysV/t/ipcsysv.t now fails due to changes in 38e3b2, > but that's a separate problem, so I'll file a new report against the > CPAN distribution.
I'm seeing the same on my darwin smoke tester, but I hadn't had a chance to follow it up. Tony
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 500b
On Tue Mar 08 14:34:01 2016, tonyc wrote: Show quoted text
> On Mon Mar 07 06:54:19 2016, tomhukins wrote:
> > However, cpan/IPC-SysV/t/ipcsysv.t now fails due to changes in > > 38e3b2, > > but that's a separate problem, so I'll file a new report against the > > CPAN distribution.
> > I'm seeing the same on my darwin smoke tester, but I hadn't had a > chance to follow it up.
Fixed in blead in cda0c02ca04cbb6960392d44273bd40182397820. Reported upstream as https://rt.cpan.org/Ticket/Display.html?id=112827 Tony
Download (untitled) / with headers
text/plain 252b
Thank you for submitting this report. You have helped make Perl better. With the release of Perl 5.24.0 on May 9, 2016, this and 149 other issues have been resolved. Perl 5.24.0 may be downloaded via https://metacpan.org/release/RJBS/perl-5.24.0


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org