develooper Front page | perl.perl5.porters | Postings from June 2012

NWCLARK TPF grant report #41

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
June 20, 2012 07:36
Subject:
NWCLARK TPF grant report #41
Message ID:
20120620143632.GY37285@plum.flirble.org
[Hours]		[Activity]
2012/06/12	Tuesday
 0.50		lib/File/stat.t
 1.75		reading/responding to list mail
=====
 2.25

2012/06/13	Wednesday
 0.00		RT #113536
 5.75		lib/File/stat.t
 1.75		re/eval on VMS
 0.50		reading/responding to list mail
=====
 8.00

2012/06/14	Thursday
 1.50		reading/responding to list mail
 0.25		smoke-me/cmpVERSION
=====
 1.75

2012/06/15	Friday
 0.50		chip/magicflags4
=====
 0.50


Which I calculate is 12.50 hours

Most of the week was spent on other activities (the house, it's mine, all
mine!) so there isn't much to report.

On Wednesday morning I started on what was meant to be a quick job to get
another iteration of File::stat test improvements pushed to a smoke-me
branch, so that George Greer's Win32 smoker could take it for a spin.

Sigh. These things always take longer than you think. So, the aim was get
the code to check filetest operators with various different file modes, not
just the mode the tempfile happens to be created with. But, while
refactoring the code to make this work, I realised that some of the other
tests weren't actually doing what they thought that they did.
(Inconceivable!)

Specifically, the end of the test script contains code intended to test
that bug ID 20011110.104 (RT #7896) is fixed. The bug was indeed fixed
by the changes to File::stat made  by commit 2f173a711df6278f in Nov 2001,
but the test that commit added never actually tested this.

The initial problem was that the new code, as written, used C<stat>,
intending that to call File::stat::stat(). However the refactoring of the
test script (all part of the same commit) from C<use File::stat;> to
C<use_ok( 'File::stat' );> (not in a BEGIN block) intentionally eliminated
the export of &File::stat::stat. This meant that the plain C<stat> the added
code used was the core builtin. The core builtin never exhibited the
bug. :-)

Fixing this as-is to File::stat::stat() won't help, as tests have
subsequently been added earlier in the script that trigger the autoloading
of Symbol by File::stat (commit 83716b1ec25b41f2 in Feb 2002). Moving the
tests earlier won't help now that the test uses File::Temp, as *that*
unconditionally loads Symbol.

So the simplest solution seemed to be to move the test to its own file,
which I did. Now, the bug is actually tested for, and regressions should
not be possible. (But make it foolproof, and they build a better fool.)

I also managed to deal with a bit of list e-mail (which obviously still
keeps coming, even if I'm busy doing something else), but I'm still very
behind.  (About 400 messages more behind than when all the distractions
started, 3 weeks ago).

Nicholas Clark

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About