/[fuse.before_github]/perl-llin/test/s/mount.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /perl-llin/test/s/mount.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4 - (hide annotations)
Thu Nov 11 14:44:15 2004 UTC (19 years, 5 months ago) by mszeredi
Original Path: perl/trunk/test/s/mount.t
File MIME type: application/x-troff
File size: 593 byte(s)
Initial revision

1 mszeredi 4 #!/usr/bin/perl -w
2     use test::helper qw($_point $_loop $_real $_pidfile);
3     use strict;
4     use Test::More tests => 3;
5     ok(!(scalar grep(/ on $_point /,`cat /proc/mounts`)),"already mounted");
6     ok(-f $_loop,"loopback exists");
7    
8     if(!fork()) {
9     #close(STDIN);
10     close(STDOUT);
11     close(STDERR);
12     `echo $$ >test/s/mounted.pid`;
13     exec("perl $_loop $_point");
14     exit(1);
15     }
16     select(undef, undef, undef, 0.5);
17     my ($success) = `cat /proc/mounts` =~ / $_point /;
18     ok($success,"mount succeeded");
19     system("rm -rf $_real");
20     unless($success) {
21     kill('INT',`cat $_pidfile`);
22     unlink($_pidfile);
23     } else {
24     mkdir($_real);
25     }

  ViewVC Help
Powered by ViewVC 1.1.26