Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Apr 2013 08:29:27 +0000 (UTC)
From:      Peter Holm <pho@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r249299 - user/pho/stress2/misc
Message-ID:  <201304090829.r398TR7j023964@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@FreeBSD.org>
+# Copyright (c) 2008-2013 Peter Holm <pho@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



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