ZTS: Improve block_device_wait on FreeBSD
authorRyan Moeller <freqlabs@FreeBSD.org>
Mon, 24 Aug 2020 15:50:15 +0000 (11:50 -0400)
committerGitHub <noreply@github.com>
Mon, 24 Aug 2020 15:50:15 +0000 (08:50 -0700)
commitb0e75805eefcb09186010afc8d27748e60f80329
tree858a4dd90737497386fdec304a7b9a0588d54508
parent07ce8961e52bc9c4f9f978357551c507239a7410
ZTS: Improve block_device_wait on FreeBSD

FreeBSD doesn't have an equivalent to udevadm settle, so we have been
resorting to a three second sleep to wait for device changes to take
effect.  This is far from ideal.

We are mainly waiting for volmode=geom zvols to appear in /dev, so as
a hack, reading the geom config will have the desired effect of
quiescing the geom state.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #10768
tests/zfs-tests/include/blkdev.shlib