From 7adbe85e60fce61d0082a9c46604a26d651cb87a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 25 Mar 2016 17:29:36 +0100 Subject: syscalls: 'interface-address' can return #f. Fixes . Reported by Danny Milosavljevic . * tests/syscalls.scm ("network-interfaces returns one or more interfaces"): Accept 'interface-address' value of #f. --- tests/syscalls.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/syscalls.scm') diff --git a/tests/syscalls.scm b/tests/syscalls.scm index a57a9ca9f9..feeb74c11b 100644 --- a/tests/syscalls.scm +++ b/tests/syscalls.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015 Ludovic Courtès +;;; Copyright © 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2015 David Thompson ;;; ;;; This file is part of GNU Guix. @@ -223,7 +223,11 @@ ((interfaces ..1) (list (every interface? interfaces) (every string? (map interface-name interfaces)) - (every vector? (map interface-address interfaces)))))) + (every (lambda (sockaddr) + ;; Sometimes interfaces have no associated address. + (or (vector? sockaddr) + (not sockaddr))) + (map interface-address interfaces)))))) (test-equal "network-interfaces returns \"lo\"" (list #t (make-socket-address AF_INET (inet-pton AF_INET "127.0.0.1") 0)) -- cgit v1.2.3