--- IO-AIO/t/02_read.t 2005/07/10 17:07:44 1.1 +++ IO-AIO/t/02_read.t 2006/10/30 23:30:00 1.3 @@ -1,7 +1,7 @@ $| = 1; if (-f "/etc/passwd" and -d "/etc") { - print "1..3\n"; + print "1..2\n"; } else { print "1..0 # Skipped: unexpected /etc and/or /etc/passwd\n"; exit; @@ -24,8 +24,8 @@ my $pwd; aio_open "/etc/passwd", O_RDONLY, 0, sub { - print $_[0] >= 0 ? "ok" : "not ok", " 1\n"; - print +(open $pwd, "<&$_[0]") ? "ok" : "not ok", " 2\n"; + print $_[0] ? "ok" : "not ok", " 1\n"; + $pwd = $_[0]; }; pcb; @@ -37,10 +37,10 @@ # I found no way to silence the stupid "uninitialized...subroutine entry" warning. # this is just braindamaged. Don't use -w, it introduces more bugs than it fixes. -$aioread = ""; +$aioread = "xxx"; -aio_read $pwd, 7, 15, $aioread, 0, sub { - print +($aioread eq $sysread) ? "ok" : "not ok", " 3\n"; +aio_read $pwd, 7, 15, $aioread, 3, sub { + print +($aioread eq "xxx$sysread") ? "ok" : "not ok", " 2\n"; }; pcb;