git: 00266393cc4b - main - stress2: Fix tests after the new default for newfs(8) is "SU"

From: Peter Holm <pho_at_FreeBSD.org>
Date: Sat, 20 Jul 2024 08:53:55 UTC
The branch main has been updated by pho:

URL: https://cgit.FreeBSD.org/src/commit/?id=00266393cc4b15e064617e334b1697d98dd6a827

commit 00266393cc4b15e064617e334b1697d98dd6a827
Author:     Peter Holm <pho@FreeBSD.org>
AuthorDate: 2024-07-20 08:52:29 +0000
Commit:     Peter Holm <pho@FreeBSD.org>
CommitDate: 2024-07-20 08:52:29 +0000

    stress2: Fix tests after the new default for newfs(8) is "SU"
---
 tools/test/stress2/misc/creat.sh      | 1 +
 tools/test/stress2/misc/fsck10.sh     | 1 +
 tools/test/stress2/misc/fsck11.sh     | 1 +
 tools/test/stress2/misc/fsck13.sh     | 1 +
 tools/test/stress2/misc/mkdir.sh      | 1 +
 tools/test/stress2/misc/nullfs18.sh   | 1 +
 tools/test/stress2/misc/perf.sh       | 1 +
 tools/test/stress2/misc/softupdate.sh | 1 +
 tools/test/stress2/misc/symlink.sh    | 1 +
 tools/test/stress2/misc/symlink2.sh   | 1 +
 tools/test/stress2/misc/symlink5.sh   | 1 +
 11 files changed, 11 insertions(+)

