diff options
Diffstat (limited to 'tests/zfs-tests/include/libtest.shlib')
-rw-r--r-- | tests/zfs-tests/include/libtest.shlib | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib index 6b1658c1b..cc9fddd41 100644 --- a/tests/zfs-tests/include/libtest.shlib +++ b/tests/zfs-tests/include/libtest.shlib @@ -3158,14 +3158,26 @@ function zed_stop if [[ -f ${ZEDLET_DIR}/zed.pid ]]; then zedpid=$(cat ${ZEDLET_DIR}/zed.pid) kill $zedpid - wait $zedpid + while ps -p $zedpid > /dev/null; do + sleep 1 + done rm -f ${ZEDLET_DIR}/zed.pid fi - return 0 } # +# Drain all zevents +# +function zed_events_drain +{ + while [ $(zpool events -H | wc -l) -ne 0 ]; do + sleep 1 + zpool events -c >/dev/null + done +} + +# # Check is provided device is being active used as a swap device. # function is_swap_inuse |