Replace for/retry loops with "wait_for_ggate_device" calls and check
authorngie <ngie@FreeBSD.org>
Thu, 2 Feb 2017 03:54:43 +0000 (03:54 +0000)
committerngie <ngie@FreeBSD.org>
Thu, 2 Feb 2017 03:54:43 +0000 (03:54 +0000)
commit95fca9ca4d311304102453d3d47e55a16581589e
tree3de2b3f3cd1663091c5859c798b9ec43ff2a42c7
parent7055568df5b7b16b68b11d7d9d3e978b42baf70b
Replace for/retry loops with "wait_for_ggate_device" calls and check
results of commands

As noted in r313008, the underlying issue was that geom_gate device
creation wasn't created at ggatel command completion, but some short
time after. ggatec(8) employs similar logic when creating geom_gate(4)
devices.

Switch from retry loops (after the ggatec/dd write calls) to
wait_for_ggate_device function calls after calling ggatec(8) instead
to detect the presence of the /dev/ggate* device, as this function is
sufficient for determining whether or not the character device is ready
for testing

While here, use atf_check consistently with all dd calls to ensure that
data output is as expected.

MFC after: 1 week
Reviewed by: asomers
Differential Revision: D9409
Sponsored by: Dell EMC Isilon
tests/sys/geom/class/gate/ggate_test.sh