ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/t/04_fork.t
(Generate patch)

Comparing IO-AIO/t/04_fork.t (file contents):
Revision 1.2 by root, Wed Aug 17 05:06:59 2005 UTC vs.
Revision 1.8 by root, Sun Jul 17 04:20:04 2011 UTC

1#!/usr/bin/perl 1#!/usr/bin/perl
2
3BEGIN {
4 if ($^O ne "linux") {
5 print qq{1..0 # SKIP only linux supports pthreads + fork\n};
6 exit 0;
7 }
8}
2 9
3use Test; 10use Test;
4use IO::AIO; 11use IO::AIO;
5 12
6# this is a lame test, but.... 13# this is a lame test, but....
7 14
8BEGIN { plan tests => 8 } 15BEGIN { plan tests => 10 }
9 16
10IO::AIO::min_parallel 2; 17IO::AIO::min_parallel 2;
18
19IO::AIO::aio_nop sub {
20 print "ok 6\n";
21};
22
23IO::AIO::aio_busy 1, sub {
24 print "ok 8\n";
25
26};
11 27
12print "ok 1\n"; 28print "ok 1\n";
13 29
14if (open FH, "-|") { 30if (open FH, "-|") {
15 print while <FH>; 31 print while <FH>;
16 aio_stat "/", sub { 32 aio_stat "/", sub {
17 print "ok 6\n"; 33 print "ok 7\n";
18 }; 34 };
19 print "ok 5\n"; 35 print "ok 5\n";
20 IO::AIO::poll; 36 IO::AIO::poll while IO::AIO::nreqs;
21 print "ok 7\n"; 37 print "ok 9\n";
22} else { 38} else {
23 print "ok 2\n"; 39 print "ok 2\n";
24 aio_stat "/", sub { 40 aio_stat "/", sub {
25 print "ok 3\n"; 41 print "ok 3\n";
26 }; 42 };
27 IO::AIO::poll; 43 IO::AIO::poll while IO::AIO::nreqs;
28 print "ok 4\n"; 44 print "ok 4\n";
29 exit; 45 exit;
30} 46}
31 47
32print "ok 8\n"; 48print "ok 10\n";
33 49

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines