~ruther/guix-local

35066aa596931ef84922298c2760ceba69940cd1 — Ludovic Courtès 11 years ago 5895f24
syscalls: Be more permissive in 'umount' test.

* tests/syscalls.scm ("umount, ENOENT"): Rename to...
  ("umount, ENOENT/EPERM"): ... this.  Accept EPERM as a valid return
  value.
1 files changed, 4 insertions(+), 3 deletions(-)

M tests/syscalls.scm
M tests/syscalls.scm => tests/syscalls.scm +4 -3
@@ 33,13 33,14 @@
      #f)
    (compose system-error-errno list)))

(test-equal "umount, ENOENT"
  ENOENT
(test-assert "umount, ENOENT/EPERM"
  (catch 'system-error
    (lambda ()
      (umount "/does-not-exist")
      #f)
    (compose system-error-errno list)))
    (lambda args
      ;; Both return values have been encountered in the wild.
      (memv (system-error-errno args) (list EPERM ENOENT)))))

(test-end)