Skip Menu |

This queue is for tickets about the IO-File-Log CPAN distribution.

Report information
The Basics
Id: 34778
Status: open
Priority: 0/
Queue: IO-File-Log

Owner: Nobody in particular
Requestors: imacat [...]

Bug Information
Severity: (no value)
Broken in: 1.01
Fixed in: (no value)


Subject: Hangs at t/trunc.t when "make test"
Download (untitled) / with headers
text/plain 1.8k
Dear Luis Muñoz, Hi. This is imacat from Taiwan. I found that your IO-File-Log-1.01 hangs at t/trunc.t during "make test". I waited a long time before I stopped it. I tried to dig into the code. It seems to hang at $log->getline when $c = 5. The terminal log is attached below. Hope that this helps. Please tell me if there is any problem, or if I could be of any help. Thank you. imacat@rinse tmp/IO-File-Log-1.01 % perl -v This is perl, v5.8.8 built for x86_64-linux-thread-multi-ld Copyright 1987-2006, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at, the Perl Home Page. imacat@rinse tmp/IO-File-Log-1.01 % perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for IO::File::Log imacat@rinse tmp/IO-File-Log-1.01 % make cp blib/lib/IO/File/ Manifying blib/man3/IO::File::Log.3 imacat@rinse tmp/IO-File-Log-1.01 % make test t/basic........ok t/grow.........ok t/rotate.......ok t/sgrow........ok t/srotate......ok t/trunc........1/11 # Failed test 'Read of 4' # at t/trunc.t line 46. # got: '9 # ' # expected: '4 # ' make: *** wait: No child processes. Stop. make: *** Waiting for unfinished jobs.... make: *** wait: No child processes. Stop. imacat@rinse tmp/IO-File-Log-1.01 % perl -Iblib/lib -Iblib/arch t/trunc.t 1..11 ok 1 - new() ok 2 - Correct type ok 3 - Read of 1 ok 4 - Read of 2 ok 5 - Read of 3 not ok 6 - Read of 4 # Failed test 'Read of 4' # at t/trunc.t line 46. # got: '9 # ' # expected: '4 # ' imacat@rinse tmp/IO-File-Log-1.01 %
Download (untitled) / with headers
text/plain 683b
Hi. This is imacat from Taiwan. I tried to further investigate this problem. It seems that, in t/trunc.t, when the test file is re-created, the new file takes the same file system storage space so that $log->getline reads the newly-written lines, but not the old lines as expected. Since there are only 4 lines in the re-created test file, trying to read line 4 and 5 stucks, waiting for the never-coming line 5. I suppose if 5 lines were written to the re-created test file, it will not stuck there. I tried to make a patch against IO-File-Log-1.01, in the hope that it helps. Please tell me if you need any more information, or if I could be of any help. Thank you.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 diff -u -r IO-File-Log-1.01.orig/t/trunc.t IO-File-Log-1.01/t/trunc.t - --- IO-File-Log-1.01.orig/t/trunc.t 2002-03-27 05:27:24.000000000 +0800 +++ IO-File-Log-1.01/t/trunc.t 2008-04-10 03:38:57.000000000 +0800 @@ -1,6 +1,6 @@ #!/usr/bin/perl -w - -use Test::More tests => 11; +use Test::More tests => 13; use IO::File; use IO::File::Log; @@ -38,7 +38,7 @@ $fh->autoflush(1); #warn "# file $file re-created\n"; - -for my $c (6 .. 9) { +for my $c (6 .. 10) { $fh->print($c . "\n"); } @@ -55,7 +55,7 @@ $log->_reset; #warn "# log _reset\n"; - -for my $c (6 .. 9) { +for my $c (6 .. 10) { is ($log->getline, $c . "\n", "Read of $c"); } -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkf9G3sACgkQi9gubzC5S1zCcACggwxqtwZMNv3VhZqhR9RUGOMN z/cAn3X+R/591I/pQKokiNgEQwOufCFH =5wLZ -----END PGP SIGNATURE-----

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to