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