2 use test::helper qw($_point $_loop $_real $_pidfile);
4 use Test::More tests => 3;
5 ok(!(scalar grep(/ on $_point /,`cat /proc/mounts`)),"already mounted");
6 ok(-f $_loop,"loopback exists");
14 `echo $$ >test/s/mounted.pid`;
15 diag "mounting $_loop to $_point";
16 exec("perl -Iblib/lib -Iblib/arch $_loop $_point");
20 my ($success, $count) = (0,0);
21 while ($count++ < 50 && !$success) {
22 select(undef, undef, undef, 0.1);
23 ($success) = `cat /proc/mounts` =~ / $_point /;
25 diag "Mounted in ", $count/10, " secs";
27 ok($success,"mount succeeded");
28 system("rm -rf $_real");
30 kill('INT',`cat $_pidfile`);