ZTS: Skip udev actions in zvol_misc when not Linux

udev is only used on Linux.

Skip udev_wait and udev_cleanup when not on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #10165
This commit is contained in:
Ryan Moeller 2020-03-31 13:35:14 -04:00 committed by GitHub
parent 9a51738b60
commit c96a32e1a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -38,9 +38,7 @@
function udev_wait
{
sleep 1
if is_freebsd; then
return 0
fi
is_linux || return 0
udevadm trigger --action=change
udevadm settle
for i in {1..3}; do
@ -60,7 +58,9 @@ function udev_wait
#
function udev_cleanup
{
is_linux || return 0
log_note "Pruning broken ZVOL symlinks ..."
udevadm settle
# find all dangling links and delete them
find -L "${ZVOL_DEVDIR}" -type l -print -delete