[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: syscalls: Adjust utmpx test.
From: |
Ludovic Courtès |
Subject: |
01/01: syscalls: Adjust utmpx test. |
Date: |
Sat, 25 Nov 2017 12:12:38 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 4aac8d059a2bec9f075ceea2a089ca029a71912c
Author: Ludovic Courtès <address@hidden>
Date: Sat Nov 25 17:22:32 2017 +0100
syscalls: Adjust utmpx test.
Fixes <https://bugs.gnu.org/29426>.
Reported by Adonay Felipe Nogueira <address@hidden>.
* 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 2b5c4c3..22ca2a0 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)))