From a64e8d254dc9ecd38594b71dcd7d53c6084c5abc Mon Sep 17 00:00:00 2001 From: ngie Date: Mon, 14 Mar 2016 01:35:46 +0000 Subject: MFC r293878,r293880,r295116,r295117,r295477: r293878: Remove unnecessary kldload logic added to geom_subr.sh in r293028 r293880: PID file support hasn't been committed for ggated(8) yet. Unbreak running the testcase more than once by restoring the "killall ggated" r295116: Add an additional 1 second sleep to after calling ggatec before calling dd to defeat a race when writing out to the geom_gate(4) device This will quell the Jenkins failure emails until I come up with a better solution r295117: Use the pidfile support added to ggated(8) in r294973 to ensure that the ggated(8) daemon used by the tests is the instance specifically invoked by the tests instead of one or more daemon instances running on the system r295477: Similar to r295116, add an additional 1 second sleep after calling ggatel before calling dd to defeat a race when writing out to the geom_gate(4) device --- tests/sys/geom/class/gate/1_test.sh | 5 +++-- tests/sys/geom/class/gate/3_test.sh | 1 + tests/sys/geom/class/gate/conf.sh | 2 -- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/sys') diff --git a/tests/sys/geom/class/gate/1_test.sh b/tests/sys/geom/class/gate/1_test.sh index 83f6096..ba573bb 100644 --- a/tests/sys/geom/class/gate/1_test.sh +++ b/tests/sys/geom/class/gate/1_test.sh @@ -10,8 +10,8 @@ us=0 while [ -c /dev/ggate${us} ]; do : $(( us += 1 )) done +pidfile=ggated.$$.pid conf=`mktemp $base.XXXXXX` || exit 1 -pidfile=/var/run/ggated.pid port=33080 work=$(attach_md -t malloc -s 1M) @@ -31,7 +31,7 @@ src_checksum=$(md5 -q /dev/$src) echo "127.0.0.1 RW /dev/$work" > $conf -if ! ggated -p $port $conf; then +if ! ggated -p $port -F $pidfile $conf; then echo 'ggated failed to start' echo 'Bail out!' exit 1 @@ -42,6 +42,7 @@ if ! ggatec create -p $port -u $us 127.0.0.1 /dev/$work; then echo 'Bail out!' exit 1 fi +sleep 1 dd if=/dev/${src} of=/dev/ggate${us} bs=1m count=1 sleep 1 diff --git a/tests/sys/geom/class/gate/3_test.sh b/tests/sys/geom/class/gate/3_test.sh index 8901aca..3511df7 100644 --- a/tests/sys/geom/class/gate/3_test.sh +++ b/tests/sys/geom/class/gate/3_test.sh @@ -27,6 +27,7 @@ if ! ggatel create -u $us /dev/$work; then exit 1 fi +sleep 1 dd if=/dev/${src} of=/dev/ggate${us} bs=1m count=1 conv=sync sleep 1 diff --git a/tests/sys/geom/class/gate/conf.sh b/tests/sys/geom/class/gate/conf.sh index 4eede08..7e22ce4 100755 --- a/tests/sys/geom/class/gate/conf.sh +++ b/tests/sys/geom/class/gate/conf.sh @@ -5,6 +5,4 @@ name="$(mktemp -u gate.XXXXXX)" class="gate" base=`basename $0` -kldstat -q -m g_${class} || kldload geom_${class} || exit 1 - . `dirname $0`/../geom_subr.sh -- cgit v1.1