From 4aac8d059a2bec9f075ceea2a089ca029a71912c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sat, 25 Nov 2017 17:22:32 +0100 Subject: [PATCH] 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(-) 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)))