6 use POSIX qw(WEXITSTATUS);
7 our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
9 @EXPORT_OK = qw($_loop $_point $_pidfile $_real);
10 my $tmp = -d '/private' ? '/private/tmp' : '/tmp';
11 our($_loop, $_point, $_pidfile, $_real) = ("","$tmp/fusemnt-".$ENV{LOGNAME},"test/s/mounted.pid","$tmp/fusetest-".$ENV{LOGNAME});
12 $_loop = $^O ne 'darwin' && $Config{useithreads} ? "examples/loopback_t.pl" : "examples/loopback.pl";
13 if($0 !~ qr|s/u?mount\.t$|) {
15 if(open my $fh, '<', $_pidfile) {
16 my $pid = do {local $/ = undef; <$fh>};
19 if(`mount` =~ m{on (?:/private)?$_point }) {
26 system("ls $_point >/dev/null");
27 $reject = 1 if (POSIX::WEXITSTATUS($?));
28 die "not properly mounted\n" if $reject;