aboutsummaryrefslogtreecommitdiffstats
path: root/tools/randpkt-test.sh
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-09-21 14:41:04 -0700
committerGuy Harris <guy@alum.mit.edu>2016-09-21 21:41:47 +0000
commitec0aeb983b0efc2d2e5e24209a3a0fc198b353d2 (patch)
tree9687c0fbd4468149335b8c3f12046f045423c03c /tools/randpkt-test.sh
parentc2b7a74c149241a5fa490d9201c04a987e3d3f63 (diff)
Set the VA limit with ulimit -S, and clean up comments.
Other limits are set with -S, do that with the virtual address space limit as well. Change-Id: Ie427341a4c7be56d3e8d96be6c1713c56e9bad87 Reviewed-on: https://code.wireshark.org/review/17846 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'tools/randpkt-test.sh')
-rwxr-xr-xtools/randpkt-test.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/randpkt-test.sh b/tools/randpkt-test.sh
index 3cf3938af0..e309b9257b 100755
--- a/tools/randpkt-test.sh
+++ b/tools/randpkt-test.sh
@@ -84,17 +84,22 @@ while [ $PASS -lt $MAX_PASSES -o $MAX_PASSES -lt 1 ] ; do
echo -n "($ARGS) "
echo -e "Command and args: $TSHARK $ARGS\n" > $TMP_DIR/$ERR_FILE
- # Run in a child process with limits, e.g. stop it if it's running
- # longer then MAX_CPU_TIME seconds. (ulimit may not be supported
- # well on some platforms, particularly cygwin.)
+ # Run in a child process with limits.
(
+ # Set some limits to the child processes, e.g. stop it if
+ # it's running longer than MAX_CPU_TIME seconds. (ulimit
+ # is not supported well on cygwin - it shows some warnings -
+ # and the features we use may not all be supported on some
+ # UN*X platforms.)
ulimit -S -t $MAX_CPU_TIME -s $MAX_STACK
+
+ # Allow core files to be generated
ulimit -c unlimited
# Don't enable ulimit -v when using ASAN. See
# https://github.com/google/sanitizers/wiki/AddressSanitizer#ulimit--v
if [ $ASAN -eq 0 ]; then
- ulimit -v $MAX_VMEM
+ ulimit -S -v $MAX_VMEM
fi
"$TSHARK" $ARGS $TMP_DIR/$TMP_FILE \