Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jun 2016 09:58:41 +0000 (UTC)
From:      Peter Holm <pho@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r301593 - user/pho/stress2/misc
Message-ID:  <201606080958.u589wf84059512@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pho
Date: Wed Jun  8 09:58:41 2016
New Revision: 301593
URL: https://svnweb.freebsd.org/changeset/base/301593

Log:
  Whitespace fix and minor style changes.
  
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  user/pho/stress2/misc/mmap23.sh
  user/pho/stress2/misc/mmap25.sh
  user/pho/stress2/misc/oom.sh

Modified: user/pho/stress2/misc/mmap23.sh
==============================================================================
--- user/pho/stress2/misc/mmap23.sh	Wed Jun  8 09:40:06 2016	(r301592)
+++ user/pho/stress2/misc/mmap23.sh	Wed Jun  8 09:58:41 2016	(r301593)
@@ -33,7 +33,7 @@
 # Test scenario by kib@.
 # Fixed by r285878.
 
-. ../default.cfg 
+. ../default.cfg
 
 dir=/tmp
 odir=`pwd`
@@ -52,8 +52,8 @@ sleep .2
 dd if=/dev/zero of=/tmp/mmap23.inputfile bs=1k count=1 2>&1 | \
     egrep -v "records|transferred"
 
-while ps auxww | grep -v grep | grep -qw swap; do
-	killall -9 swap 2>/dev/null
+while pgrep -q swap; do
+	pkill -9 swap
 done
 
 rm -f /tmp/mmap23 /tmp/mmap23.inputfile

Modified: user/pho/stress2/misc/mmap25.sh
==============================================================================
--- user/pho/stress2/misc/mmap25.sh	Wed Jun  8 09:40:06 2016	(r301592)
+++ user/pho/stress2/misc/mmap25.sh	Wed Jun  8 09:58:41 2016	(r301593)
@@ -37,7 +37,7 @@
 # 3. The file is extended again to cover the whole mapped area.
 # 4. The program accesses the mapping past the point of truncation.
 
-. ../default.cfg 
+. ../default.cfg
 
 dir=/tmp
 odir=`pwd`
@@ -54,8 +54,8 @@ sleep 1
 
 /tmp/mmap25 /tmp/mmap25.inputfile
 
-while ps auxww | grep -v grep | grep -qw swap; do
-	killall -9 swap 2>/dev/null
+while pgrep -q swap; do
+	pkill -9 swap
 done
 rm -f /tmp/mmap25 /tmp/mmap25.inputfile mmap25.core
 exit

Modified: user/pho/stress2/misc/oom.sh
==============================================================================
--- user/pho/stress2/misc/oom.sh	Wed Jun  8 09:40:06 2016	(r301592)
+++ user/pho/stress2/misc/oom.sh	Wed Jun  8 09:58:41 2016	(r301593)
@@ -37,8 +37,8 @@
 # kernel: pid 5654 (sort), uid 0, was killed: out of swap space
 
 [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
-[ `sysctl -n hw.physmem` -gt $(( 1 * 1024 * 1024 * 1024)) ] && 
-echo "RAM should be capped to 1GB for this test."
+[ `sysctl -n hw.physmem` -gt $(( 1 * 1024 * 1024 * 1024)) ] &&
+    echo "RAM should be capped to 1GB for this test."
 [ `sysctl -n hw.physmem` -gt $(( 8 * 1024 * 1024 * 1024)) ] && exit 0
 [ `sysctl -n vm.swap_total` -gt 0 ] && { swapoff -a; off=1; }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606080958.u589wf84059512>