In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/2cc7fc555d1ecad9234b450e62d7307b40a63a87?hp=f723540e14965a776d0549743a746fd3b1069fc5>
- Log ----------------------------------------------------------------- commit 2cc7fc555d1ecad9234b450e62d7307b40a63a87 Author: Nicholas Clark <n...@ccl4.org> Date: Wed Nov 21 16:12:57 2012 +0100 Skip the test for fork's undef return if ulimit -u doesn't work locally. Commit af2fe5eb7afec48a added a test for fork returning undef on failure, which used ulimit -u to lower the number of user processes to provoke fork failure. Whilst the test was careful to ensure that it only attempted this if the shell is bash or zsh, it turns out that one some platforms (at least HP-UX and AIX), bash offers ulimit -u, but will always error if its use is attempted. So probe that ulimit -u can be used, and skip the test if it can't. ----------------------------------------------------------------------- Summary of changes: t/op/fork.t | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/t/op/fork.t b/t/op/fork.t index 7154bf4..e4d5904 100644 --- a/t/op/fork.t +++ b/t/op/fork.t @@ -19,6 +19,12 @@ my $shell = $ENV{SHELL} || ''; SKIP: { skip "This test can only be run under bash or zsh" unless $shell =~ m{/(?:ba|z)sh$}; + my $probe = qx{ + $shell -c 'ulimit -u 1 2>&1 && echo good' + }; + chomp $probe; + skip "Can't set ulimit -u on this system: $probe" + unless $probe eq 'good'; my $out = qx{ $shell -c 'ulimit -u 1; exec $^X -e " -- Perl5 Master Repository