From 88b8d0827691a6c9643c6bd06e73f4ab86dba578 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 21 Jan 2024 13:14:15 +0900 Subject: [PATCH] test: check pam warning message --- src/shared/pam-util.c | 1 + test/units/end.sh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/shared/pam-util.c b/src/shared/pam-util.c index fe58203e273..0e24af450d9 100644 --- a/src/shared/pam-util.c +++ b/src/shared/pam-util.c @@ -95,6 +95,7 @@ static void pam_bus_data_destroy(pam_handle_t *handle, void *data, int error_sta PamBusData *d = data; if (FLAGS_SET(error_status, PAM_DATA_SILENT) && d->bus && bus_origin_changed(d->bus)) + /* Please adjust test/units/end.sh when updating the log message. */ pam_syslog(handle, LOG_DEBUG, "Attempted to close sd-bus after fork whose connection is opened before the fork, this should not happen."); pam_bus_data_free(data); diff --git a/test/units/end.sh b/test/units/end.sh index dd50654f8d1..230b716e2f1 100755 --- a/test/units/end.sh +++ b/test/units/end.sh @@ -6,5 +6,8 @@ set -o pipefail (! journalctl -q -o short-monotonic --grep "didn't pass validation" >>/failed) +# Here, the redundant '[.]' at the end is for making not the logged self command hit the grep. +(! journalctl -q -o short-monotonic --grep 'Attempted to close sd-bus after fork whose connection is opened before the fork, this should not happen[.]' >>/failed) + systemctl poweroff --no-block exit 0 -- 2.47.3