From 4aac8d059a2bec9f075ceea2a089ca029a71912c Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 25 Nov 2017 17:22:32 +0100 Subject: syscalls: Adjust utmpx test. Fixes . Reported by Adonay Felipe Nogueira . * tests/syscalls.scm ("utmpx-entries"): Check the value of (utmpx-entries entry) only for INIT_PROCESS, LOGIN_PROCESS, and USER_PROCESS entries. --- tests/syscalls.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/syscalls.scm b/tests/syscalls.scm index 2b5c4c3be1..22ca2a05d4 100644 --- a/tests/syscalls.scm +++ b/tests/syscalls.scm @@ -525,7 +525,12 @@ (every (lambda (entry) (match (utmpx-user entry) ((? string?) - (or (eqv? (login-type BOOT_TIME) (utmpx-login-type entry)) + ;; Ensure we have a valid PID for those entries where it + ;; makes sense. + (or (not (memv (utmpx-login-type entry) + (list (login-type INIT_PROCESS) + (login-type LOGIN_PROCESS) + (login-type USER_PROCESS)))) (> (utmpx-pid entry) 0))) (#f ;might be DEAD_PROCESS #t))) -- cgit v1.2.3