From 068455f21005aa7cf7ea9c0a82e01f2cf58659e1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 25 May 2014 22:28:27 +0100 Subject: [PATCH] fuse: Skip guestmount --fd test if /dev/fuse does not exist. When we run guestmount (eg. in Koji) it will fail anyway, so don't run the test. --- fuse/test-guestmount-fd.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fuse/test-guestmount-fd.c b/fuse/test-guestmount-fd.c index c14309328..00eab0c1f 100644 --- a/fuse/test-guestmount-fd.c +++ b/fuse/test-guestmount-fd.c @@ -62,6 +62,14 @@ main (int argc, char *argv[]) exit (77); } + /* Skip the test if /dev/fuse is not writable, because guestmount + * will fail. + */ + if (access ("/dev/fuse", W_OK) == -1) { + perror ("/dev/fuse"); + exit (77); + } + /* Create the pipe. */ if (pipe (pipefd) == -1) { perror ("pipe");