~ruther/guix-local

2793c0fb263bcadebd59c793a4cdf2634fb77360 — Ludovic Courtès 11 years ago d53e8ba
syscalls: Accept ENOENT in the 'swapoff' test.

Fixes <http://bugs.gnu.org/18690>.
Reported by Philip Woods <elzairthesorcerer@gmail.com>.

* tests/syscalls.scm ("swapoff, EINVAL/EPERM"): Rename to...
  ("swapoff, ENOENT/EINVAL/EPERM"): ... this.  Add ENOENT to the list of
  possible return values.
1 files changed, 2 insertions(+), 2 deletions(-)

M tests/syscalls.scm
M tests/syscalls.scm => tests/syscalls.scm +2 -2
@@ 52,13 52,13 @@
    (lambda args
      (memv (system-error-errno args) (list EPERM ENOENT)))))

(test-assert "swapoff, EINVAL/EPERM"
(test-assert "swapoff, ENOENT/EINVAL/EPERM"
  (catch 'system-error
    (lambda ()
      (swapoff "/does-not-exist")
      #f)
    (lambda args
      (memv (system-error-errno args) (list EPERM EINVAL)))))
      (memv (system-error-errno args) (list EPERM EINVAL ENOENT)))))

(test-assert "all-network-interfaces"
  (match (all-network-interfaces)