#!/usr/bin/perl BEGIN { if ($^O ne "linux") { print qq{1..0 # SKIP only linux supports pthreads and fork\n}; exit 0; } } use Test; use IO::AIO; # this is a lame test, but.... BEGIN { plan tests => 10 } IO::AIO::min_parallel 2; IO::AIO::aio_nop sub { print "ok 6\n"; }; IO::AIO::aio_busy 0.2, sub { print "ok 8\n"; }; print "ok 1\n"; if (open FH, "-|") { print while ; aio_stat "/", sub { print "ok 7\n"; }; print "ok 5\n"; IO::AIO::poll while IO::AIO::nreqs; print "ok 9\n"; } else { print "ok 2\n"; aio_stat "/", sub { print "ok 3\n"; }; IO::AIO::poll while IO::AIO::nreqs; print "ok 4\n"; exit; } print "ok 10\n";