r29021 - in /trunk/libbsd-resource-perl: ChangeLog Resource.pm debian/changelog t/setrlimit.t

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Thu Jan 1 16:50:51 UTC 2009


Author: gregoa
Date: Thu Jan  1 16:50:48 2009
New Revision: 29021

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=29021
Log:
New upstream release.

Modified:
    trunk/libbsd-resource-perl/ChangeLog
    trunk/libbsd-resource-perl/Resource.pm
    trunk/libbsd-resource-perl/debian/changelog
    trunk/libbsd-resource-perl/t/setrlimit.t

Modified: trunk/libbsd-resource-perl/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libbsd-resource-perl/ChangeLog?rev=29021&op=diff
==============================================================================
--- trunk/libbsd-resource-perl/ChangeLog (original)
+++ trunk/libbsd-resource-perl/ChangeLog Thu Jan  1 16:50:48 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: trunk/libbsd-resource-perl/Resource.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libbsd-resource-perl/Resource.pm?rev=29021&op=diff
==============================================================================
--- trunk/libbsd-resource-perl/Resource.pm (original)
+++ trunk/libbsd-resource-perl/Resource.pm Thu Jan  1 16:50:48 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: trunk/libbsd-resource-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libbsd-resource-perl/debian/changelog?rev=29021&op=diff
==============================================================================
--- trunk/libbsd-resource-perl/debian/changelog (original)
+++ trunk/libbsd-resource-perl/debian/changelog Thu Jan  1 16:50:48 2009
@@ -1,4 +1,4 @@
-libbsd-resource-perl (1.2901-2) UNRELEASED; urgency=low
+libbsd-resource-perl (1.2902-1) UNRELEASED; urgency=low
 
   [ Ansgar Burchardt ]
   * Fix typo in debian/copyright.
@@ -6,6 +6,8 @@
   [ gregor herrmann ]
   * debian/control: Changed: Switched Vcs-Browser field to ViewSVN
     (source stanza).
+
+  * New upstream release.
 
  -- Ansgar Burchardt <ansgar at 43-1.org>  Sat, 25 Oct 2008 18:47:15 +0200
 

Modified: trunk/libbsd-resource-perl/t/setrlimit.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libbsd-resource-perl/t/setrlimit.t?rev=29021&op=diff
==============================================================================
--- trunk/libbsd-resource-perl/t/setrlimit.t (original)
+++ trunk/libbsd-resource-perl/t/setrlimit.t Thu Jan  1 16:50:48 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