summaryrefslogtreecommitdiff
path: root/tests/syscalls.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-06-06 21:25:43 +0200
committerMarius Bakke <marius@gnu.org>2020-06-06 21:25:43 +0200
commit7ce1b5e7b74d6409d0bd0bc4272f65edc34fd9df (patch)
tree504a250d235a3bc39571e6af1c755077390a371f /tests/syscalls.scm
parentf20d1cfb51ed14f325da000406807076323f70bc (diff)
parentb69ca4d234db8fe2750e9b0d6b6139a5a89a4da6 (diff)
Merge branch 'master' into staging
Diffstat (limited to 'tests/syscalls.scm')
-rw-r--r--tests/syscalls.scm20
1 files changed, 14 insertions, 6 deletions
diff --git a/tests/syscalls.scm b/tests/syscalls.scm
index 3823de7c1e..6acaa0b131 100644
--- a/tests/syscalls.scm
+++ b/tests/syscalls.scm
@@ -1,6 +1,8 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 David Thompson <davet@gnu.org>
+;;; Copyright © 2020 Simon South <simon@simonsouth.net>
+;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -73,21 +75,21 @@
;; Note: 'utimensat' does not change 'ctime'.
(list (stat:mtime st) (stat:atime st)))))
-(test-assert "swapon, ENOENT/EPERM"
+(test-assert "swapon, ENOSYS/ENOENT/EPERM"
(catch 'system-error
(lambda ()
(swapon "/does-not-exist")
#f)
(lambda args
- (memv (system-error-errno args) (list EPERM ENOENT)))))
+ (memv (system-error-errno args) (list EPERM ENOENT ENOSYS)))))
-(test-assert "swapoff, ENOENT/EINVAL/EPERM"
+(test-assert "swapoff, ENOSYS/ENOENT/EINVAL/EPERM"
(catch 'system-error
(lambda ()
(swapoff "/does-not-exist")
#f)
(lambda args
- (memv (system-error-errno args) (list EPERM EINVAL ENOENT)))))
+ (memv (system-error-errno args) (list EPERM EINVAL ENOENT ENOSYS)))))
(test-assert "mkdtemp!"
(let* ((tmp (or (getenv "TMPDIR") "/tmp"))
@@ -275,8 +277,14 @@
(let ((key "user.translator")
(value "/hurd/pfinet\0")
(file (open-file temp-file "w0")))
- (setxattr temp-file key value)
- (string=? (getxattr temp-file key) value)))
+ (catch 'system-error
+ (lambda ()
+ (setxattr temp-file key value)
+ (string=? (getxattr temp-file key) value))
+ (lambda args
+ ;; Accept ENOTSUP, if the file-system does not support extended user
+ ;; attributes.
+ (memv (system-error-errno args) (list ENOTSUP))))))
(false-if-exception (delete-file temp-file))
(test-equal "fcntl-flock wait"