From ef09861a0b0aa7c6a948f4e008e2fea312bc68d6 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 15 Dec 2022 15:28:56 +0900 Subject: [PATCH 1/2] test: suppress echo in monitor_check_rr() --- test/units/testsuite-75.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/units/testsuite-75.sh b/test/units/testsuite-75.sh index d2062c7b059..d0c71334125 100755 --- a/test/units/testsuite-75.sh +++ b/test/units/testsuite-75.sh @@ -16,17 +16,17 @@ run() { "$@" |& tee "$RUN_OUT" } -monitor_check_rr() { +monitor_check_rr() ( + set +x + set +o pipefail local match="${1:?}" # Wait until the first mention of the specified log message is # displayed. We turn off pipefail for this, since we don't care about the # lhs of this pipe expression, we only care about the rhs' result to be # clean - set +o pipefail journalctl -u resmontest.service -f --full | grep -m1 "$match" - set -o pipefail -} +) # Test for resolvectl, resolvconf systemctl unmask systemd-resolved.service From 133708b8790ab79e35ade63506c16e4d1e79a025 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 15 Dec 2022 16:28:52 +0900 Subject: [PATCH 2/2] Revert "test: wait for the monitoring service to become active" This reverts commit 5dd34c2604567320707625bc009cf01c3769605f. `resolvectl monitor` sends notify event, and systemd-run wait for the service being in active state. Hence, the loop is not necessary. --- test/units/testsuite-75.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/test/units/testsuite-75.sh b/test/units/testsuite-75.sh index d0c71334125..844dbaebcc5 100755 --- a/test/units/testsuite-75.sh +++ b/test/units/testsuite-75.sh @@ -212,11 +212,6 @@ resolvectl log-level debug # Start monitoring queries systemd-run -u resmontest.service -p Type=notify resolvectl monitor -# Wait for the monitoring service to become active -for _ in {0..9}; do - [[ "$(systemctl show -P ActiveState resmontest.service)" == "active" ]] && break - sleep .5 -done # We need to manually propagate the DS records of onlinesign.test. to the parent # zone, since they're generated online