git: 87000c893c24 - main - stress2: Finish work on two gunion(8) test scenarios
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 16 Feb 2022 09:21:27 UTC
The branch main has been updated by pho:
URL: https://cgit.FreeBSD.org/src/commit/?id=87000c893c2474c7ac47e2934e1773df921c4732
commit 87000c893c2474c7ac47e2934e1773df921c4732
Author: Peter Holm <pho@FreeBSD.org>
AuthorDate: 2022-02-16 09:20:39 +0000
Commit: Peter Holm <pho@FreeBSD.org>
CommitDate: 2022-02-16 09:20:39 +0000
stress2: Finish work on two gunion(8) test scenarios
---
tools/test/stress2/misc/gunion.sh | 5 +++--
tools/test/stress2/misc/gunion2.sh | 7 +++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/test/stress2/misc/gunion.sh b/tools/test/stress2/misc/gunion.sh
index 6ba60de3f988..c7d376e5409e 100755
--- a/tools/test/stress2/misc/gunion.sh
+++ b/tools/test/stress2/misc/gunion.sh
@@ -43,7 +43,7 @@ s=0
set -e
mdconfig -a -t swap -s 5g -u $md1
-newfs $newfs_flags -n /dev/md$md1
+newfs $newfs_flags -n /dev/md$md1 > /dev/null
mkdir -p $mp1 $mp2
mount /dev/md$md1 $mp1
cp -r ../../stress2 $mp1
@@ -73,9 +73,10 @@ fsck_ffs -fyR /dev/md$md2-md$md1.union > $log 2>&1
grep -Eq "IS CLEAN|MARKED CLEAN" $log || { s=2; cat $log; }
set +e
gunion commit /dev/md$md2-md$md1.union
+gunion list | egrep Block\|Current | egrep -v 0 && s=3
gunion destroy /dev/md$md2-md$md1.union
fsck_ffs -fyR /dev/md$md1 > $log 2>&1
-grep -Eq "IS CLEAN|MARKED CLEAN" $log || { s=3; cat $log; }
+grep -Eq "IS CLEAN|MARKED CLEAN" $log || { s=4; cat $log; }
mdconfig -d -u $md2
mdconfig -d -u $md1
rm -f $log
diff --git a/tools/test/stress2/misc/gunion2.sh b/tools/test/stress2/misc/gunion2.sh
index e6a7ab6331cb..a8fe180c48af 100755
--- a/tools/test/stress2/misc/gunion2.sh
+++ b/tools/test/stress2/misc/gunion2.sh
@@ -43,7 +43,7 @@ s=0
set -e
mdconfig -a -t swap -s 5g -u $md1
-newfs $newfs_flags -n /dev/md$md1 > /dev/null
+newfs -n /dev/md$md1 > /dev/null
mkdir -p $mp1 $mp2
mount /dev/md$md1 $mp1
cp -r ../../stress2 $mp1
@@ -84,8 +84,6 @@ chmod 777 $mntpoint
su $testuser -c \
"(cd $mntpoint/stress2; ./testcases/run/run $TESTPROGS)"
-n=`find $mntpoint/stressX | wc -l`
-[ $n -eq 1 ] && s=0 || s=1
for i in `jot 6`; do
mount | grep -q "on $mntpoint " || break
umount $mntpoint && break || sleep 10
@@ -96,9 +94,10 @@ fsck_ffs -fyR /dev/md$md2-md$md1.union > $log 2>&1
grep -Eq "IS CLEAN|MARKED CLEAN" $log || { s=2; cat $log; }
set +e
gunion commit /dev/md$md2-md$md1.union
+gunion list | egrep Block\|Current | egrep -v 0 && s=3
gunion destroy /dev/md$md2-md$md1.union
fsck_ffs -fyR /dev/md$md1 > $log 2>&1
-grep -Eq "IS CLEAN|MARKED CLEAN" $log || { s=3; cat $log; }
+grep -Eq "IS CLEAN|MARKED CLEAN" $log || { s=4; cat $log; }
mdconfig -d -u $md2
mdconfig -d -u $md1
rm -f $log