aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2020-03-31 13:35:14 -0400
committerGitHub <[email protected]>2020-03-31 10:35:14 -0700
commitc96a32e1a30a97212cdfc68e465e55de52a407d5 (patch)
tree95c614023bda85a524aaad9eca0792444ed0fdf0
parent9a51738b60c2164822baefa17f8fdcebe9d82fbc (diff)
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 <[email protected]> Reviewed-by: John Kennedy <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #10165
-rw-r--r--tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_common.kshlib6
1 files 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 8fc6089b7..3ee09a151 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