mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
ocaml: Skip mount-local test if /dev/fuse is not writable.
This commit is contained in:
@@ -30,6 +30,14 @@ let debug = true (* overview debugging messages *)
|
||||
let rec main () =
|
||||
Random.self_init ();
|
||||
|
||||
let fuse_writable =
|
||||
try access "/dev/fuse" [W_OK]; true with Unix_error _ -> false in
|
||||
if not fuse_writable then (
|
||||
printf "%s: test skipped because /dev/fuse is not writable.\n"
|
||||
Sys.executable_name;
|
||||
exit 77
|
||||
);
|
||||
|
||||
(* Allow the test to be skipped by setting this environment variable.
|
||||
* This is for RHEL 5, where FUSE doesn't work very reliably.
|
||||
*)
|
||||
|
||||
Reference in New Issue
Block a user