Date: Mon, 1 Jun 2015 10:25:53 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r283876 - user/pho/stress2/misc Message-ID: <201506011025.t51APrSa087977@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506011025.t51APrSa087977>