Hi,

I've just pushed a small change to "tests/readutmp.c" (see attached patch) to
align it with the actual "read_utmp()" use in "src/syslog.c" and
"talkd/process.c".

That's all I plan to do today.

Cheers,
Erik
commit 3920c820791791f2bf8c44ed6b9641ecd9e604b5
Author: Erik Auerswald <[email protected]>
Date:   2025-11-23 19:20:03 +0100

    tests: check read_utmp as used in syslogd & talkd
    
    Both syslogd and talkd use the Gnulib read_utmp options
    READ_UTMP_USER_PROCESS | READ_UTMP_CHECK_PIDS, but the
    test file tests/readutmp.c only used READ_UTMP_USER_PROCESS.
    But tests/readutmp.c is intended to check if syslogd and
    talkd can read utmp information, so use the same options.
    
    * tests/readutmp.c (main): Add READ_UTMP_CHECK_PIDS to options
      used with Gnulib's read_utmp() function.

diff --git a/tests/readutmp.c b/tests/readutmp.c
index 81a58f31..c34f37ec 100644
--- a/tests/readutmp.c
+++ b/tests/readutmp.c
@@ -74,7 +74,8 @@ main (int argc, char *argv[])
   found = (getutxuser (name) != 0);
   endutxent ();
 #else /* !HAVE_GETUTXUSER */
-  if (read_utmp (UTMP_FILE, &count, &utmpp, READ_UTMP_USER_PROCESS))
+  if (read_utmp (UTMP_FILE, &count, &utmpp,
+		 READ_UTMP_USER_PROCESS | READ_UTMP_CHECK_PIDS))
     {
       perror ("read_utmp");
       return EXIT_FAILURE;

Reply via email to