Subject: | t/setrlimit.t failure |
test-suite for bsd-resource-1.2906 on opensuse 12.2 / perl 5.18.0 fails for me; error message from setrlimit.t:
"setrlimit(RLIMIT_STACK, 6291456, 0) failed: Invalid argument"
shouldn't the rounding-down thing be done as follows ?
--- t/setrlimit.t__ 2013-07-07 16:39:30.000000000 +0200
+++ t/setrlimit.t 2013-07-11 16:23:29.896165919 +0200
@@ -49,7 +49,7 @@
my $n = 4096;
print "# Rounding down to $n byte boundary\n";
($try_soft, $try_hard) =
- map { int($_ / $n) * $n } ($try_soft, $try_hard);
+ map { ($_ == RLIM_INFINITY) ? RLIM_INFINITY : (int($_ / $n) * $n) } ($try_soft, $try_hard);
}
print "# try_soft = $try_soft, try_hard = $try_hard\n";
my $success = setrlimit($lim, $try_soft, $try_hard);