Re: VMS status @14710

2002-02-15 Thread Jarkko Hietaniemi

 t/op/glob.t
 
 The test that is failing is:
 
 # ... while ($var = glob(...)) should test definedness not truth
 
 my $ok = not ok 8\n;
 $ok = ok 8\n while my $var = glob(0);
 print $ok;
 
 
 This test massively confuses me.  What is the meaning of the 0 in 
 Cglob(0)?  As far as I can see we are just testing for the existence of 
 a file whose name matches the pattern 0 and failing if it does not exist.  
 This is confirmed by the fact that if I create a file named 0 the test 
 passes. Why would Cglob(0) ever evaluate to true if there is no such 
 file?  Why does the comment in the test say that Cwhile should test 
 definedness not truth but perlsyn says, The Cwhile statement executes 
 the block as long as the expression is true?  I'm sure I'm just being dumb
 and this all makes perfect sense; someone please clue me in.

Unixism.  If there are no wildcards in the pattern, glob() is supposed
to return its argument as-is (yes, silly semantics, but I'm innocent).
The not truth meaning that even the result 0 should be considered
true for the purposes of continuing the while.  I think perlsyn needs
some updating.

 ==
 lib/Net/Ping/t/110_icmp_inst.t
 
 This needs the additional patch located here:
 
 http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2002-02/msg00111.html

Will apply, thanks.  Does the Net::Ping guy know of this patch?

-- 
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen



Re: [PATCH t/run/kill_perl.t t/test.pl] Seperating kill_perl()

2002-01-11 Thread Jarkko Hietaniemi

On Fri, Jan 11, 2002 at 04:26:27AM -0500, Michael G Schwern wrote:
 As long ago promised, here's a patch to pull the logic out of
 t/run/kill_perl.t and make it into a t/test.pl function.
 
 This means its no longer necessary to pile segfault checks into
 t/run/kill_perl.t.  They can be placed in the appropriate test file
 like so:
 
 kill_perl(PROG, EXPECT, {}, 'segfault in 5.6.1 within peep()' );
 @a = (1..9);
 @b = sort { @c = sort { @d = sort { 0 } @a; @d; } @a; } @a;
 print join '', @a, \n;
 PROG
 123456789
 EXPECT
 
 Give or take the fancy here-doc idiom.
 
 The name of the function and order of arguments are all up for
 discussion.

Thanks, applied.

About the name: I think it's an awful name... doesn't tell me at least
at all what it's for (except maybe for doubling as CORE::dump()...).
fresh_perl()?  kamikaze_perl()?

-- 
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen



Re: [PATCH t/run/kill_perl.t t/test.pl] Seperating kill_perl()

2002-01-11 Thread Jarkko Hietaniemi

 PS  There was also a bug in runperl().  All switches were being lost.

Well, this change made several tests (like run/switches) to barf.
So I backed out that hunk.

-- 
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen



Re: [PATCH t/run/kill_perl.t t/test.pl] Seperating kill_perl()

2002-01-11 Thread Jarkko Hietaniemi

On Fri, Jan 11, 2002 at 05:18:10PM +0200, Jarkko Hietaniemi wrote:
  PS  There was also a bug in runperl().  All switches were being lost.
 
 Well, this change made several tests (like run/switches) to barf.
 So I backed out that hunk.

Urk, so now three of kill_perl tests tests are failing...
this is like quicksand.

-- 
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen



Re: Untested modules update: The Magic Number is 27

2001-12-29 Thread Jarkko Hietaniemi

On Thu, Dec 27, 2001 at 02:58:56PM -0500, Michael G Schwern wrote:
 Dynaloader has a good sized documented interface which isn't
 necessarily exercised by the core modules.  Test that.

Remember to test DynaLoader with miniperl, though, otherwise you are
cheating.  And not fair testing dynaloading unless $Config{usedl},
either.

 Its also nice to know something a little more organized than
 something exploded when I tried to build Perl.  And when hacking on
 DynaLoader, its easier to run a fast test suite than to rebuild Perl
 every time you want to check if you broke something leaving the
 ultimate rebuild check to the end.

I assure you that if Dynaloader is busted you are not going to
rebuild Perl any further than miniperl.

-- 
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen



Re: Make Schwern Poor before 5.8.0

2001-11-20 Thread Jarkko Hietaniemi

On Tue, Nov 20, 2001 at 03:54:05PM -0600, Dave Rolsky wrote:
 On Tue, 20 Nov 2001, Tels wrote:
 
   If you would prefer to handle the
   ExtUtils::MakeMaker and ExtUtils::MM_* changes yourself let me know.
 
  You can do it. I'll wait until the dust settles (I wrote tests for routines
  that now get removed, so I am a bit conservative with starting another heap
  of work ;)
 
 Ok, I'll write up another patch to do this if my previous MM- cleanup
 patch is accepted (I just want to make sure I'm on an acceptable path

The principle looks good to me, but I'm waiting for a ping echo from
Berlin...

 here).
 
 
 -dave
 
 /*==
 www.urth.org
 We await the New Sun
 ==*/

-- 
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen



Re: [PATCH] Add test for Pod::ParseUtils

