summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-02-11 22:26:36 +0100
committerLudovic Courtès <ludo@gnu.org>2017-02-11 22:28:37 +0100
commita1a8b7f2e20513a3ad968e74e7ec52546404e3c6 (patch)
tree555b746deacfa3dce6dcc5b3d20d92436c96ae30 /tests
parentbd2337228d7576ce84fa06c581b47817bd215478 (diff)
downloadguix-a1a8b7f2e20513a3ad968e74e7ec52546404e3c6.tar.gz
tests: Relax test on utmpx entries.
Partly fixes <http://bugs.gnu.org/25476>.
Reported by Paul Garlick <pgarlick@tourbillion-technology.com>.

* tests/syscalls.scm ("utmpx-entries"): Check whether ENTRY is of type
'BOOT_TIME', in which case PID may be 0.
Diffstat (limited to 'tests')
-rw-r--r--tests/syscalls.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/syscalls.scm b/tests/syscalls.scm
index 1934704375..8db45b41b6 100644
--- a/tests/syscalls.scm
+++ b/tests/syscalls.scm
@@ -447,7 +447,8 @@
      (every (lambda (entry)
               (match (utmpx-user entry)
                 ((? string?)
-                 (> (utmpx-pid entry) 0))
+                 (or (eqv? (login-type BOOT_TIME) (utmpx-login-type entry))
+                     (> (utmpx-pid entry) 0)))
                 (#f                               ;might be DEAD_PROCESS
                  #t)))
             entries))))