aboutsummaryrefslogtreecommitdiffstats
path: root/vespamalloc/src/tests/thread/thread_test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'vespamalloc/src/tests/thread/thread_test.sh')
-rwxr-xr-xvespamalloc/src/tests/thread/thread_test.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/vespamalloc/src/tests/thread/thread_test.sh b/vespamalloc/src/tests/thread/thread_test.sh
index 7d9a0bedd86..3af29ad052e 100755
--- a/vespamalloc/src/tests/thread/thread_test.sh
+++ b/vespamalloc/src/tests/thread/thread_test.sh
@@ -1,7 +1,17 @@
#!/bin/bash
set -e
-ulimit -u 31215
+echo "Trying to find limit for processes:"
+if ulimit -u; then
+ echo "Fixing limit to 31215"
+ ulimit -u 31215
+elif [ "$RETRYEXEC" ]; then
+ echo "Already tried to re-exec script, giving up."
+ exit 1
+else
+ echo "Command 'ulimit -u' failed, trying to re-exec script with bash instead."
+ exec /usr/bin/env RETRYEXEC=true bash $0
+fi
VESPA_MALLOC_SO=../../../src/vespamalloc/libvespamalloc.so
VESPA_MALLOC_SO_D=../../../src/vespamalloc/libvespamalloc_vespamallocd.so