r29019 - in /branches/upstream/libbsd-resource-perl/current: ChangeLog Resource.pm t/setrlimit.t
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Thu Jan 1 16:48:54 UTC 2009
Author: gregoa
Date: Thu Jan 1 16:48:51 2009
New Revision: 29019
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=29019
Log:
[svn-upgrade] Integrating new upstream version, libbsd-resource-perl (1.2902)
Modified:
branches/upstream/libbsd-resource-perl/current/ChangeLog
branches/upstream/libbsd-resource-perl/current/Resource.pm
branches/upstream/libbsd-resource-perl/current/t/setrlimit.t
Modified: branches/upstream/libbsd-resource-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libbsd-resource-perl/current/ChangeLog?rev=29019&op=diff
==============================================================================
--- branches/upstream/libbsd-resource-perl/current/ChangeLog (original)
+++ branches/upstream/libbsd-resource-perl/current/ChangeLog Thu Jan 1 16:48:51 2009
@@ -1,3 +1,20 @@
+2008-12-30 Jarkko Hietaniemi <jhi at iki.fi>
+
+ * Lowered the "0.95 of the current limit" down to
+ "0.75 of the current limit" in setrlimit.t so that
+ more memory-constrained systems (like 2MB or less of
+ default stack) have slightly more chance of completing the test.
+ The 0.75 also has more chance of aligning with page sizes.
+
+ * The scalar context return of getrlimit() was documented
+ to return an object, even though it really returned the
+ soft limit, reported by anicka at suse.cz. Fixed the documentation.
+
+ * Judging by the cpantesters reports no netbsd has a functional
+ RLIMIT_STACK, so skipping the test in all of them.
+
+ * Release 1.2902.
+
2008-01-29 Jarkko Hietaniemi <jhi at iki.fi>
* netbsd-alpha does not have a functional RLIMIT_STACK,
Modified: branches/upstream/libbsd-resource-perl/current/Resource.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libbsd-resource-perl/current/Resource.pm?rev=29019&op=diff
==============================================================================
--- branches/upstream/libbsd-resource-perl/current/Resource.pm (original)
+++ branches/upstream/libbsd-resource-perl/current/Resource.pm Thu Jan 1 16:48:51 2009
@@ -13,7 +13,7 @@
use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD $VERSION);
-$VERSION = '1.2901';
+$VERSION = '1.2902';
use Carp;
use AutoLoader;
@@ -277,8 +277,8 @@
C<RLIM_INFINITY> is useful in setrlimit(), the C<RLIM_INFINITY> is
often represented as minus one (-1).
-In list context C<getrlimit()> returns the current soft and hard resource
-limits as a list. On failure it returns an empty list.
+In list context C<getrlimit()> returns the current soft and hard
+resource limits as a list. On failure it returns an empty list.
Processes have soft and hard resource limits. On crossing the soft
limit they receive a signal (for example the C<SIGXCPU> or C<SIGXFSZ>,
@@ -298,10 +298,8 @@
One notable exception for the better: officially B<HP-UX> does not
support getrlimit() at all but for the time being, it does seem to.
-In scalar context getrlimit() returns the current soft and hard
-resource limits as an object. The object can be queried via methods
-C<cur> and C<max>, the current and maximum resource limits for the
-C<$resource>, respectively.
+In scalar context C<getrlimit()> returns the current soft limit.
+On failure it returns C<undef>.
=head2 getpriority
@@ -463,7 +461,7 @@
maxprocperuid limit (the default value is 266, try the command
C<sysctl -a kern.maxprocperuid>).
-In NetBSD Alpha RLIMIT_STACK calls fail.
+In NetBSD RLIMIT_STACK calls fail.
Because not all UNIX kernels are BSD and also because of the sloppy
support of getrusage() by many vendors many of the getrusage() values
Modified: branches/upstream/libbsd-resource-perl/current/t/setrlimit.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libbsd-resource-perl/current/t/setrlimit.t?rev=29019&op=diff
==============================================================================
--- branches/upstream/libbsd-resource-perl/current/t/setrlimit.t (original)
+++ branches/upstream/libbsd-resource-perl/current/t/setrlimit.t Thu Jan 1 16:48:51 2009
@@ -14,14 +14,15 @@
for my $lim (@LIM) {
print "# lim = $lim\n";
- if ($^O eq 'netbsd-alpha' && $lim eq 'RLIMIT_STACK') {
+ if ($^O =~ /^netbsd/ && $lim eq 'RLIMIT_STACK') {
print "ok $test_no # SKIP $^O $lim\n";
next;
}
my ($old_soft, $old_hard) = getrlimit($lim);
print "# old_soft = $old_soft, old_hard = $old_hard\n";
my ($try_soft, $try_hard ) =
- map { ($_ == RLIM_INFINITY) ? RLIM_INFINITY : int(0.95 * $_) }
+ map { ($_ == RLIM_INFINITY) ?
+ RLIM_INFINITY : int(0.75 * $_) }
($old_soft, $old_hard);
print "# try_soft = $try_soft, try_hard = $try_hard\n";
if ($try_soft == RLIM_INFINITY) {
@@ -32,6 +33,7 @@
print "# setrlimit($lim, $try_soft) = OK\n";
my $new_soft = getrlimit($lim);
print "# getrlimit($lim) = $new_soft\n";
+ # ASSUMPTION: setrlimit() requests are rounded DOWN, not up.
if (($new_soft > 0 || $old_soft == 0) && $new_soft <= $try_soft) {
print "ok $test_no # $try_soft <= $new_soft\n";
} else {
More information about the Pkg-perl-cvs-commits
mailing list