summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/syscalls.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/syscalls.scm b/tests/syscalls.scm
index 24ea8f5e60..895f90f4d8 100644
--- a/tests/syscalls.scm
+++ b/tests/syscalls.scm
@@ -78,6 +78,21 @@
            (rmdir dir)
            #t))))
 
+(test-equal "statfs, ENOENT"
+  ENOENT
+  (catch 'system-error
+    (lambda ()
+      (statfs "/does-not-exist"))
+    (compose system-error-errno list)))
+
+(test-assert "statfs"
+  (let ((fs (statfs "/")))
+    (and (file-system? fs)
+         (> (file-system-block-size fs) 0)
+         (>= (file-system-blocks-available fs) 0)
+         (>= (file-system-blocks-free fs)
+             (file-system-blocks-available fs)))))
+
 (define (user-namespace pid)
   (string-append "/proc/" (number->string pid) "/ns/user"))