svn commit: r283876 - user/pho/stress2/misc
Peter Holm
pho at FreeBSD.org
Mon Jun 1 10:25:54 UTC 2015
Author: pho
Date: Mon Jun 1 10:25:53 2015
New Revision: 283876
URL: https://svnweb.freebsd.org/changeset/base/283876
Log:
Do not run these two tests on small memory configurations and on hosts
without a swap disk.
Sponsored by: EMC / Isilon storage division
Modified:
user/pho/stress2/misc/tcp.sh
user/pho/stress2/misc/tcp2.sh
Modified: user/pho/stress2/misc/tcp.sh
==============================================================================
--- user/pho/stress2/misc/tcp.sh Mon Jun 1 09:04:57 2015 (r283875)
+++ user/pho/stress2/misc/tcp.sh Mon Jun 1 10:25:53 2015 (r283876)
@@ -33,6 +33,9 @@
[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
+[ `swapinfo | wc -l` -eq 1 ] && exit 0
+[ $((`sysctl -n hw.usermem` / 1024 / 1024 / 1024)) -le 3 ] && exit 0
+
. ../default.cfg
rm -rf /tmp/stressX.control
@@ -41,7 +44,8 @@ chmod 777 $RUNDIR
export runRUNTIME=15m
export tcpLOAD=100
n=`su $testuser -c "limits | grep maxprocesses | awk '{print \\$NF}'"`
-export tcpINCARNATIONS=$((n / 2 - 10))
+n=$((n - `ps aux | wc -l`))
+export tcpINCARNATIONS=$((n / 2 - 400))
export TESTPROGS=" ./testcases/tcp/tcp"
su $testuser -c '(cd ..; ./testcases/run/run $TESTPROGS)' &
Modified: user/pho/stress2/misc/tcp2.sh
==============================================================================
--- user/pho/stress2/misc/tcp2.sh Mon Jun 1 09:04:57 2015 (r283875)
+++ user/pho/stress2/misc/tcp2.sh Mon Jun 1 10:25:53 2015 (r283876)
@@ -33,6 +33,9 @@
[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
+[ `swapinfo | wc -l` -eq 1 ] && exit 0
+[ $((`sysctl -n hw.usermem` / 1024 / 1024 / 1024)) -le 3 ] && exit 0
+
. ../default.cfg
rm -rf /tmp/stressX.control
@@ -42,7 +45,8 @@ export runRUNTIME=15m
export tcpLOAD=100
export swapLOAD=100
n=`su $testuser -c "limits | grep maxprocesses | awk '{print \\$NF}'"`
-export tcpINCARNATIONS=$((n / 2 - 40))
+n=$((n - `ps aux | wc -l`))
+export tcpINCARNATIONS=$((n / 2 - 400))
export TESTPROGS="
./testcases/tcp/tcp
./testcases/swap/swap
More information about the svn-src-user
mailing list