svn commit: r332927 - user/pho/stress2/misc
Peter Holm
pho at FreeBSD.org
Tue Apr 24 10:11:02 UTC 2018
Author: pho
Date: Tue Apr 24 10:11:01 2018
New Revision: 332927
URL: https://svnweb.freebsd.org/changeset/base/332927
Log:
Style fix.
Sponsored by: Dell EMC Isilon
Modified:
user/pho/stress2/misc/crossmp2.sh
Modified: user/pho/stress2/misc/crossmp2.sh
==============================================================================
--- user/pho/stress2/misc/crossmp2.sh Tue Apr 24 10:09:24 2018 (r332926)
+++ user/pho/stress2/misc/crossmp2.sh Tue Apr 24 10:11:01 2018 (r332927)
@@ -40,14 +40,15 @@ if [ $# -eq 0 ]; then
[ -z "$nfs_export" ] && exit 0
ping -c 2 `echo $nfs_export | sed 's/:.*//'` > /dev/null 2>&1 ||
exit 0
- mount -t nfs -o tcp -o nfsv3 -o retrycnt=1 -o intr -o soft,timeout=1 \
+ mount -t nfs -o tcp -o nfsv3 -o retrycnt=1 -o intr,soft,timeout=1 \
-o rw $nfs_export $mntpoint || exit 0
+ sleep .2
umount $mntpoint
for i in `jot $mounts`; do
mp=${mntpoint}$i
[ ! -d $mp ] && mkdir $mp
- mount | grep -qw "$mp" && umount $mp
+ mount | grep -q "$mp " && umount $mp
done
# start the parallel tests
@@ -56,6 +57,7 @@ if [ $# -eq 0 ]; then
./$0 find &
done
wait
+ exit 0
else
if [ $1 = find ]; then
for i in `jot 128`; do
@@ -67,16 +69,15 @@ else
# The test: Parallel mount and unmounts
for i in `jot 128`; do
m=$1
- mount -t nfs -o tcp -o nfsv3 -o retrycnt=3 -o intr \
- -o soft -o rw $nfs_export ${mntpoint}$m
+ mount -t nfs -o tcp -o nfsv3 -o retrycnt=3 \
+ -o intr,soft -o rw $nfs_export ${mntpoint}$m
sleep .5
opt=`[ $(( m % 2 )) -eq 0 ] && echo -f`
n=0
- while mount | grep -qw ${mntpoint}$m; do
+ while mount | grep -q "${mntpoint}$m "; do
umount $opt ${mntpoint}$m > /dev/null 2>&1
- n=$((n + 1))
- [ $n -gt 99 ] && umount -f ${mntpoint}$m > \
- /dev/null 2>&1
+ [ $((n += 1)) -gt 99 ] && umount -f \
+ ${mntpoint}$m > /dev/null 2>&1
[ $n -gt 100 ] && exit
done
done
More information about the svn-src-user
mailing list