diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2017-11-25 17:22:32 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2017-11-25 18:12:33 +0100 |
| commit | 4aac8d059a2bec9f075ceea2a089ca029a71912c (patch) | |
| tree | 656bad9689f011168a30e8be4c6d2ce43c62bc0c | |
| parent | 1e0ea1d8dfa0d17e4451f71f17d34541738ec0c6 (diff) | |
syscalls: Adjust utmpx test.
Fixes <https://bugs.gnu.org/29426>.
Reported by Adonay Felipe Nogueira <adfeno@hyperbola.info>.
* tests/syscalls.scm ("utmpx-entries"): Check the value
of (utmpx-entries entry) only for INIT_PROCESS, LOGIN_PROCESS, and
USER_PROCESS entries.
| -rw-r--r-- | tests/syscalls.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/syscalls.scm b/tests/syscalls.scm index 2b5c4c3be11..22ca2a05d44 100644 --- a/tests/syscalls.scm +++ b/tests/syscalls.scm | |||
| @@ -525,7 +525,12 @@ | |||
| 525 | (every (lambda (entry) | 525 | (every (lambda (entry) |
| 526 | (match (utmpx-user entry) | 526 | (match (utmpx-user entry) |
| 527 | ((? string?) | 527 | ((? string?) |
| 528 | (or (eqv? (login-type BOOT_TIME) (utmpx-login-type entry)) | 528 | ;; Ensure we have a valid PID for those entries where it |
| 529 | ;; makes sense. | ||
| 530 | (or (not (memv (utmpx-login-type entry) | ||
| 531 | (list (login-type INIT_PROCESS) | ||
| 532 | (login-type LOGIN_PROCESS) | ||
| 533 | (login-type USER_PROCESS)))) | ||
| 529 | (> (utmpx-pid entry) 0))) | 534 | (> (utmpx-pid entry) 0))) |
| 530 | (#f ;might be DEAD_PROCESS | 535 | (#f ;might be DEAD_PROCESS |
| 531 | #t))) | 536 | #t))) |
