From be8cb8d8c228576a2d3934f05b064cb785ad5801 Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Tue, 31 Mar 2020 13:35:14 -0400 Subject: [PATCH] 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 Reviewed-by: John Kennedy Reviewed-by: George Melikov Signed-off-by: Ryan Moeller Closes #10165 --- .../tests/functional/zvol/zvol_misc/zvol_misc_common.kshlib | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_common.kshlib b/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_common.kshlib index 8fc6089b7f5c..3ee09a151b12 100644 --- a/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_common.kshlib +++ b/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_common.kshlib @@ -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