ZTS: Waiting for zvols to be available

The ZTS block_device_wait helper function should use -e when waiting
for a file to appear since it will be either a block special device
or a symlink.  This didn't cause any failures but when a device path
was specified the function would wait longer than needed.

Additionally update the most flakey test cases to pass the file path
to block_device_wait to try and improve the test reliability.  The
udev behavior on Fedora in particular can result in frequent false
positives.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #12515
This commit is contained in:
Brian Behlendorf
2021-08-29 08:56:58 -07:00
committed by Tony Hutter
parent 6c3c7dc846
commit 6bb6410570
6 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ function block_device_wait
typeset missing=false
typeset dev
for dev in "${@}"; do
if ! [[ -f $dev ]]; then
if ! [[ -e $dev ]]; then
missing=true
break
fi