diff --git a/tools/test/stress2/misc/creat.sh b/tools/test/stress2/misc/creat.sh
index 45f6b0f87301..1abab774ed7f 100755
--- a/tools/test/stress2/misc/creat.sh
+++ b/tools/test/stress2/misc/creat.sh
@@ -44,6 +44,7 @@ mdconfig -a -t swap -s 100m -u $mdstart
 [ $# -eq 1 ] && flags="$@" || flags="-Un"
 echo "newfs $flags /dev/md$mdstart"
 newfs $flags /dev/md$mdstart > /dev/null
+[ "$flags" = "" ] && tunefs -n disable md$mdstart
 mount /dev/md$mdstart $mntpoint
 set +e
 
diff --git a/tools/test/stress2/misc/fsck10.sh b/tools/test/stress2/misc/fsck10.sh
index 30479e0dfebb..33ad35f65f11 100755
--- a/tools/test/stress2/misc/fsck10.sh
+++ b/tools/test/stress2/misc/fsck10.sh
@@ -67,6 +67,7 @@ backups=`newfs -N $newfs_flags md$u2 | grep -A1 "super-block backups" | \
     tail -1 | sed 's/,//g'`
 echo "newfs $newfs_flags -n md$u2"
 newfs $newfs_flags -n md$u2 > /dev/null
+[ "$newfs_flags" = "" ] && tunefs -n disable md$u2
 set +e
 
 chk() {
diff --git a/tools/test/stress2/misc/fsck11.sh b/tools/test/stress2/misc/fsck11.sh
index 8019cc1f2656..de4cf2536dad 100755
--- a/tools/test/stress2/misc/fsck11.sh
+++ b/tools/test/stress2/misc/fsck11.sh
@@ -71,6 +71,7 @@ backups=`newfs -N $newfs_flags md$u2 | grep -A1 "super-block backups" | \
     tail -1 | sed 's/,//g'`
 echo "newfs $newfs_flags -n md$u2"
 newfs $newfs_flags -n md$u2 > /dev/null
+[ "$newfs_flags" = "" ] && tunefs -n disable md$u2
 set +e
 
 chk() {
diff --git a/tools/test/stress2/misc/fsck13.sh b/tools/test/stress2/misc/fsck13.sh
index f279e0bae066..3b8dc64d12b9 100755
--- a/tools/test/stress2/misc/fsck13.sh
+++ b/tools/test/stress2/misc/fsck13.sh
@@ -78,6 +78,7 @@ backups=`newfs -N $flags md$u2 | grep -A1 "super-block backups" | \
     tail -1 | sed 's/,//g'`
 echo "newfs $flags /dev/md$u2"
 newfs $flags md$u2 > /dev/null
+[ "$newfs_flags" = "" ] && tunefs -n disable md$u2
 mdconfig -d -u $u2
 
 chk() {
diff --git a/tools/test/stress2/misc/mkdir.sh b/tools/test/stress2/misc/mkdir.sh
index 39cc828f0303..734b8994ad4e 100755
--- a/tools/test/stress2/misc/mkdir.sh
+++ b/tools/test/stress2/misc/mkdir.sh
@@ -44,6 +44,7 @@ mdconfig -a -t swap -s 100m -u $mdstart
 [ $# -eq 1 ] && flags="$@" || flags="-Un"
 echo "newfs $flags /dev/md$mdstart"
 newfs $flags /dev/md$mdstart > /dev/null
+[ "$flags" = "" ] && tunefs -n disable md$mdstart
 mount /dev/md$mdstart $mntpoint
 set +e
 
diff --git a/tools/test/stress2/misc/nullfs18.sh b/tools/test/stress2/misc/nullfs18.sh
index b4414cbc3e3e..3936ea64c6a3 100755
--- a/tools/test/stress2/misc/nullfs18.sh
+++ b/tools/test/stress2/misc/nullfs18.sh
@@ -41,6 +41,7 @@ mdconfig -l | grep -q md$mdstart &&  mdconfig -d -u $mdstart
 mdconfig -a -t swap -s 2g -u $mdstart || exit 1
 
 newfs -n md$mdstart > /dev/null
+tunefs -n disable md$mdstart 2>/dev/null
 
 mount /dev/md$mdstart $mntpoint
 chmod 777 $mntpoint
diff --git a/tools/test/stress2/misc/perf.sh b/tools/test/stress2/misc/perf.sh
index 58f5bd67b756..de6c20028c59 100755
--- a/tools/test/stress2/misc/perf.sh
+++ b/tools/test/stress2/misc/perf.sh
@@ -84,6 +84,7 @@ tst() {
 s=0
 for i in "" "-U" "-j"; do
 	newfs $i /dev/md$mdstart > /dev/null 2>&1
+	[ "$i" = "" ] && tunefs -n disable md$mdstart
 	mount /dev/md$mdstart $mntpoint
 
 	t1=`date +%s`
diff --git a/tools/test/stress2/misc/softupdate.sh b/tools/test/stress2/misc/softupdate.sh
index ecf7c5d04e9c..37f819579f83 100755
--- a/tools/test/stress2/misc/softupdate.sh
+++ b/tools/test/stress2/misc/softupdate.sh
@@ -47,6 +47,7 @@ mdconfig -a -t vnode -f $D -u $mdstart
 for mode in "" "-U"; do
 	printf "newfs -O2 $mode /dev/md${mdstart}\n\n"
 	newfs -O2 $mode /dev/md$mdstart > /dev/null 2>&1
+	[ "$mode" = "" ] && tunefs -n disable md$mdstart
 	mount /dev/md$mdstart $mntpoint
 
 	for i in `jot 5`; do
diff --git a/tools/test/stress2/misc/symlink.sh b/tools/test/stress2/misc/symlink.sh
index 47257aa92a24..1d30636d6b25 100755
--- a/tools/test/stress2/misc/symlink.sh
+++ b/tools/test/stress2/misc/symlink.sh
@@ -71,6 +71,7 @@ tst() {
 s=0
 for i in "" "-U" "-j"; do
 	newfs $i /dev/md$mdstart > /dev/null 2>&1
+	[ "$i" = "" ] && tunefs -n disable md$mdstart
 	mount /dev/md$mdstart $mntpoint
 
 	t1=`date +%s`
diff --git a/tools/test/stress2/misc/symlink2.sh b/tools/test/stress2/misc/symlink2.sh
index f13065badb4a..210702defe4a 100755
--- a/tools/test/stress2/misc/symlink2.sh
+++ b/tools/test/stress2/misc/symlink2.sh
@@ -53,6 +53,7 @@ for i in "" "-U"; do
 	[ "$i" = "-U" -a "$newfs_flags" != "-U" ] && continue
 	echo "newfs $i /dev/md$mdstart"
 	newfs $i /dev/md$mdstart > /dev/null 2>&1
+	[ "$i" = "" ] && tunefs -n disable md$mdstart
 	mount /dev/md$mdstart $mntpoint
 	mkdir $mntpoint/dir
 
diff --git a/tools/test/stress2/misc/symlink5.sh b/tools/test/stress2/misc/symlink5.sh
index 55f71e209791..9332f906a3e0 100755
--- a/tools/test/stress2/misc/symlink5.sh
+++ b/tools/test/stress2/misc/symlink5.sh
@@ -79,6 +79,7 @@ for i in "" "-U"; do
 	t1=`date +%s`
 	echo "newfs $i /dev/md$mdstart"
 	newfs $i /dev/md$mdstart > /dev/null 2>&1
+	[ "$i" = "" ] && tunefs -n disable md$mdstart
 	mount /dev/md$mdstart $mntpoint
 
 	tst; s=$?