svn commit: r249297 - user/pho/stress2/misc

Peter Holm pho at FreeBSD.org
Tue Apr 9 08:26:25 UTC 2013


Author: pho
Date: Tue Apr  9 08:26:24 2013
New Revision: 249297
URL: http://svnweb.freebsd.org/changeset/base/249297

Log:
  Do not run tests as root.

Modified:
  user/pho/stress2/misc/nfs7.sh

Modified: user/pho/stress2/misc/nfs7.sh
==============================================================================
--- user/pho/stress2/misc/nfs7.sh	Tue Apr  9 08:25:31 2013	(r249296)
+++ user/pho/stress2/misc/nfs7.sh	Tue Apr  9 08:26:24 2013	(r249297)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2009 Peter Holm <pho at FreeBSD.org>
+# Copyright (c) 2009-2013 Peter Holm <pho at FreeBSD.org>
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -37,17 +37,16 @@
 [ ! -d $mntpoint ] &&  mkdir $mntpoint
 mount | grep "$mntpoint" | grep nfs > /dev/null && umount $mntpoint
 mount -t nfs -o nfsv3,tcp,nolockd -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
+rm -rf $RUNDIR
+mkdir -p $RUNDIR
+chmod 777 $RUNDIR
 export runRUNTIME=10m
 rm -rf /tmp/stressX.control/*
 
-cd ..
-./run.sh marcus.cfg
-cd -
+su $testuser -c "(cd ..; ./run.sh marcus.cfg)"
 
 umount $mntpoint
 while mount | grep -q $mntpoint; do


More information about the svn-src-user mailing list