diff options
author | Peter Holm <pho@FreeBSD.org> | 2023-02-06 10:09:52 +0000 |
---|---|---|
committer | Peter Holm <pho@FreeBSD.org> | 2023-02-06 10:09:52 +0000 |
commit | 0126bd3e6ca43c350437fa8bfe72958a5aad5984 (patch) | |
tree | 46599ccf1dcfffafbd3d2dbebef6dbc6bf3ad0ce | |
parent | 3cc3c1eb7961cf93306e0a0f79f3e2309f5b7011 (diff) | |
download | src-0126bd3e6ca43c350437fa8bfe72958a5aad5984.tar.gz src-0126bd3e6ca43c350437fa8bfe72958a5aad5984.zip |
stress2: Return error on exit. Run test for longer
-rwxr-xr-x | tools/test/stress2/misc/mkdir.sh | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/test/stress2/misc/mkdir.sh b/tools/test/stress2/misc/mkdir.sh index 155de9b61cc6..39cc828f0303 100755 --- a/tools/test/stress2/misc/mkdir.sh +++ b/tools/test/stress2/misc/mkdir.sh @@ -28,7 +28,7 @@ # # Demonstrate incorrect "out of inodes" message with SU enabled. -# No issue without SU. +# No issue seen with SU+J [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 . ../default.cfg @@ -45,18 +45,23 @@ mdconfig -a -t swap -s 100m -u $mdstart echo "newfs $flags /dev/md$mdstart" newfs $flags /dev/md$mdstart > /dev/null mount /dev/md$mdstart $mntpoint -jot 10 | xargs -I% mkdir $mntpoint/% set +e ifree1=`df -i $mntpoint | tail -1 | awk '{print $7}'` before=`df -i $mntpoint` n=$(((ifree1 - 5) / 10)) -for i in `jot 5`; do +jot 10 | xargs -I% mkdir $mntpoint/% +start=`date +%s` +while [ $((`date +%s` - start)) -lt 180 ]; do for j in `jot 10`; do jot $n | xargs -P0 -I% mkdir $mntpoint/$j/% jot $n | xargs -P0 -I% rmdir $mntpoint/$j/% done -done 2>&1 | head -5 +done 2>&1 | tee $log | head -5 +[ -s $log ] && s=3 +jot 10 | xargs -I% rmdir $mntpoint/% +umount $mntpoint; mount /dev/md$mdstart $mntpoint + ifree2=`df -i $mntpoint | tail -1 | awk '{print $7}'` after=`df -i $mntpoint | tail -1` if [ $ifree1 -ne $ifree2 ]; then |