ulimit succeeds (by return value) but does not limit on some systems.

Set ulimit() to false on these systems so that we do not rely on its
output nor effect. As an intended side-effect, ulimit based
prerequisites are set correctly (to "not-have") on these systems.

Reported-by: Ramsay Jones <[email protected]>
Reported-by: Adam Dinwoodie <[email protected]>
Reported-by: Johannes Schindelin <[email protected]>
Signed-off-by: Michael J Gruber <[email protected]>
---
This is independent of my series, but should best go before so that no
ulimit based test is run on CYGWIN and MINGW.

It follows the basic assumption that a tool like ulimit is either
present and functional or not present; and that we work around by
defines or such when that assumption is broken.
(Alternatively, we could set ULIMT_LIMITS or so and depend on that.)

 t/test-lib.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/t/test-lib.sh b/t/test-lib.sh
index b8a0b05102..f6ac60d487 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -998,6 +998,10 @@ case $uname_s in
        mkfifo () {
                false
        }
+       # ulimit succeeds but does not limit
+       ulimit () {
+               false
+       }
        # no POSIX permissions
        # backslashes in pathspec are converted to '/'
        # exec does not inherit the PID
@@ -1012,6 +1016,10 @@ case $uname_s in
        mkfifo () {
                false
        }
+       # ulimit succeeds but does not limit
+       ulimit () {
+               false
+       }
        test_set_prereq POSIXPERM
        test_set_prereq EXECKEEPSPID
        test_set_prereq CYGWIN
-- 
2.14.1.712.gda4591c8a2

Reply via email to