From owner-svn-src-head@freebsd.org Thu Dec 14 22:14:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B38CE91A1C; Thu, 14 Dec 2017 22:14:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64F9D7C105; Thu, 14 Dec 2017 22:14:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBEME7vj013945; Thu, 14 Dec 2017 22:14:07 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBEME7lx013943; Thu, 14 Dec 2017 22:14:07 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712142214.vBEME7lx013943@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 14 Dec 2017 22:14:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326862 - head/tests/sys/geom/class/mirror X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/tests/sys/geom/class/mirror X-SVN-Commit-Revision: 326862 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 22:14:08 -0000 Author: markj Date: Thu Dec 14 22:14:07 2017 New Revision: 326862 URL: https://svnweb.freebsd.org/changeset/base/326862 Log: Make indentation consistent with other tests, and use syncwait. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/tests/sys/geom/class/mirror/8_test.sh head/tests/sys/geom/class/mirror/9_test.sh Modified: head/tests/sys/geom/class/mirror/8_test.sh ============================================================================== --- head/tests/sys/geom/class/mirror/8_test.sh Thu Dec 14 22:11:35 2017 (r326861) +++ head/tests/sys/geom/class/mirror/8_test.sh Thu Dec 14 22:14:07 2017 (r326862) @@ -35,9 +35,7 @@ devwait # This will take kern.geom.mirror.timeout seco # 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 Modified: head/tests/sys/geom/class/mirror/9_test.sh ============================================================================== --- head/tests/sys/geom/class/mirror/9_test.sh Thu Dec 14 22:11:35 2017 (r326861) +++ head/tests/sys/geom/class/mirror/9_test.sh Thu Dec 14 22:14:07 2017 (r326862) @@ -33,9 +33,7 @@ sysctl debug.fail_point.g_mirror_metadata_write='off' # 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= # 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