Make indentation consistent with other tests, and use syncwait.
MFC after: 2 weeks Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
ca623e07ce
commit
504eda2021
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326862
@ -35,9 +35,7 @@ devwait # This will take kern.geom.mirror.timeout seconds.
|
||||
|
||||
# Re-attach the second mirror and wait for it to synchronize.
|
||||
us1=$(attach_md -t vnode -f $m2) || exit 1
|
||||
while [ $(gmirror status $name | grep ACTIVE | wc -l) -ne 2 ]; do
|
||||
sleep 1
|
||||
done
|
||||
syncwait
|
||||
|
||||
# Verify the two mirrors are identical. Destroy the gmirror first so that
|
||||
# the mirror metadata is wiped; otherwise the metadata blocks will fail
|
||||
@ -45,9 +43,9 @@ done
|
||||
# command instead.
|
||||
gmirror destroy $name
|
||||
if cmp -s ${m1} ${m2}; then
|
||||
echo "ok 1"
|
||||
echo "ok 1"
|
||||
else
|
||||
echo "not ok 1"
|
||||
echo "not ok 1"
|
||||
fi
|
||||
|
||||
rm -f $m1 $m2
|
||||
|
@ -33,9 +33,7 @@ sysctl debug.fail_point.g_mirror_metadata_write='off' || exit 1
|
||||
# Replace the broken mirror, and then stop the gmirror.
|
||||
gmirror forget $name || exit 1
|
||||
gmirror insert $name /dev/$us2 || exit 1
|
||||
while [ $(gmirror status $name | grep ACTIVE | wc -l) -ne 2 ]; do
|
||||
sleep 1
|
||||
done
|
||||
syncwait
|
||||
gmirror stop $name || exit 1
|
||||
|
||||
# Restart the gmirror on the original two mirrors. One of them is broken,
|
||||
@ -49,14 +47,12 @@ dd if=/dev/random of=/dev/mirror/$name bs=$ddbs count=1 >/dev/null 2>&1
|
||||
# the metadata blocks will fail the comparison. It would be nice to do this
|
||||
# with a "gmirror verify" command instead.
|
||||
gmirror activate $name /dev/$us2 || exit 1
|
||||
while [ $(gmirror status $name | grep ACTIVE | wc -l) -ne 2 ]; do
|
||||
sleep 1
|
||||
done
|
||||
syncwait
|
||||
gmirror destroy $name || exit 1
|
||||
if cmp -s $m1 $m3; then
|
||||
echo "ok 1"
|
||||
echo "ok 1"
|
||||
else
|
||||
echo "not ok 1"
|
||||
echo "not ok 1"
|
||||
fi
|
||||
|
||||
rm -f $m1 $m2 $m3
|
||||
|
Loading…
Reference in New Issue
Block a user