From ea6e4fd27a10f60467acd1fc3d7c458a7748a8f9 Mon Sep 17 00:00:00 2001 From: Bojan Petrovic Date: Sat, 21 May 2011 10:47:50 +0200 Subject: [PATCH] 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. --- test/s/mount.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }; } -- 2.20.1