This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /perl/trunk/test/s/mount.t

Parent Directory Parent Directory | Revision Log Revision Log

Revision 19 - (show annotations)
Tue Dec 27 12:47:00 2005 UTC (16 years, 4 months ago) by dpavlin
File MIME type: application/x-troff
File size: 647 byte(s)
Changes from Mark Glines in preparation for 0.07
- Remove the FUSE_DEBUG constant; we never actually implemented
  it to begin with.
- "make test" now uses the version of Fuse you've just built,
  not the one installed in /usr/lib/perl5.
- getattr test now allows blksize to vary between host and fuse
  fs, as this is not a bug.
- Add experimental support for threading.  The following minor
  API changes accommodate this:
- The nonexistent (yet documented) "unthreaded=>1" attribute
  has been replaced with the "threaded=>1" attribute, and this
  time it actually exists.
- Symbolic refs like "main::e_getattr" are now allowed for
  callbacks, because threaded mode needs to share() the
  callbacks, yet perl 5.8.7 does not allow share()ing code
  refs yet.  Direct code-refs are still supported as much
  as possible (currently, non-threaded mode).
- testsuite uses a multithreaded loopback.pl, when available.
- Update docs accordingly.  Update examples accordingly.

1 #!/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");
8 if(!fork()) {
9 #close(STDIN);
10 close(STDOUT);
11 close(STDERR);
12 mkdir $_point;
13 mkdir $_real;
14 `echo $$ >test/s/mounted.pid`;
15 exec("perl -Iblib/lib -Iblib/arch $_loop $_point");
16 exit(1);
17 }
18 select(undef, undef, undef, 0.5);
19 my ($success) = `cat /proc/mounts` =~ / $_point /;
20 ok($success,"mount succeeded");
21 system("rm -rf $_real");
22 unless($success) {
23 kill('INT',`cat $_pidfile`);
24 unlink($_pidfile);
25 } else {
26 mkdir($_real);
27 }

  ViewVC Help
Powered by ViewVC 1.1.26