]> git.proxmox.com Git - mirror_zfs.git/commitdiff
ZTS: zed_start should not fail if zed is already running
authorOlaf Faaland <faaland1@llnl.gov>
Wed, 26 Feb 2020 00:02:10 +0000 (16:02 -0800)
committerGitHub <noreply@github.com>
Wed, 26 Feb 2020 00:02:10 +0000 (16:02 -0800)
zed_start may be called in places where zed is not
typically already running, but this is not a requirement
of the tests.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Closes #9974

tests/zfs-tests/include/libtest.shlib

index e95d2edb86a75083c4213c018359ec999afe0c04..81c4067eabcfc8b9d3996ededf27061cc536f960 100644 (file)
@@ -3621,16 +3621,16 @@ function zed_start
        # Verify the ZED is not already running.
        pgrep -x zed > /dev/null
        if (($? == 0)); then
-               log_fail "ZED already running"
+               log_note "ZED already running"
+       else
+               log_note "Starting ZED"
+               # run ZED in the background and redirect foreground logging
+               # output to $ZED_LOG.
+               log_must truncate -s 0 $ZED_DEBUG_LOG
+               log_must eval "zed -vF -d $ZEDLET_DIR -p $ZEDLET_DIR/zed.pid -P $PATH" \
+                   "-s $ZEDLET_DIR/state 2>$ZED_LOG &"
        fi
 
-       log_note "Starting ZED"
-       # run ZED in the background and redirect foreground logging
-       # output to $ZED_LOG.
-       log_must truncate -s 0 $ZED_DEBUG_LOG
-       log_must eval "zed -vF -d $ZEDLET_DIR -p $ZEDLET_DIR/zed.pid -P $PATH" \
-           "-s $ZEDLET_DIR/state 2>$ZED_LOG &"
-
        return 0
 }