Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 May 2026 23:10:57 +0000
From:      Stefa=?utf-8?Q?n E=C3=9Fer?= <se@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 11f23d7c078b - main - tools/test/stress2/misc: Fix and enable new tests
Message-ID:  <6a1a1d01.43233.7f1bad43@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by se:

URL: https://cgit.FreeBSD.org/src/commit/?id=11f23d7c078b319285727d277f05b6962280bcce

commit 11f23d7c078b319285727d277f05b6962280bcce
Author:     Stefan Eßer <se@FreeBSD.org>
AuthorDate: 2026-05-29 23:05:04 +0000
Commit:     Stefan Eßer <se@FreeBSD.org>
CommitDate: 2026-05-29 23:10:35 +0000

    tools/test/stress2/misc: Fix and enable new tests
    
    The previously committed versions of these tests failed to prevent
    duplicate file names in the list of files to process, leading to
    missing files when a "mv" commando tried to operate on a file that
    had already been renamed.
    
    The test for filenames containing UTF-16 surrogate pairs stays
    disabled, since the required kernel changes have not been committed,
    yet.
---
 tools/test/stress2/misc/all.exclude |  2 --
 tools/test/stress2/misc/msdos22.sh  | 14 ++++++--------
 tools/test/stress2/misc/msdos23.sh  | 12 +++++-------
 tools/test/stress2/misc/msdos24.sh  | 12 +++++-------
 4 files changed, 16 insertions(+), 24 deletions(-)

diff --git a/tools/test/stress2/misc/all.exclude b/tools/test/stress2/misc/all.exclude
index 7109555c5508..ef8cb69cd241 100644
--- a/tools/test/stress2/misc/all.exclude
+++ b/tools/test/stress2/misc/all.exclude
@@ -39,8 +39,6 @@ mount7.sh		https://people.freebsd.org/~pho/stress/log/log0549.txt		20240912
 mlockall2.sh		Unrecoverable OOM killing seen					20190203
 mlockall6.sh		https://people.freebsd.org/~pho/stress/log/log0430.txt		20230403
 mlockall7.sh		Needs further investigation					20210123
-msdos22.sh		Waiting for fix							20260529
-msdos23.sh		Waiting for fix							20260529
 msdos24.sh		Waiting for fix							20260529
 msetdomain.sh		May change policy for random threads to domainset_fixed		20210104
 newfs4.sh		watchdog fired. newbuf (still seen 20240729)			20190225
diff --git a/tools/test/stress2/misc/msdos22.sh b/tools/test/stress2/misc/msdos22.sh
index 158a52a7aa7b..f3a2110f13f1 100755
--- a/tools/test/stress2/misc/msdos22.sh
+++ b/tools/test/stress2/misc/msdos22.sh
@@ -4,13 +4,13 @@
 
 MDUNIT=10
 FS=/mnt
-LOCALE=C.UTF-8
+LOCALE=C
 FILES=1000
 
 export LANG=$LOCALE
 
 randomfilename () {
-	name="f"
+	name=""
 	count=$(jot -r 1 10 3)
 	for r in $(jot -r $count 7 0); do
 		r=$(( r + 0 ))
@@ -40,14 +40,12 @@ randomfilename () {
 	cd $FS/test
 
 	for i in $(jot $FILES); do
-		newfile=$(randomfilename)
-		case $testfiles in
-		*"$newfile"*) continue;;
-		esac
-		testfiles="$(randomfilename)
-$testfiles"
+		testfiles="$testfiles
+$(randomfilename)"
 	done
 
+	testfiles=$(echo "$testfiles" | grep "." | sort -R | uniq)
+
 	for f in $testfiles; do
 		echo "$f" > $f
 	done
diff --git a/tools/test/stress2/misc/msdos23.sh b/tools/test/stress2/misc/msdos23.sh
index 18982c34f68b..fcaa90917235 100755
--- a/tools/test/stress2/misc/msdos23.sh
+++ b/tools/test/stress2/misc/msdos23.sh
@@ -10,7 +10,7 @@ FILES=1000
 export LANG=$LOCALE
 
 randomfilename () {
-	name="f"
+	name=""
 	count=$(jot -r 1 10 3)
 	for r in $(jot -r $count 7 0); do
 		r=$(( r + 0 ))
@@ -40,14 +40,12 @@ randomfilename () {
 	cd $FS/test
 
 	for i in $(jot $FILES); do
-		newfile=$(randomfilename)
-		case $testfiles in
-		*"$newfile"*) continue;;
-		esac
-		testfiles="$(randomfilename)
-$testfiles"
+		testfiles="$testfiles
+$(randomfilename)"
 	done
 
+	testfiles=$(echo "$testfiles" | grep "." | sort -R | uniq)
+
 	for f in $testfiles; do
 		echo "$f" > $f
 	done
diff --git a/tools/test/stress2/misc/msdos24.sh b/tools/test/stress2/misc/msdos24.sh
index 195c4ba8d9b9..edb524293c0c 100755
--- a/tools/test/stress2/misc/msdos24.sh
+++ b/tools/test/stress2/misc/msdos24.sh
@@ -10,7 +10,7 @@ FILES=1000
 export LANG=$LOCALE
 
 randomfilename () {
-	name="f"
+	name=""
 	count=$(jot -r 1 10 3)
 	for r in $(jot -r $count 7 0); do
 		r=$(( r + 0 ))
@@ -41,14 +41,12 @@ randomfilename () {
 	cd $FS/test
 
 	for i in $(jot $FILES); do
-		newfile=$(randomfilename)
-		case $testfiles in
-		*"$newfile"*) continue;;
-		esac
-		testfiles="$(randomfilename)
-$testfiles"
+		testfiles="$testfiles
+$(randomfilename)"
 	done
 
+	testfiles=$(echo "$testfiles" | grep "." | sort -R | uniq)
+
 	for f in $testfiles; do
 		echo "$f" > $f
 	done


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a1a1d01.43233.7f1bad43>