ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/t/04_fork.t
Revision: 1.7
Committed: Wed Jun 29 11:16:37 2011 UTC (13 years ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-3_93, rel-3_92, rel-3_91
Changes since 1.6: +1 -1 lines
Log Message:
*** empty log message ***

File Contents

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