tests: Deal with 'mount-points' not returning "/".
Fixes <http://bugs.gnu.org/20261>. Reported by Mark H Weaver <mhw@netris.org>. * tests/syscalls.scm ("mount-points"): Check for a few other likely mount points in addition to "/".
This commit is contained in:
parent
d45d8904b0
commit
381ac93b5e
|
@ -19,6 +19,7 @@
|
||||||
(define-module (test-syscalls)
|
(define-module (test-syscalls)
|
||||||
#:use-module (guix build syscalls)
|
#:use-module (guix build syscalls)
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
|
#:use-module (srfi srfi-26)
|
||||||
#:use-module (srfi srfi-64)
|
#:use-module (srfi srfi-64)
|
||||||
#:use-module (ice-9 match))
|
#:use-module (ice-9 match))
|
||||||
|
|
||||||
|
@ -45,7 +46,10 @@
|
||||||
(memv (system-error-errno args) (list EPERM ENOENT)))))
|
(memv (system-error-errno args) (list EPERM ENOENT)))))
|
||||||
|
|
||||||
(test-assert "mount-points"
|
(test-assert "mount-points"
|
||||||
(member "/" (mount-points)))
|
;; Reportedly "/" is not always listed as a mount point, so check a few
|
||||||
|
;; others (see <http://bugs.gnu.org/20261>.)
|
||||||
|
(any (cute member <> (mount-points))
|
||||||
|
'("/" "/proc" "/sys" "/dev")))
|
||||||
|
|
||||||
(test-assert "swapon, ENOENT/EPERM"
|
(test-assert "swapon, ENOENT/EPERM"
|
||||||
(catch 'system-error
|
(catch 'system-error
|
||||||
|
|
Loading…
Reference in New Issue