diff options
author | Ryan Moeller <[email protected]> | 2020-08-24 11:50:15 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-24 08:50:15 -0700 |
commit | b0e75805eefcb09186010afc8d27748e60f80329 (patch) | |
tree | 858a4dd90737497386fdec304a7b9a0588d54508 | |
parent | 07ce8961e52bc9c4f9f978357551c507239a7410 (diff) |
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 <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #10768
-rw-r--r-- | tests/zfs-tests/include/blkdev.shlib | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/zfs-tests/include/blkdev.shlib b/tests/zfs-tests/include/blkdev.shlib index 28f439fca..b34f2c04d 100644 --- a/tests/zfs-tests/include/blkdev.shlib +++ b/tests/zfs-tests/include/blkdev.shlib @@ -81,7 +81,9 @@ function block_device_wait log_note udevadm settle time too long: $elapsed elif is_freebsd; then if [[ ${#@} -eq 0 ]]; then - sleep 3 + # Do something that has to go through the geom event + # queue to complete. + sysctl kern.geom.conftxt >/dev/null return fi fi |