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.4 by root, Tue Oct 24 16:35:04 2006 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 => 9 } 15BEGIN { plan tests => 10 }
9 16
10IO::AIO::min_parallel 2; 17IO::AIO::min_parallel 2;
11 18
12aio_nop sub { 19IO::AIO::aio_nop sub {
13 print "ok 6\n"; 20 print "ok 6\n";
21};
22
23IO::AIO::aio_busy 1, sub {
24 print "ok 8\n";
25
14}; 26};
15 27
16print "ok 1\n"; 28print "ok 1\n";
17 29
18if (open FH, "-|") { 30if (open FH, "-|") {
20 aio_stat "/", sub { 32 aio_stat "/", sub {
21 print "ok 7\n"; 33 print "ok 7\n";
22 }; 34 };
23 print "ok 5\n"; 35 print "ok 5\n";
24 IO::AIO::poll while IO::AIO::nreqs; 36 IO::AIO::poll while IO::AIO::nreqs;
25 print "ok 8\n"; 37 print "ok 9\n";
26} else { 38} else {
27 print "ok 2\n"; 39 print "ok 2\n";
28 aio_stat "/", sub { 40 aio_stat "/", sub {
29 print "ok 3\n"; 41 print "ok 3\n";
30 }; 42 };
31 IO::AIO::poll while IO::AIO::nreqs; 43 IO::AIO::poll while IO::AIO::nreqs;
32 print "ok 4\n"; 44 print "ok 4\n";
33 exit; 45 exit;
34} 46}
35 47
36print "ok 9\n"; 48print "ok 10\n";
37 49

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines