git: ac79b5f32794 - main - stress2: Do not run a fuzz test as root.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 07 Aug 2022 08:37:42 UTC
The branch main has been updated by pho:
URL: https://cgit.FreeBSD.org/src/commit/?id=ac79b5f327941115f58c0ac4d00bd72b19d43543
commit ac79b5f327941115f58c0ac4d00bd72b19d43543
Author: Peter Holm <pho@FreeBSD.org>
AuthorDate: 2022-08-07 08:35:47 +0000
Commit: Peter Holm <pho@FreeBSD.org>
CommitDate: 2022-08-07 08:35:47 +0000
stress2: Do not run a fuzz test as root.
---
tools/test/stress2/misc/badcode3.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/test/stress2/misc/badcode3.sh b/tools/test/stress2/misc/badcode3.sh
index e0a10d0074a4..61dce1cb82c3 100755
--- a/tools/test/stress2/misc/badcode3.sh
+++ b/tools/test/stress2/misc/badcode3.sh
@@ -39,13 +39,18 @@ mdconfig -a -t swap -s 1g -u $mdstart
newfs $newfs_flags md$mdstart > /dev/null
mount /dev/md$mdstart $mntpoint
chmod 777 $mntpoint
+export badcodeLOAD=100
+export RUNDIR=$mntpoint/stressX
+mkdir -p $RUNDIR
+chmod 0777 $RUNDIR
here=`pwd`
cd $mntpoint
(cd $here/../testcases/swap; ./swap -t 5m -i 20) &
sleep 2
while pgrep -q swap; do
- timeout 1m limits -c 0 $here/../testcases/badcode/badcode -t 1m -i 20
+ su $testuser -c \
+ "timeout 1m limits -c 0 $here/../testcases/badcode/badcode -t 1m -i 20"
done
wait
cd $here