From: Bojan Petrovic Date: Sat, 21 May 2011 08:47:50 +0000 (+0200) Subject: When testing, check if '/proc/mounts' exists. X-Git-Url: http://git.rot13.org/?p=perl-fuse.git;a=commitdiff_plain;h=ea6e4fd27a10f60467acd1fc3d7c458a7748a8f9;hp=9497c2fcd8e0940552f724f218863318217136f6 When testing, check if '/proc/mounts' exists. On FreeBSD, even if procfs is mounted under '/proc', there is no '/proc/mounts' file. Instead on relying on the existence of '/proc' directory, we check if the '/proc/mounts' file exists. Otherwise, tests cannot even start on FreeBSD. --- diff --git a/test/s/mount.t b/test/s/mount.t index c8bc61d..2381734 100644 --- a/test/s/mount.t +++ b/test/s/mount.t @@ -4,7 +4,7 @@ use strict; use Test::More tests => 3; sub is_mounted { - my $diag = -d '/proc' ? `cat /proc/mounts` : `mount`; + my $diag = -e '/proc/mounts' ? `cat /proc/mounts` : `mount`; return $diag =~ m{ (?:/private)?$_point }; }