summaryrefslogtreecommitdiff
path: root/tests/syscalls.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-09-14 21:39:51 +0200
committerLudovic Courtès <ludo@gnu.org>2014-09-14 23:49:02 +0200
commit7585016f53e2e8be1f82ed303ae084464422c2a8 (patch)
treec318e4e69fd0aa7d24d5631c2ff62a0df30c1245 /tests/syscalls.scm
parent150d8e6414cad90e1da7d767251b874688e89e26 (diff)
syscalls: Add 'network-interfaces'.
* guix/build/syscalls.scm (SIOCGIFCONF, ifconf-struct, ifreq-struct-size): New variables. (%ioctl, bytevector->string-list, network-interfaces): New procedures. * tests/syscalls.scm ("network-interfaces"): New test.
Diffstat (limited to 'tests/syscalls.scm')
-rw-r--r--tests/syscalls.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/syscalls.scm b/tests/syscalls.scm
index ab34fc825bb..fa6b67bf398 100644
--- a/tests/syscalls.scm
+++ b/tests/syscalls.scm
@@ -18,7 +18,8 @@
18 18
19(define-module (test-syscalls) 19(define-module (test-syscalls)
20 #:use-module (guix build syscalls) 20 #:use-module (guix build syscalls)
21 #:use-module (srfi srfi-64)) 21 #:use-module (srfi srfi-64)
22 #:use-module (ice-9 match))
22 23
23;; Test the (guix build syscalls) module, although there's not much that can 24;; Test the (guix build syscalls) module, although there's not much that can
24;; actually be tested without being root. 25;; actually be tested without being root.
@@ -42,6 +43,11 @@
42 ;; Both return values have been encountered in the wild. 43 ;; Both return values have been encountered in the wild.
43 (memv (system-error-errno args) (list EPERM ENOENT))))) 44 (memv (system-error-errno args) (list EPERM ENOENT)))))
44 45
46(test-assert "network-interfaces"
47 (match (network-interfaces)
48 (((? string? names) ..1)
49 (member "lo" names))))
50
45(test-end) 51(test-end)
46 52
47 53