-
Notifications
You must be signed in to change notification settings - Fork 550
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
[PATCH] Fix tests in a FreeBSD jail #15180
Comments
From @tomhukinsCreated by @tomhukinsThis patch fixes a test failure in a FreeBSD jail that lacks SysV IPC Perl Info
|
From @tomhukins0001-Handle-FreeBSD-jails-that-lack-SysV-IPC-support.patchFrom 30036a2b44b78fdaf8adfc2cd5e9a045f7a10226 Mon Sep 17 00:00:00 2001
From: Tom Hukins <tom@eborcom.com>
Date: Sat, 13 Feb 2016 14:28:36 +0000
Subject: [PATCH] Handle FreeBSD jails that lack SysV IPC support
On a FreeBSD system supporting SysV IPC, jails on that system might not
support SysV IPC. By default, jails do noth support it. The boolean
"security.jail.sysvipc_allowed" sysctl specifies this.
This commit makes perl's test suite pass in such jailed environments.
---
t/io/semctl.t | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/t/io/semctl.t b/t/io/semctl.t
index 53ae296..9de9309 100644
--- a/t/io/semctl.t
+++ b/t/io/semctl.t
@@ -15,7 +15,8 @@ my @warnings;
{
local $SIG{__WARN__} = sub { push @warnings, $_[0] };
local $SIG{SYS} = sub { skip_all("SIGSYS caught") } if exists $SIG{SYS};
- my $test = (semctl(-1,0,0,0))[0];
+ my $test = eval { (semctl(-1,0,0,0))[0] };
+ skip_all($@) if $@ =~ /^semctl not implemented/;
ok(!defined $test, "erroneous semctl list slice yields undef");
}
--
2.7.0
|
From @jkeenanOn Sat Feb 13 06:46:40 2016, tomhukins wrote:
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: ##### 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. -- |
The RT System itself - Status changed from 'new' to 'open' |
From @tomhukinsOn Sat, Feb 13, 2016 at 08:58:12AM -0800, James E Keenan via RT wrote:
# ./perl -Ilib t/TEST -v io/semctl.t
Indeed. Those SKIP conditions do not match the case of building perl in Tom |
From @tonycozOn Sun Feb 14 06:24:41 2016, tomhukins wrote:
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.*' I *suspect* the jail is messing up detection of the structure information in d_semctl_semid_ds and d_semctl_semun. Thanks, |
From @tomhukinsOn Sun, Feb 14, 2016 at 04:04:34PM -0800, Tony Cook via RT wrote:
Good point.
# ./perl -Ilib '-V:d_sem.*'
Let me know if I can provide any more information to help track down Tom |
From @tonycozOn Mon Feb 15 00:03:22 2016, tomhukins wrote:
Please try the attached. Tony |
From @tonycoz0001-perl-127533-only-test-semctl-if-we-have-everything-n.patchFrom 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
|
From @tomhukinsOn Mon, Feb 29, 2016 at 04:36:07PM -0800, Tony Cook via RT wrote:
Thanks, Tony. I confirm this patch stops the skipped tests running and However, cpan/IPC-SysV/t/ipcsysv.t now fails due to changes in 38e3b2, Tom |
From @tonycozOn Mon Mar 07 06:54:19 2016, tomhukins wrote:
Thanks for the update, applied as 9234e5b.
I'm seeing the same on my darwin smoke tester, but I hadn't had a chance to follow it up. Tony |
@tonycoz - Status changed from 'open' to 'pending release' |
From @tonycozOn Tue Mar 08 14:34:01 2016, tonyc wrote:
Fixed in blead in cda0c02. Reported upstream as https://rt.cpan.org/Ticket/Display.html?id=112827 Tony |
From @khwilliamsonThank you for submitting this report. You have helped make Perl better. Perl 5.24.0 may be downloaded via https://metacpan.org/release/RJBS/perl-5.24.0 |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#127533 (status was 'resolved')
Searchable as RT127533$
The text was updated successfully, but these errors were encountered: