summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/syscalls.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/syscalls.scm b/tests/syscalls.scm
index 8c048e6109..2b5c4c3be1 100644
--- a/tests/syscalls.scm
+++ b/tests/syscalls.scm
@@ -361,6 +361,16 @@
          (lambda args
            (system-error-errno args)))))
 
+(test-equal "loopback-network-interface-running?"
+  ENODEV
+  (and (network-interface-running? "lo")
+       (catch 'system-error
+         (lambda ()
+           (network-interface-running? "nonexistent")
+           #f)
+         (lambda args
+           (system-error-errno args)))))
+
 (test-skip (if (zero? (getuid)) 1 0))
 (test-assert "set-network-interface-flags"
   (let ((sock (socket AF_INET SOCK_STREAM 0)))