From 150309726f221c9b982e594466d35f5b895391d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 19 Jan 2017 23:21:25 +0100 Subject: syscalls: Add utmpx procedures and data structure. * guix/build/syscalls.scm (): New record type. (%utmpx): New C struct. (login-type): New bits. (setutxent, endutxent, getutxent, utmpx-entries): New procedures. --- tests/syscalls.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'tests/syscalls.scm') diff --git a/tests/syscalls.scm b/tests/syscalls.scm index e4ef32c522..fb2c8e7100 100644 --- a/tests/syscalls.scm +++ b/tests/syscalls.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015, 2016 Ludovic Courtès +;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès ;;; Copyright © 2015 David Thompson ;;; ;;; This file is part of GNU Guix. @@ -441,6 +441,17 @@ (> (terminal-columns (open-input-string "Join us now, share the software!")) 0)) +(test-assert "utmpx-entries" + (match (utmpx-entries) + (((? utmpx? entries) ...) + (every (lambda (entry) + (match (utmpx-user entry) + ((? string?) + (> (utmpx-pid entry) 0)) + (#f ;might be DEAD_PROCESS + #t))) + entries)))) + (test-end) (false-if-exception (delete-file temp-file)) -- cgit v1.2.3