From: Yu Watanabe Date: Mon, 6 Feb 2023 13:49:35 +0000 (+0900) Subject: test: use notice log level to make easily filter out logs from PID1 X-Git-Tag: v253-rc3~36^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=577a0fd59bf8fdf533bc8d120e350fe8a3f040bf;p=thirdparty%2Fsystemd.git test: use notice log level to make easily filter out logs from PID1 --- diff --git a/test/testsuite-04.units/logs-filtering.service b/test/testsuite-04.units/logs-filtering.service index fc89021ca98..06210868fd2 100644 --- a/test/testsuite-04.units/logs-filtering.service +++ b/test/testsuite-04.units/logs-filtering.service @@ -3,3 +3,4 @@ Description=Log filtering unit [Service] ExecStart=sh -c 'while true; do echo "Logging from the service, and ~more~"; sleep .25; done' +SyslogLevel=notice diff --git a/test/units/testsuite-04.sh b/test/units/testsuite-04.sh index 2874fc778f9..d10a9afbf7c 100755 --- a/test/units/testsuite-04.sh +++ b/test/units/testsuite-04.sh @@ -199,7 +199,7 @@ function run_service_and_fetch_logs() { journalctl --sync END=$(date '+%Y-%m-%d %T.%6N') - journalctl -q -u "$UNIT" -S "$START" -U "$END" | grep -Pv "systemd\[[0-9]+\]" + journalctl -q -u "$UNIT" -S "$START" -U "$END" -p notice systemctl stop "$UNIT" }