svn commit: r249299 - user/pho/stress2/misc
Peter Holm
pho at FreeBSD.org
Tue Apr 9 08:29:27 UTC 2013
Author: pho
Date: Tue Apr 9 08:29:27 2013
New Revision: 249299
URL: http://svnweb.freebsd.org/changeset/base/249299
Log:
Do not run the tests as root.
Modified:
user/pho/stress2/misc/nfs9.sh
Modified: user/pho/stress2/misc/nfs9.sh
==============================================================================
--- user/pho/stress2/misc/nfs9.sh Tue Apr 9 08:27:15 2013 (r249298)
+++ user/pho/stress2/misc/nfs9.sh Tue Apr 9 08:29:27 2013 (r249299)
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Copyright (c) 2008 Peter Holm <pho at FreeBSD.org>
+# Copyright (c) 2008-2013 Peter Holm <pho at FreeBSD.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -41,17 +41,19 @@
[ ! -d $mntpoint ] && mkdir $mntpoint
for i in `jot 10`; do
- mount | grep "$mntpoint" | grep nfs > /dev/null && umount $mntpoint
- mount -t nfs -o tcp -o retrycnt=3 -o intr -o soft -o rw 127.0.0.1:/tmp $mntpoint
- rm -rf $mntpoint/stressX/*
- rm -rf /tmp/stressX.control
-
- export RUNDIR=$mntpoint/nfs/stressX
- [ ! -d $RUNDIR ] && mkdir -p $RUNDIR
+ mount | grep "on $mntpoint " | grep -q nfs && umount $mntpoint
+ mount -t nfs -o tcp -o retrycnt=3 -o intr -o soft \
+ -o rw 127.0.0.1:/tmp $mntpoint
+
+ sleep .5
+ export RUNDIR=$mntpoint/nfs9/stressX
+ rm -rf $RUNDIR
+ mkdir -p $RUNDIR
+ chmod 777 $RUNDIR
export runRUNTIME=3m
rm -rf /tmp/stressX.control/*
- (cd ..; ./run.sh all.cfg) &
+ su $testuser -c '(cd ..; ./run.sh all.cfg) > /dev/null 2>&1' &
sleep 60
while mount | grep -q $mntpoint; do
@@ -60,3 +62,4 @@ for i in `jot 10`; do
kill -9 $!
done
../tools/killall.sh
+rm -rf /tmp/nfs9
More information about the svn-src-user
mailing list