diff options
| author | Stefan Eßer <se@FreeBSD.org> | 2026-05-29 23:05:04 +0000 |
|---|---|---|
| committer | Stefan Eßer <se@FreeBSD.org> | 2026-05-29 23:10:35 +0000 |
| commit | 11f23d7c078b319285727d277f05b6962280bcce (patch) | |
| tree | ed048b814a4155bef6bb17e27cf22a38cc7bb9b2 | |
| parent | 692b0ef1506ba51b72d0a2707cbf8879a6e01d78 (diff) | |
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.
| -rw-r--r-- | tools/test/stress2/misc/all.exclude | 2 | ||||
| -rwxr-xr-x | tools/test/stress2/misc/msdos22.sh | 14 | ||||
| -rwxr-xr-x | tools/test/stress2/misc/msdos23.sh | 12 | ||||
| -rwxr-xr-x | 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 |