2001-11-20 Thread Jarkko Hietaniemi

On Tue, Nov 20, 2001 at 02:33:14PM -1000, Tim Jenness wrote:
 
 Here is a new test script for Pod::ParseUtils.
 
 I was mainly concerned with the link parsing. There is a good chance that 
 Pod::ParseUtils is currently doing the wrong thing in some cases.
 
 Most obvious to me is that 
 
   Lsome text|manpage
 
 does not print some text. I have not put in a test for that case since I 
 do not have enough time to fix the problem in Pod::ParseUtils - if Russ 
 patches Pod::ParseUtils to use Pod::ParseLink then I will add the more 
 stringent tests.
 
 This test could also be added to the PodParser distribution (hence the 
 cc).

Thanks, applied (to the Perl distribution).

-- 
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen



Re: [PATCH t/test.pl] Adding isnt() and next_test()

2001-11-06 Thread Jarkko Hietaniemi

On Tue, Nov 06, 2001 at 08:58:45PM -0500, Michael G Schwern wrote:
 In the course of revamping t/io/argv.t for VMS, I've added two
 functions to t/test.pl.
 
 isnt() is useful for replacing this sort of thing:
 
 print not  unless defined $foo;
 print ok 42\n;
 
 with
 
 isnt($foo, undef);
 
 The advantage being if it fails $foo will be printed out.
 
 
 next_test() just increments the test counter.  This is good for tests
 which just can't be wedged into the interface.  It prints the ok, and
 then next_test() is called to make test.pl's counter happy.

Thanks, applied.  (With a slight change so that undef values are
printed as undef.)

-- 
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen



Re: [PATCH lib/Net/Config.pm, MANIFEST, t/lib/Mock/Socket.pm, lib/Net/Config.t] Add Tests for Net::Config

2001-10-20 Thread Jarkko Hietaniemi

 Here's a test suite for Net::Config.  In the process of writing
 this, I've fixed an apparent bug that prevented single values from
 becoming array references when necessary.  I think it's right, but
 perhaps Graham should weigh in on this.

 In the process, with some advice from perl-qa, I've added a mock
 object so the test could control the output of Socket::inet_ntoa()
 and Socket::inet_aton().  t/lib/Mock/ seemed like as good a place as
 any.

I'm not convinced.  By setting up mock-ups you are not testing the
real thing: you are testing mock-ups.  It's real emptying shotguns
at decoys and concluding that yup, we are eating duck tonight.

Testing that the netconfig file works right with the %Netconfig
is nice I think somewhat beside the point.  The format of the
file is irrelevant for the *outward* functionality of libnet.

FWIW, I'm happy with leaving libnet essentially untested because
I think by its very nature it is untestable across all the possible
network configurations.  Try some time using ftp from behind sadistic
firewalls, for example.  Situations like this *can* be configured
to work, most of the time, but it requires a lot of off-line head
scratching, bribing the keepers of the firewalls, things like that.
Things a test suite cannot do unless we make Perl pass the Turing test.

QA incendiary: I think rabidly trying to strap a test harness on
everything that moves is counterproductive.  Not all APIs have been
planned to be tested.  Of course the documentation should tell what
are the public interfaces, but if in doubt, *ask* the author.
Testing for internal not-meant-to-be-seen bits is plain silly.

-- 
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen



Re: installhtml needs a good beating out

2001-10-19 Thread Jarkko Hietaniemi

 Once you've done that you can add Refactoring to the list of
 buzzwords on your resume. :)

I think installhtml teeters heavily on the brink of Rewriting
instead of Refactoring.  It hasn't changed much since 1997.

-- 
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen



Re: [PATCH t/op/misc.t] cleanup

2001-09-02 Thread Jarkko Hietaniemi

 @@ -739,3 +783,9 @@
  # keep this last - doesn't seem to work otherwise?

This requirement magically went away while I was away?

  eval a.b.c.d.e.f;sub
  EXPECT
 +
 + perlbug ID 20010831.001
 +($a, b) = (1, 2);
 +EXPECT
 +Can't modify constant item in list assignment at - line 1, near );
 +Execution of - aborted due to compilation errors.

-- 
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen



Re: [PATCH t/op/misc.t] cleanup

2001-09-02 Thread Jarkko Hietaniemi

I think the wholesale renaming of t/op/misc as t/run/kill_perl is
really wrong.

(I think you are reading too much into the leading comments, and other
people have been reading too little into them.)

t/op/misc has NOT consistently been the place for core-dumping tests;
it has some yes, but not all, and some of its tests are _not_
core-dumping, they are, ta-dah, misc, tests that over the years have
had no other appropriate place.

Also, I do not see any particular advantage in having a separate 
test script *just* for core-dumping tests: the test harnesses
(TEST and harness) should handle core dumps (as well as they can)
in any test script.

What should be done instead of the simple renaming is that each of the
tests in the run/kill_perl aka op/misc should be siphoned off to
other, as appropriate as possible, test scripts (possibly creating new
test scripts if appropriate), and leave just the bare minimum set of
tests that really doesn't fit elsewhere, into t/something/misc.

-- 
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen