public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: [perl-5.8.7] Perl regression tests fail when lib directory is present
@ 2005-07-20  2:16 Scott Bolte
  2005-07-20 18:48 ` Michael G Schwern
  0 siblings, 1 reply; 35+ messages in thread
From: Scott Bolte @ 2005-07-20  2:16 UTC (permalink / raw)
  To: Michael G Schwern
  Cc: Gerrit P. Haase, Andrew Ho, cygwin, makemaker, perl5-porters, petdance

On Tue, 19 Jul 2005 08:27:28 -0700, Michael G Schwern wrote:
> Try the same Test::Harness with an older perl.  See if its a perl bug.

	It is not a perl bug. It is something in the TH module.

	I tested with perl 5.8.7 and the previous 5.8.6.  I also,
	through -I, tried both the old and new modules.  It clearly
	is the new Test::Harness module.

	Here is the test matrix.

					Modules
				5.8.6		5.8.7
				-----		-----
	Perl	5.8.6:		worked		failed
		5.8.7:		worked		failed

	The Test::Harness.pm version packaged by cygwin went from
	2.42 to 2.52.

	I'll try to carve out some time tomorrow or the next
	day to dig in further.

		Scott

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is present
  2005-07-20  2:16 [perl-5.8.7] Perl regression tests fail when lib directory is present Scott Bolte
@ 2005-07-20 18:48 ` Michael G Schwern
  2005-07-21  2:02   ` Andrew Ho
  0 siblings, 1 reply; 35+ messages in thread
From: Michael G Schwern @ 2005-07-20 18:48 UTC (permalink / raw)
  To: Scott Bolte
  Cc: Gerrit P. Haase, Andrew Ho, cygwin, makemaker, perl5-porters, petdance

On Tue, Jul 19, 2005 at 09:16:03PM -0500, Scott Bolte wrote:
> 	It is not a perl bug. It is something in the TH module.
> 
> 	I tested with perl 5.8.7 and the previous 5.8.6.  I also,
> 	through -I, tried both the old and new modules.  It clearly
> 	is the new Test::Harness module.

It could be that something a new TH is doing triggers a perl bug.  I really
don't see how its otherwise.


> 	Here is the test matrix.
> 
> 					Modules
> 				5.8.6		5.8.7
> 				-----		-----
> 	Perl	5.8.6:		worked		failed
> 		5.8.7:		worked		failed
> 
> 	The Test::Harness.pm version packaged by cygwin went from
> 	2.42 to 2.52.
> 
> 	I'll try to carve out some time tomorrow or the next
> 	day to dig in further.

I would suggest working backwards though the CPAN versions of Test::Harness
until it works.  Then we can better spot the change which caused this bug.
http://search.cpan.org/dist/Test-Harness/


-- 
Michael G Schwern     schwern@pobox.com     http://www.pobox.com/~schwern
Don't try the paranormal until you know what's normal.
	-- "Lords and Ladies" by Terry Prachett

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is  present
  2005-07-20 18:48 ` Michael G Schwern
@ 2005-07-21  2:02   ` Andrew Ho
  2005-07-21  8:50     ` Michael G Schwern
  0 siblings, 1 reply; 35+ messages in thread
From: Andrew Ho @ 2005-07-21  2:02 UTC (permalink / raw)
  To: Michael G Schwern
  Cc: Scott Bolte, Gerrit P. Haase, cygwin, makemaker, perl5-porters, petdance

Hello,

MS>I would suggest working backwards though the CPAN versions of Test::Harness
MS>until it works.  Then we can better spot the change which caused this bug.
MS>http://search.cpan.org/dist/Test-Harness/

I tested stepping down through versions of Test::Harness from CPAN. 
Version 2.42 is the latest version which passes "make test" for my simple 
test case at http://www.zeuscat.com/andrew/src/TestModule.tar.gz.

Here are the diffs between 2.42 and 2.44, the next most recent version:

     http://www.zeuscat.com/tmp/test_harness_diff.txt
     http://www.zeuscat.com/tmp/test_harness_diff.html (colorized)

I haven't peeked through the diff yet to figure out what the cuplrit is.

Thanks for all the quick responses on this!

Humbly,

Andrew

----------------------------------------------------------------
Andrew Ho                                      andrew@tellme.com
Staff Engineer                                      650-930-9062
Tellme Networks, Inc.                     http://www.tellme.com/
----------------------------------------------------------------

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is present
  2005-07-21  2:02   ` Andrew Ho
@ 2005-07-21  8:50     ` Michael G Schwern
  0 siblings, 0 replies; 35+ messages in thread
From: Michael G Schwern @ 2005-07-21  8:50 UTC (permalink / raw)
  To: Andrew Ho
  Cc: Scott Bolte, Gerrit P. Haase, cygwin, makemaker, perl5-porters, petdance

On Wed, Jul 20, 2005 at 06:54:13PM -0700, Andrew Ho wrote:
> Here are the diffs between 2.42 and 2.44, the next most recent version:
> 
>     http://www.zeuscat.com/tmp/test_harness_diff.txt
>     http://www.zeuscat.com/tmp/test_harness_diff.html (colorized)
> 
> I haven't peeked through the diff yet to figure out what the cuplrit is.

DING DING DING DING!

@@ -446,9 +464,21 @@
 	s/[\\\/+]$// foreach @inc;
     }
 
-    my %dupes;
-    @inc = grep !$dupes{$_}++, @inc;
+    my %seen;
+    $seen{$_}++ foreach $self->_default_inc();
+    @inc = grep !$seen{$_}++, @inc;
+
+    return @inc;
+}
+
+
+sub _default_inc {
+    my $self = shift;
 
+    local $ENV{PERL5LIB};
+    my $perl = $self->_command;
+    my @inc =`$perl -le "print join qq[\n], \@INC"`;
+    chomp @inc;
     return @inc;
 }
 
Its gotta be something about _default_inc().  Nothing looks wrong from
here.  My only guess is that local $ENV{PERL5LIB} is ineffective.  That
would account for the alternation.

The algorithm is this.  Test::Harness has to make sure it runs tests with
the same @INC Test::Harness ran with.  To do this it could just shove all of
@INC into PERL5LIB before running the test but there's various reasons why
this is a bad idea.  So it only puts into PERL5LIB that which perl does not
already have in its @INC by default.

_default_inc() figures out what the normal Perl @INC is without any -Is or 
PERL5LIB by localizing PERL5LIB (thus temporarily clearing it) and running 
the shell command:

	perl -le "print join qq[\n], @INC"

to get perl to list its pristine @INC.  I think the localization of PERL5LIB
is failing.  This means blib/lib is still on it and it thinks its part of
the default so it strips it off.  Next time around its not there so it puts
it back on.  And so on.

Try printing out the value of $ENV{PERL5LIB} before and after the localization
inside _default_inc().  Finally, see what _default_inc returns.

sub _default_inc {
    my $self = shift;

    print STDERR "P5LIB Before: $ENV{PERL5LIB}\n";
    local $ENV{PERL5LIB};
    print STDERR "P5LIB After:  $ENV{PERL5LIB}\n";

    my $perl = $self->_command;
    my @inc =`$perl -le "print join qq[\\n], \@INC"`;
    chomp @inc;

    print STDERR "Default @INC: @inc\n";
    return @inc;
}

And then try changing "local $ENV{PERL5LIB}" to "local $ENV{PERL5LIB} = ''".


-- 
Michael G Schwern     schwern@pobox.com     http://www.pobox.com/~schwern
Reality is that which, when you stop believing in it, doesn't go away.
	-- Phillip K. Dick

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is  present
  2005-07-27  8:27                 ` Andrew Ho
@ 2005-07-27 10:56                   ` Gerrit P. Haase
  0 siblings, 0 replies; 35+ messages in thread
From: Gerrit P. Haase @ 2005-07-27 10:56 UTC (permalink / raw)
  To: Andrew Ho; +Cc: Michael G Schwern, Scott Bolte, cygwin, perl5-porters, petdance

Andrew Ho wrote:

> Hello,
> 
> AH>So I think the next step is to figure out who can help look at that 
> latter
> AH>problem. Is there a bug I or someone else should file somewhere?
> 
> MS>To make sure it isn't completely forgotten you can put it into the bug
> MS>tracker with perlbug.
> 
> Very well, I have submitted the bug and it has identifier [perl #36665].
> 
> Humbly,
> 
> Andrew

Many thanks!

Please add my address to the CC list in the tracker, I cannot do it
myself: 'Access denied.'


Gerrit
-- 
=^..^=

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is  present
  2005-07-26 22:43               ` Michael G Schwern
@ 2005-07-27  8:27                 ` Andrew Ho
  2005-07-27 10:56                   ` Gerrit P. Haase
  0 siblings, 1 reply; 35+ messages in thread
From: Andrew Ho @ 2005-07-27  8:27 UTC (permalink / raw)
  To: Michael G Schwern
  Cc: Gerrit P. Haase, Scott Bolte, cygwin, perl5-porters, petdance

Hello,

AH>So I think the next step is to figure out who can help look at that latter
AH>problem. Is there a bug I or someone else should file somewhere?

MS>To make sure it isn't completely forgotten you can put it into the bug
MS>tracker with perlbug.

Very well, I have submitted the bug and it has identifier [perl #36665].

Humbly,

Andrew

----------------------------------------------------------------
Andrew Ho                                      andrew@tellme.com
Staff Engineer                                      650-930-9062
Tellme Networks, Inc.                     http://www.tellme.com/
----------------------------------------------------------------

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is present
  2005-07-26 22:33             ` Andrew Ho
@ 2005-07-26 22:43               ` Michael G Schwern
  2005-07-27  8:27                 ` Andrew Ho
  0 siblings, 1 reply; 35+ messages in thread
From: Michael G Schwern @ 2005-07-26 22:43 UTC (permalink / raw)
  To: Andrew Ho; +Cc: Gerrit P. Haase, Scott Bolte, cygwin, perl5-porters, petdance

On Tue, Jul 26, 2005 at 03:27:17PM -0700, Andrew Ho wrote:
> So I think the next step is to figure out who can help look at that latter 
> problem. Is there a bug I or someone else should file somewhere?

To make sure it isn't completely forgotten you can put it into the bug
tracker with perlbug.


-- 
Michael G Schwern     schwern@pobox.com     http://www.pobox.com/~schwern
Don't try the paranormal until you know what's normal.
	-- "Lords and Ladies" by Terry Prachett

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is  present
  2005-07-26 22:27           ` Michael G Schwern
@ 2005-07-26 22:33             ` Andrew Ho
  2005-07-26 22:43               ` Michael G Schwern
  0 siblings, 1 reply; 35+ messages in thread
From: Andrew Ho @ 2005-07-26 22:33 UTC (permalink / raw)
  To: Michael G Schwern
  Cc: Gerrit P. Haase, Scott Bolte, cygwin, perl5-porters, petdance

Hello,

As the original instigator of this thread, maybe I can help continue its 
usefulness. I think the current consensus is as follows:

     * This all has nothing at all to do with with ExtUtils::MakeMaker
       (so I have removed that list from the Cc list).

     * There is nothing intrinsically wrong with what Test::Harness is
       doing, although its recent change (in version 2.44) was what
       triggered the Perl/Cygwin bug we have discovered.

     * We have a current workaround for the Test::Harness breakage
       (roll back Test::Harness to 2.42, or edit Test::Harness::Straps
       to change the "local $ENV{PERL5LIB}" to something like
       "local $ENV{PERL5LIB} = ''".

     * For at least Perl 5.8.7 on Cygwin, delete()ing an environment
       variable does not apparently remove that variable from the
       environment of a subprocess. Scott Bolte provided a repro case:

                 #!/usr/bin/perl
                 use strict;
                 use warnings;

                 $ENV{SHOULD_NEVER_BE_SEEN} = "hello world";
                 delete($ENV{SHOULD_NEVER_BE_SEEN});
                 system("printenv | grep SHOULD_NEVER_BE_SEEN");

       On Unix systems this script appropriately prints nothing.
       On an up to date Cygwin installation this prints "hello world".

So I think the next step is to figure out who can help look at that latter 
problem. Is there a bug I or someone else should file somewhere?

Humbly,

Andrew

----------------------------------------------------------------
Andrew Ho                                      andrew@tellme.com
Staff Engineer                                      650-930-9062
Tellme Networks, Inc.                     http://www.tellme.com/
----------------------------------------------------------------

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is present
  2005-07-26 20:58         ` Gerrit P. Haase
@ 2005-07-26 22:27           ` Michael G Schwern
  2005-07-26 22:33             ` Andrew Ho
  0 siblings, 1 reply; 35+ messages in thread
From: Michael G Schwern @ 2005-07-26 22:27 UTC (permalink / raw)
  To: Gerrit P. Haase
  Cc: Scott Bolte, cygwin, Andrew Ho, makemaker, perl5-porters, petdance

On Tue, Jul 26, 2005 at 10:57:08PM +0200, Gerrit P. Haase wrote:
> Andrew found relevant cahnges and you replied:

Oh yeah.  Huh.  Good question.


-- 
Michael G Schwern     schwern@pobox.com     http://www.pobox.com/~schwern
You are wicked and wrong to have broken inside and peeked at the
implementation and then relied upon it.
	-- tchrist in <31832.969261130@chthon>

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is  present
  2005-07-26 20:14       ` Michael G Schwern
@ 2005-07-26 20:58         ` Gerrit P. Haase
  2005-07-26 22:27           ` Michael G Schwern
  0 siblings, 1 reply; 35+ messages in thread
From: Gerrit P. Haase @ 2005-07-26 20:58 UTC (permalink / raw)
  To: Michael G Schwern
  Cc: Scott Bolte, cygwin, Andrew Ho, makemaker, perl5-porters, petdance

Michael G Schwern wrote:

> On Tue, Jul 26, 2005 at 08:23:03PM +0200, Gerrit P. Haase wrote:
> 
>>>5.8.7 ships with Test::Harness 2.48 which doesn't have this code.
>>
>>It fails to run the tests from the command line with the default
>>installation of perl-5.8.7 for Cygwin?
> 
> 
> Huh?


 From the initial report on p5p and the makemaker list:
===
we are on Cygwin: 1.5.18(0.132/4/2) 2005-07-02 20:30, perl is the latest 
stable release: This is perl, v5.8.7 built for cygwin-thread-multi-64int

We have a problem building modules, i.e. make test fails if a .pm file
in the source package is located below the root in a subdirectory called
'lib'.
===

and your question, my reply:
===
 > I'm going to guess somethign wacky is going on inside Test::Harness. 
  > What version is being used?

The dafault Test::Harness which is included with perl-5.8.7:
$ perl -e 'use Test::Harness; print "$Test::Harness::VERSION\n";'
2.48
===

Andrew found relevant cahnges and you replied:
===
 >Here are the diffs between 2.42 and 2.44, the next most recent version:
 >>
 >>     http://www.zeuscat.com/tmp/test_harness_diff.txt
 >>     http://www.zeuscat.com/tmp/test_harness_diff.html (colorized)
 >>
 >> I haven't peeked through the diff yet to figure out what the cuplrit is.


DING DING DING DING!
===


Scott found (Message-Id: <200507222016.j6MKGTXI053801@crag.niss.com>)
that there is s.th. wrong with the perl version of unsetenv(),
unfortunately it seems perl doesn't use unsetenv(), maybe it would work
if it would be used.  I think we should fix the code where perl unsets
the envronment settings.  This is where I need some help since I don't
know where it is done.



Gerrit
-- 
=^..^=

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is present
  2005-07-26 18:47     ` Gerrit P. Haase
@ 2005-07-26 20:14       ` Michael G Schwern
  2005-07-26 20:58         ` Gerrit P. Haase
  0 siblings, 1 reply; 35+ messages in thread
From: Michael G Schwern @ 2005-07-26 20:14 UTC (permalink / raw)
  To: Gerrit P. Haase
  Cc: Scott Bolte, cygwin, Andrew Ho, makemaker, perl5-porters, petdance

On Tue, Jul 26, 2005 at 08:23:03PM +0200, Gerrit P. Haase wrote:
> >5.8.7 ships with Test::Harness 2.48 which doesn't have this code.
> 
> It fails to run the tests from the command line with the default
> installation of perl-5.8.7 for Cygwin?

Huh?


-- 
Michael G Schwern     schwern@pobox.com     http://www.pobox.com/~schwern
Just call me 'Moron Sugar'.
	http://www.somethingpositive.net/sp05182002.shtml

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is  present
  2005-07-26 18:23   ` Michael G Schwern
@ 2005-07-26 18:47     ` Gerrit P. Haase
  2005-07-26 20:14       ` Michael G Schwern
  0 siblings, 1 reply; 35+ messages in thread
From: Gerrit P. Haase @ 2005-07-26 18:47 UTC (permalink / raw)
  To: Michael G Schwern
  Cc: Scott Bolte, cygwin, Andrew Ho, makemaker, perl5-porters, petdance

Michael G Schwern wrote:
> On Tue, Jul 26, 2005 at 07:51:48PM +0200, Gerrit P. Haase wrote:
> 
>>Yep, the example with the delete( $ENV   ...) shows clearly that there
>>is a problem with forked/spawned processes which should be resolved.
>>
>>In the first place I would be glad if someone (petdance?) could fix TH
>>for Cygwin so that it works to install modules (well, to run the test 
>>suites) on Cygwin.
>>
>>I wonder why I got no errors when running the testsuite during the build
>>of perl-5.8.7, maybe some more tests are needed to cover this issue?
> 
> 
> 5.8.7 ships with Test::Harness 2.48 which doesn't have this code.


It fails to run the tests from the command line with the default
installation of perl-5.8.7 for Cygwin?


> Otherwise, there appears to be no specific test of delete $ENV{...}.
> There's something in t/op/local.t which dances around the issue.
> There probably should be a t/op/env.t, I'm kind of surprised there isn't.


Gerrit
-- 
=^..^=

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is present
  2005-07-26 18:20 ` Gerrit P. Haase
@ 2005-07-26 18:23   ` Michael G Schwern
  2005-07-26 18:47     ` Gerrit P. Haase
  0 siblings, 1 reply; 35+ messages in thread
From: Michael G Schwern @ 2005-07-26 18:23 UTC (permalink / raw)
  To: Gerrit P. Haase
  Cc: Scott Bolte, cygwin, Andrew Ho, makemaker, perl5-porters, petdance

On Tue, Jul 26, 2005 at 07:51:48PM +0200, Gerrit P. Haase wrote:
> Yep, the example with the delete( $ENV   ...) shows clearly that there
> is a problem with forked/spawned processes which should be resolved.
> 
> In the first place I would be glad if someone (petdance?) could fix TH
> for Cygwin so that it works to install modules (well, to run the test 
> suites) on Cygwin.
> 
> I wonder why I got no errors when running the testsuite during the build
> of perl-5.8.7, maybe some more tests are needed to cover this issue?

5.8.7 ships with Test::Harness 2.48 which doesn't have this code.

Otherwise, there appears to be no specific test of delete $ENV{...}.
There's something in t/op/local.t which dances around the issue.
There probably should be a t/op/env.t, I'm kind of surprised there isn't.


-- 
Michael G Schwern     schwern@pobox.com     http://www.pobox.com/~schwern
Reality is that which, when you stop believing in it, doesn't go away.
	-- Phillip K. Dick

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is  present
  2005-07-26 12:45 Scott Bolte
@ 2005-07-26 18:20 ` Gerrit P. Haase
  2005-07-26 18:23   ` Michael G Schwern
  0 siblings, 1 reply; 35+ messages in thread
From: Gerrit P. Haase @ 2005-07-26 18:20 UTC (permalink / raw)
  To: Scott Bolte
  Cc: cygwin, Michael G Schwern, Andrew Ho, makemaker, perl5-porters, petdance

Scott Bolte wrote:

> On Mon, 25 Jul 2005 17:39:41 +0200, "Gerrit P. Haase" wrote:
> 
>>Indeed, I see no unsetenv() in the perl sources.
>>
>>Since it seems that the problem is independent of TH the problem should
>>be located in perl itself.  I'll try with a recent devel version to see
>>if it fails here too.  Scott, have you tried te above script with other
>>(older) versions of Cygwin perl too?  Since TH works with perl-5.8.6 I
>>suspect some of the changes integrated into maint perl to be problematic
>>for Cygwin, however it may also be an older bug in Cygwin perl.
> 
> 
> 	Gerrit,
> 
> 	The problem was definitely exposed by Test::Harness.  Both
> 	perl-5.8.6 and perl-5.8.7 worked fine with the older TH
> 	module, and both failed with the newer TH module. I did not
> 	try even older perl versions with either TH or my test case.
> 
> 	The simplest explanation is the perl behavior on cygwin has
> 	been consistently wrong for quite some time, but was never
> 	exposed in such a public way before.
> 
> 		Scott

Yep, the example with the delete( $ENV   ...) shows clearly that there
is a problem with forked/spawned processes which should be resolved.

In the first place I would be glad if someone (petdance?) could fix TH
for Cygwin so that it works to install modules (well, to run the test 
suites) on Cygwin.

I wonder why I got no errors when running the testsuite during the build
of perl-5.8.7, maybe some more tests are needed to cover this issue?


Gerrit
-- 
=^..^=

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is present
@ 2005-07-26 12:45 Scott Bolte
  2005-07-26 18:20 ` Gerrit P. Haase
  0 siblings, 1 reply; 35+ messages in thread
From: Scott Bolte @ 2005-07-26 12:45 UTC (permalink / raw)
  To: Gerrit P. Haase
  Cc: cygwin, Michael G Schwern, Andrew Ho, makemaker, perl5-porters, petdance

On Mon, 25 Jul 2005 17:39:41 +0200, "Gerrit P. Haase" wrote:
> 
> Indeed, I see no unsetenv() in the perl sources.
> 
> Since it seems that the problem is independent of TH the problem should
> be located in perl itself.  I'll try with a recent devel version to see
> if it fails here too.  Scott, have you tried te above script with other
> (older) versions of Cygwin perl too?  Since TH works with perl-5.8.6 I
> suspect some of the changes integrated into maint perl to be problematic
> for Cygwin, however it may also be an older bug in Cygwin perl.

	Gerrit,

	The problem was definitely exposed by Test::Harness.  Both
	perl-5.8.6 and perl-5.8.7 worked fine with the older TH
	module, and both failed with the newer TH module. I did not
	try even older perl versions with either TH or my test case.

	The simplest explanation is the perl behavior on cygwin has
	been consistently wrong for quite some time, but was never
	exposed in such a public way before.

		Scott

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is  present
  2005-07-22 21:03 ` Christopher Faylor
@ 2005-07-25 16:33   ` Gerrit P. Haase
  0 siblings, 0 replies; 35+ messages in thread
From: Gerrit P. Haase @ 2005-07-25 16:33 UTC (permalink / raw)
  To: cygwin
  Cc: Scott Bolte, Michael G Schwern, Andrew Ho, makemaker,
	perl5-porters, petdance

Christopher Faylor wrote:
> On Fri, Jul 22, 2005 at 03:16:29PM -0500, Scott Bolte wrote:
> 
>>On Thu, 21 Jul 2005 00:14:51 -0700, Michael G Schwern wrote:
>>
>>> 
>>>Its gotta be something about _default_inc().  Nothing looks wrong from
>>>here.  My only guess is that local $ENV{PERL5LIB} is ineffective.  That
>>>would account for the alternation.
>>
>>	It's not just the local scoping. There is something
>>	seriously unexpected with environment variables, perl
>>	and cygwin.
>>
>>		----- th4.pl
>>		#!/usr/bin/perl
>>		use strict;
>>		use warnings;
>>		 
>>		$ENV{SHOULD_NEVER_BE_SEEN} = "hello world";
>>		delete($ENV{SHOULD_NEVER_BE_SEEN});
>>		system("printenv | grep SHOULD_NEVER_BE_SEEN");
>>
>>	On UNIX systems that script properly prints nothing. Not so
>>	on my cygwin (on top of XP) system:
>>
>>		cygwin% perl ~/th4.pl
>>		SHOULD_NEVER_BE_SEEN=hello world
>>
>>	It seems to imply that the results of unsetenv(3) are not
>>	persistent across an exec(2).
> 
> 
> ....or that perl isn't using unsetenv, since AFAICT, unsetenv() is operating
> as it should for both cygwin and non-cygwin processes.
> 
> This was a standard problem way way back when I was maintaining my own
> version of perl for cygwin (since cygwin didn't include perl).  There was
> special code in perl to deal with cygwin's environment, IIRC.  Maybe it's
> broken in 5.8.7.
> 
> cgf

Indeed, I see no unsetenv() in the perl sources.

Since it seems that the problem is independent of TH the problem should
be located in perl itself.  I'll try with a recent devel version to see
if it fails here too.  Scott, have you tried te above script with other
(older) versions of Cygwin perl too?  Since TH works with perl-5.8.6 I
suspect some of the changes integrated into maint perl to be problematic
for Cygwin, however it may also be an older bug in Cygwin perl.


Gerrit

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is present
  2005-07-22 20:31 Scott Bolte
@ 2005-07-22 21:03 ` Christopher Faylor
  2005-07-25 16:33   ` Gerrit P. Haase
  0 siblings, 1 reply; 35+ messages in thread
From: Christopher Faylor @ 2005-07-22 21:03 UTC (permalink / raw)
  To: cygwin

On Fri, Jul 22, 2005 at 03:16:29PM -0500, Scott Bolte wrote:
>On Thu, 21 Jul 2005 00:14:51 -0700, Michael G Schwern wrote:
>>  
>> Its gotta be something about _default_inc().  Nothing looks wrong from
>> here.  My only guess is that local $ENV{PERL5LIB} is ineffective.  That
>> would account for the alternation.
>
>	It's not just the local scoping. There is something
>	seriously unexpected with environment variables, perl
>	and cygwin.
>
>		----- th4.pl
>		#!/usr/bin/perl
>		use strict;
>		use warnings;
>		 
>		$ENV{SHOULD_NEVER_BE_SEEN} = "hello world";
>		delete($ENV{SHOULD_NEVER_BE_SEEN});
>		system("printenv | grep SHOULD_NEVER_BE_SEEN");
>
>	On UNIX systems that script properly prints nothing. Not so
>	on my cygwin (on top of XP) system:
>
>		cygwin% perl ~/th4.pl
>		SHOULD_NEVER_BE_SEEN=hello world
>
>	It seems to imply that the results of unsetenv(3) are not
>	persistent across an exec(2).

...or that perl isn't using unsetenv, since AFAICT, unsetenv() is operating
as it should for both cygwin and non-cygwin processes.

This was a standard problem way way back when I was maintaining my own
version of perl for cygwin (since cygwin didn't include perl).  There was
special code in perl to deal with cygwin's environment, IIRC.  Maybe it's
broken in 5.8.7.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is present
@ 2005-07-22 20:31 Scott Bolte
  2005-07-22 21:03 ` Christopher Faylor
  0 siblings, 1 reply; 35+ messages in thread
From: Scott Bolte @ 2005-07-22 20:31 UTC (permalink / raw)
  To: Michael G Schwern
  Cc: Andrew Ho, Gerrit P. Haase, cygwin, makemaker, perl5-porters, petdance

On Thu, 21 Jul 2005 00:14:51 -0700, Michael G Schwern wrote:
>  
> Its gotta be something about _default_inc().  Nothing looks wrong from
> here.  My only guess is that local $ENV{PERL5LIB} is ineffective.  That
> would account for the alternation.

	It's not just the local scoping. There is something
	seriously unexpected with environment variables, perl
	and cygwin.

		----- th4.pl
		#!/usr/bin/perl
		use strict;
		use warnings;
		 
		$ENV{SHOULD_NEVER_BE_SEEN} = "hello world";
		delete($ENV{SHOULD_NEVER_BE_SEEN});
		system("printenv | grep SHOULD_NEVER_BE_SEEN");

	On UNIX systems that script properly prints nothing. Not so
	on my cygwin (on top of XP) system:

		cygwin% perl ~/th4.pl
		SHOULD_NEVER_BE_SEEN=hello world

	It seems to imply that the results of unsetenv(3) are not
	persistent across an exec(2).

	Root cause aside, you nailed it with your suggestion.

>		....
>
> And then try changing "local $ENV{PERL5LIB}" to "local $ENV{PERL5LIB} = ''".

	Explicitly setting $ENV{PERL5LIB} to '' before calling `perl ...`
	in _default_inc() fixed the problem for me.

		Scott

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is present
  2005-07-19 12:45 Scott Bolte
@ 2005-07-19 15:27 ` Michael G Schwern
  0 siblings, 0 replies; 35+ messages in thread
From: Michael G Schwern @ 2005-07-19 15:27 UTC (permalink / raw)
  To: Scott Bolte
  Cc: Gerrit P. Haase, Andrew Ho, cygwin, makemaker, perl5-porters, petdance

Try the same Test::Harness with an older perl.  See if its a perl bug.


-- 
Michael G Schwern     schwern@pobox.com     http://www.pobox.com/~schwern
Insulting our readers is part of our business model.
        http://somethingpositive.net/sp07122005.shtml

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is present
@ 2005-07-19 12:45 Scott Bolte
  2005-07-19 15:27 ` Michael G Schwern
  0 siblings, 1 reply; 35+ messages in thread
From: Scott Bolte @ 2005-07-19 12:45 UTC (permalink / raw)
  To: Michael G Schwern
  Cc: Gerrit P. Haase, Andrew Ho, cygwin, makemaker, perl5-porters, petdance

On Mon, 18 Jul 2005 01:50:33 -0700, Michael G Schwern wrote:
> 
> MakeMaker is not involved, just Test::Harness.  All the action is in or
> called from Test::Harness::Straps->analyze_file.

	I agree. TH is resetting INC and the directories passed
	into test_harness() are lost after the first invocation.

	The simple test script below, when tested twice, fails on
	the second call. As you'll see, blib/lib is not in INC.

		 _____ t/foo.t
		/ #!/usr/bin/perl -w
		| use strict;
		| use Test::More qw(no_plan);
		| 
		| use_ok('Device::Profile::Document');
		| printf("INC:\t%s\n", join("\n\t", @INC));

	If you prepend the perl or (make test) command with
	(env PERL5LIB=blib/lib) the tests will work.


 % perl -MExtUtils::Command::MM -e 'test_harness(1, "blib/lib")' t/foo.t t/foo.t
 t/foo....ok 1 - use Device::Profile::Document;
 INC:	/home/scott/Projects/MDS2/Device-Profile/blib/lib
 	/usr/lib/perl5/5.8/cygwin
 	/usr/lib/perl5/5.8
 	/usr/lib/perl5/site_perl/5.8/cygwin
 	/usr/lib/perl5/site_perl/5.8
 	/usr/lib/perl5/site_perl/5.8
 	/usr/lib/perl5/vendor_perl/5.8/cygwin
 	/usr/lib/perl5/vendor_perl/5.8
 	/usr/lib/perl5/vendor_perl/5.8
 	.
 1..1
 ok
 t/foo....
 #     Failed test (t/foo.t at line 5)
 #     Tried to use 'Device::Profile::Document'.
 #     Error:  Can't locate Device/Profile/Document.pm in @INC (@INC contains: /usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 /usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin /usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at (eval 3) line 2.
 # BEGIN failed--compilation aborted at t/foo.t line 5.
 # Looks like you failed 1 test of 1.
 not ok 1 - use Device::Profile::Document;
 INC:	/usr/lib/perl5/5.8/cygwin
 	/usr/lib/perl5/5.8
 	/usr/lib/perl5/site_perl/5.8/cygwin
 	/usr/lib/perl5/site_perl/5.8
 	/usr/lib/perl5/site_perl/5.8
 	/usr/lib/perl5/vendor_perl/5.8/cygwin
 	/usr/lib/perl5/vendor_perl/5.8
 	/usr/lib/perl5/vendor_perl/5.8
 	.
 1..1
 dubious
 	Test returned status 1 (wstat 256, 0x100)
 DIED. FAILED test 1
 	Failed 1/1 tests, 0.00% okay
 Failed Test Stat Wstat Total Fail  Failed  List of Failed
 -------------------------------------------------------------------------------
 t/foo.t        1   256     1    1 100.00%  1
 Failed 1/2 test scripts, 50.00% okay. 1/2 subtests failed, 50.00% okay.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is present
  2005-07-17 22:31               ` Gerrit P. Haase
  2005-07-17 22:39                 ` Gerrit P. Haase
@ 2005-07-18  8:52                 ` Michael G Schwern
  1 sibling, 0 replies; 35+ messages in thread
From: Michael G Schwern @ 2005-07-18  8:52 UTC (permalink / raw)
  To: Gerrit P. Haase; +Cc: Andrew Ho, cygwin, makemaker, perl5-porters, petdance

On Mon, Jul 18, 2005 at 12:31:36AM +0200, Gerrit P. Haase wrote:
> >Maybe a cygwin problem, I'll fetch a snapshot.
> 
> With the latest snapshot I see the same behaviour.
> 
> Are there other modules involved besides MM and TH?

MakeMaker is not involved, just Test::Harness.  All the action is in or
called from Test::Harness::Straps->analyze_file.


-- 
Michael G Schwern     schwern@pobox.com     http://www.pobox.com/~schwern
Ahh email, my old friend.  Do you know that revenge is a dish that is best 
served cold?  And it is very cold on the Internet!

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is present
  2005-07-17 23:03                     ` Gerrit P. Haase
@ 2005-07-17 23:15                       ` Michael G Schwern
  0 siblings, 0 replies; 35+ messages in thread
From: Michael G Schwern @ 2005-07-17 23:15 UTC (permalink / raw)
  To: Gerrit P. Haase; +Cc: Andrew Ho, cygwin, makemaker, perl5-porters, petdance

On Mon, Jul 18, 2005 at 01:03:05AM +0200, Gerrit P. Haase wrote:
> >At this point I'd suspect there's something broken about %ENV.  Try 
> >replacing
> >this in THS->analyze_file:
> >
> >    local $ENV{PERL5LIB} = $self->_INC2PERL5LIB;
> >    if ( $Test::Harness::Debug ) {
> >        local $^W=0; # ignore undef warnings
> >        print "# PERL5LIB=$ENV{PERL5LIB}\n";
> >    }
> >
> >with this:
> >
> >    my $libs = $self->_INC2PERL5LIB;
> >    local $ENV{PERL5LIB} = $libs;
> >    if ( $Test::Harness::Debug ) {
> >        local $^W=0; # ignore undef warnings
> >        print STDERR "# PERL5LIB=$ENV{PERL5LIB}\n";
> >	print STDERR "# libs=$libs\n";
> >    }
> >
> >to determine if _INC2PERL5LIB() is acting properly.
> 
> 
> $ perl -MTest::Harness -Iblib/lib -Iblib/arch -wle 
> '$Test::Harness::Debug = 1;  $Test::Harness::Verbose = 1;  runtests 
> @ARGV' t/*.t
> t/test0....# Running: /usr/bin/perl -w t/test0.t
> # PERL5LIB=blib/lib:blib/arch
> # libs=blib/lib:blib/arch
> 1..1
> # Running under perl version 5.008007 for cygwin
> # Current time local: Mon Jul 18 00:59:23 2005
> # Current time GMT:   Sun Jul 17 22:59:23 2005
> # Using Test.pm version 1.25
> ok 1
> ok
> t/test1....# Running: /usr/bin/perl -w t/test1.t
> # PERL5LIB=
> # libs=

Now that's just weird.  I think at this point you're going to have to go
in and poke around with the debugger.


-- 
Michael G Schwern     schwern@pobox.com     http://www.pobox.com/~schwern
Reality is that which, when you stop believing in it, doesn't go away.
	-- Phillip K. Dick

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is  present
  2005-07-17 22:41                   ` Michael G Schwern
@ 2005-07-17 23:03                     ` Gerrit P. Haase
  2005-07-17 23:15                       ` Michael G Schwern
  0 siblings, 1 reply; 35+ messages in thread
From: Gerrit P. Haase @ 2005-07-17 23:03 UTC (permalink / raw)
  To: Michael G Schwern; +Cc: Andrew Ho, cygwin, makemaker, perl5-porters, petdance

Michael G Schwern wrote:

> On Mon, Jul 18, 2005 at 12:27:31AM +0200, Gerrit P. Haase wrote:
> 
>>>perl -MTest::Harness -Iblib/lib -Iblib/arch -wle '$Test::Harness::Debug = 
>>>1;  $Test::Harness::Verbose = 1;  runtests @ARGV' t/*.t
>>>The lines we're looking for are "# PERL5LIB=..." from THS->analyze_file()
>>>telling us how TH is setting @INC.
>>
>>t/test0....# Running: /usr/bin/perl -w t/test0.t
>># PERL5LIB=blib/lib:blib/arch
>>1..1
>># Running under perl version 5.008007 for cygwin
>># Current time local: Mon Jul 18 00:14:08 2005
>># Current time GMT:   Sun Jul 17 22:14:08 2005
>># Using Test.pm version 1.25
>>ok 1
>>ok
>>t/test1....# Running: /usr/bin/perl -w t/test1.t
>># PERL5LIB=
> 
> 
> At this point I'd suspect there's something broken about %ENV.  Try replacing
> this in THS->analyze_file:
> 
>     local $ENV{PERL5LIB} = $self->_INC2PERL5LIB;
>     if ( $Test::Harness::Debug ) {
>         local $^W=0; # ignore undef warnings
>         print "# PERL5LIB=$ENV{PERL5LIB}\n";
>     }
> 
> with this:
> 
>     my $libs = $self->_INC2PERL5LIB;
>     local $ENV{PERL5LIB} = $libs;
>     if ( $Test::Harness::Debug ) {
>         local $^W=0; # ignore undef warnings
>         print STDERR "# PERL5LIB=$ENV{PERL5LIB}\n";
> 	print STDERR "# libs=$libs\n";
>     }
> 
> to determine if _INC2PERL5LIB() is acting properly.


$ perl -MTest::Harness -Iblib/lib -Iblib/arch -wle 
'$Test::Harness::Debug = 1;  $Test::Harness::Verbose = 1;  runtests 
@ARGV' t/*.t
t/test0....# Running: /usr/bin/perl -w t/test0.t
# PERL5LIB=blib/lib:blib/arch
# libs=blib/lib:blib/arch
1..1
# Running under perl version 5.008007 for cygwin
# Current time local: Mon Jul 18 00:59:23 2005
# Current time GMT:   Sun Jul 17 22:59:23 2005
# Using Test.pm version 1.25
ok 1
ok
t/test1....# Running: /usr/bin/perl -w t/test1.t
# PERL5LIB=
# libs=
Can't locate TestModule.pm in @INC (@INC contains: 
/usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 
/usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 
/usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin 
/usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at 
t/test1.t line 2.
BEGIN failed--compilation aborted at t/test1.t line 2.
dubious
         Test returned status 2 (wstat 512, 0x200)
t/test2....# Running: /usr/bin/perl -w t/test2.t
# PERL5LIB=blib/lib:blib/arch
# libs=blib/lib:blib/arch
1..1
# Running under perl version 5.008007 for cygwin
# Current time local: Mon Jul 18 00:59:24 2005
# Current time GMT:   Sun Jul 17 22:59:24 2005
# Using Test.pm version 1.25
ok 1
ok
t/test3....# Running: /usr/bin/perl -w t/test3.t
# PERL5LIB=
# libs=
Can't locate TestModule.pm in @INC (@INC contains: 
/usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 
/usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 
/usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin 
/usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at 
t/test3.t line 2.
BEGIN failed--compilation aborted at t/test3.t line 2.
dubious
         Test returned status 2 (wstat 512, 0x200)
t/test4....# Running: /usr/bin/perl -w t/test4.t
# PERL5LIB=blib/lib:blib/arch
# libs=blib/lib:blib/arch
1..1
# Running under perl version 5.008007 for cygwin
# Current time local: Mon Jul 18 00:59:25 2005
# Current time GMT:   Sun Jul 17 22:59:25 2005
# Using Test.pm version 1.25
ok 1
ok
t/test5....# Running: /usr/bin/perl -w t/test5.t
# PERL5LIB=
# libs=
Can't locate TestModule.pm in @INC (@INC contains: 
/usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 
/usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 
/usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin 
/usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at 
t/test5.t line 2.
BEGIN failed--compilation aborted at t/test5.t line 2.
dubious
         Test returned status 2 (wstat 512, 0x200)
Failed Test Stat Wstat Total Fail  Failed  List of Failed
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
t/test1.t      2   512    ??   ??       %  ??
t/test3.t      2   512    ??   ??       %  ??
t/test5.t      2   512    ??   ??       %  ??
Failed 3/6 test scripts, 50.00% okay. 0/3 subtests failed, 100.00% okay.


-- 
=^..^=

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is present
  2005-07-17 22:39                 ` Gerrit P. Haase
@ 2005-07-17 22:42                   ` Michael G Schwern
  0 siblings, 0 replies; 35+ messages in thread
From: Michael G Schwern @ 2005-07-17 22:42 UTC (permalink / raw)
  To: Gerrit P. Haase; +Cc: Andrew Ho, cygwin, makemaker, perl5-porters, petdance

On Mon, Jul 18, 2005 at 12:38:51AM +0200, Gerrit P. Haase wrote:
> I have installed M/MS/MSCHWERN/ExtUtils-MakeMaker-6.30.tar.gz now,
> still the same, every second test fails because blib/lib isn't
> present in @INC (every second test).

MakeMaker isn't involved.  Its something inside 
Test::Harness::Straps->analyze_file.


-- 
Michael G Schwern     schwern@pobox.com     http://www.pobox.com/~schwern
Reality is that which, when you stop believing in it, doesn't go away.
	-- Phillip K. Dick

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is present
  2005-07-17 22:27                 ` Gerrit P. Haase
@ 2005-07-17 22:41                   ` Michael G Schwern
  2005-07-17 23:03                     ` Gerrit P. Haase
  0 siblings, 1 reply; 35+ messages in thread
From: Michael G Schwern @ 2005-07-17 22:41 UTC (permalink / raw)
  To: Gerrit P. Haase; +Cc: Andrew Ho, cygwin, makemaker, perl5-porters, petdance

On Mon, Jul 18, 2005 at 12:27:31AM +0200, Gerrit P. Haase wrote:
> >perl -MTest::Harness -Iblib/lib -Iblib/arch -wle '$Test::Harness::Debug = 
> >1;  $Test::Harness::Verbose = 1;  runtests @ARGV' t/*.t
> >The lines we're looking for are "# PERL5LIB=..." from THS->analyze_file()
> >telling us how TH is setting @INC.
> 
> t/test0....# Running: /usr/bin/perl -w t/test0.t
> # PERL5LIB=blib/lib:blib/arch
> 1..1
> # Running under perl version 5.008007 for cygwin
> # Current time local: Mon Jul 18 00:14:08 2005
> # Current time GMT:   Sun Jul 17 22:14:08 2005
> # Using Test.pm version 1.25
> ok 1
> ok
> t/test1....# Running: /usr/bin/perl -w t/test1.t
> # PERL5LIB=

At this point I'd suspect there's something broken about %ENV.  Try replacing
this in THS->analyze_file:

    local $ENV{PERL5LIB} = $self->_INC2PERL5LIB;
    if ( $Test::Harness::Debug ) {
        local $^W=0; # ignore undef warnings
        print "# PERL5LIB=$ENV{PERL5LIB}\n";
    }

with this:

    my $libs = $self->_INC2PERL5LIB;
    local $ENV{PERL5LIB} = $libs;
    if ( $Test::Harness::Debug ) {
        local $^W=0; # ignore undef warnings
        print STDERR "# PERL5LIB=$ENV{PERL5LIB}\n";
	print STDERR "# libs=$libs\n";
    }

to determine if _INC2PERL5LIB() is acting properly.


-- 
Michael G Schwern     schwern@pobox.com     http://www.pobox.com/~schwern
Just call me 'Moron Sugar'.
	http://www.somethingpositive.net/sp05182002.shtml

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is   present
  2005-07-17 22:31               ` Gerrit P. Haase
@ 2005-07-17 22:39                 ` Gerrit P. Haase
  2005-07-17 22:42                   ` Michael G Schwern
  2005-07-18  8:52                 ` Michael G Schwern
  1 sibling, 1 reply; 35+ messages in thread
From: Gerrit P. Haase @ 2005-07-17 22:39 UTC (permalink / raw)
  To: Gerrit P. Haase
  Cc: Michael G Schwern, Andrew Ho, cygwin, makemaker, perl5-porters, petdance

I have installed M/MS/MSCHWERN/ExtUtils-MakeMaker-6.30.tar.gz now,
still the same, every second test fails because blib/lib isn't
present in @INC (every second test).


Gerrit
-- 
=^..^=

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is   present
  2005-07-17 21:43             ` Gerrit P. Haase
  2005-07-17 21:58               ` Michael G Schwern
@ 2005-07-17 22:31               ` Gerrit P. Haase
  2005-07-17 22:39                 ` Gerrit P. Haase
  2005-07-18  8:52                 ` Michael G Schwern
  1 sibling, 2 replies; 35+ messages in thread
From: Gerrit P. Haase @ 2005-07-17 22:31 UTC (permalink / raw)
  To: Gerrit P. Haase
  Cc: Michael G Schwern, Andrew Ho, cygwin, makemaker, perl5-porters, petdance

Gerrit P. Haase wrote:

> Maybe a cygwin problem, I'll fetch a snapshot.

With the latest snapshot I see the same behaviour.

Are there other modules involved besides MM and TH?


Gerrit
-- 
=^..^=

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is  present
  2005-07-17 21:58               ` Michael G Schwern
@ 2005-07-17 22:27                 ` Gerrit P. Haase
  2005-07-17 22:41                   ` Michael G Schwern
  0 siblings, 1 reply; 35+ messages in thread
From: Gerrit P. Haase @ 2005-07-17 22:27 UTC (permalink / raw)
  To: Michael G Schwern; +Cc: Andrew Ho, cygwin, makemaker, perl5-porters, petdance

Michael G Schwern wrote:

> On Sun, Jul 17, 2005 at 11:43:39PM +0200, Gerrit P. Haase wrote:
> 
>>Nope, Teat::Harness now at version 2.52:
>>
>>$ make test
>>/usr/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 
>>'blib/lib', 'blib/arch')" t/*.t
> 
> 
> Ok, see if MakeMaker has anything to do with this by running:
> 
> perl -MTest::Harness -Iblib/lib -Iblib/arch -wle 'runtests @ARGV' t/*.t
> 
> If it still fails then we know MakeMaker is not involved.  I don't think
> it is.

$ perl -MTest::Harness -Iblib/lib -Iblib/arch -wle 'runtests @ARGV'
[...]
Failed Test Stat Wstat Total Fail  Failed  List of Failed
-----------------------------------------------------------------------------------------------------
t/test1.t      2   512    ??   ??       %  ??
t/test3.t      2   512    ??   ??       %  ??
t/test5.t      2   512    ??   ??       %  ??
Failed 3/6 test scripts, 50.00% okay. 0/3 subtests failed, 100.00% okay.


> Then try:
> 
> perl -MTest::Harness -Iblib/lib -Iblib/arch -wle '$Test::Harness::Debug = 1;  $Test::Harness::Verbose = 1;  runtests @ARGV' t/*.t
> The lines we're looking for are "# PERL5LIB=..." from THS->analyze_file()
> telling us how TH is setting @INC.

t/test0....# Running: /usr/bin/perl -w t/test0.t
# PERL5LIB=blib/lib:blib/arch
1..1
# Running under perl version 5.008007 for cygwin
# Current time local: Mon Jul 18 00:14:08 2005
# Current time GMT:   Sun Jul 17 22:14:08 2005
# Using Test.pm version 1.25
ok 1
ok
t/test1....# Running: /usr/bin/perl -w t/test1.t
# PERL5LIB=
Can't locate TestModule.pm in @INC (@INC contains: 
/usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 /usr/l 
 
ib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 
/usr/lib/perl5/site_perl/5.8 /usr/lib/perl5 
 
/vendor_perl/5.8/cygwin /usr/lib/perl5/vendor_perl/5.8 
/usr/lib/perl5/vendor_perl/5.8 .) at t/test1.t 
                                                      line 2.
BEGIN failed--compilation aborted at t/test1.t line 2.
dubious
         Test returned status 2 (wstat 512, 0x200)
t/test2....# Running: /usr/bin/perl -w t/test2.t
# PERL5LIB=blib/lib:blib/arch
1..1
# Running under perl version 5.008007 for cygwin
# Current time local: Mon Jul 18 00:14:09 2005
# Current time GMT:   Sun Jul 17 22:14:09 2005
# Using Test.pm version 1.25
ok 1
ok
t/test3....# Running: /usr/bin/perl -w t/test3.t
# PERL5LIB=
Can't locate TestModule.pm in @INC (@INC contains: 
/usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 /usr/l 
 
ib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 
/usr/lib/perl5/site_perl/5.8 /usr/lib/perl5 
 
/vendor_perl/5.8/cygwin /usr/lib/perl5/vendor_perl/5.8 
/usr/lib/perl5/vendor_perl/5.8 .) at t/test3.t 
                                                      line 2.
BEGIN failed--compilation aborted at t/test3.t line 2.
dubious
         Test returned status 2 (wstat 512, 0x200)
t/test4....# Running: /usr/bin/perl -w t/test4.t
# PERL5LIB=blib/lib:blib/arch
1..1
# Running under perl version 5.008007 for cygwin
# Current time local: Mon Jul 18 00:14:10 2005
# Current time GMT:   Sun Jul 17 22:14:10 2005
# Using Test.pm version 1.25
ok 1
ok
t/test5....# Running: /usr/bin/perl -w t/test5.t
# PERL5LIB=
Can't locate TestModule.pm in @INC (@INC contains: 
/usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 /usr/l 
 
ib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 
/usr/lib/perl5/site_perl/5.8 /usr/lib/perl5 
 
/vendor_perl/5.8/cygwin /usr/lib/perl5/vendor_perl/5.8 
/usr/lib/perl5/vendor_perl/5.8 .) at t/test5.t 
                                                      line 2.
BEGIN failed--compilation aborted at t/test5.t line 2.
dubious
         Test returned status 2 (wstat 512, 0x200)
Failed Test Stat Wstat Total Fail  Failed  List of Failed
-----------------------------------------------------------------------------------------------------
t/test1.t      2   512    ??   ??       %  ??
t/test3.t      2   512    ??   ??       %  ??
t/test5.t      2   512    ??   ??       %  ??
Failed 3/6 test scripts, 50.00% okay. 0/3 subtests failed, 100.00% okay.

> You'll probably also want to look at the output of THS->_command_line().
> Unfortunately there's not a $Debug print for that so you should put one in.

$ perl -MTest::Harness -Iblib/lib -Iblib/arch -wle 
'$Test::Harness::Debug = 1;  $Test::Harness::Verbose = 1;  runtests 
@ARGV' t/*.t
t/test0....# _command_line: /usr/bin/perl -w t/test0.t
# Running: /usr/bin/perl -w t/test0.t
# PERL5LIB=blib/lib:blib/arch
# _command_line: /usr/bin/perl -w t/test0.t
1..1
# Running under perl version 5.008007 for cygwin
# Current time local: Mon Jul 18 00:26:34 2005
# Current time GMT:   Sun Jul 17 22:26:34 2005
# Using Test.pm version 1.25
ok 1
ok
t/test1....# _command_line: /usr/bin/perl -w t/test1.t
# Running: /usr/bin/perl -w t/test1.t
# PERL5LIB=
# _command_line: /usr/bin/perl -w t/test1.t
Can't locate TestModule.pm in @INC (@INC contains: 
/usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 
/usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 
/usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin 
/usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at 
t/test1.t line 2.
BEGIN failed--compilation aborted at t/test1.t line 2.
dubious
         Test returned status 2 (wstat 512, 0x200)
t/test2....# _command_line: /usr/bin/perl -w t/test2.t
# Running: /usr/bin/perl -w t/test2.t
# PERL5LIB=blib/lib:blib/arch
# _command_line: /usr/bin/perl -w t/test2.t
1..1
# Running under perl version 5.008007 for cygwin
# Current time local: Mon Jul 18 00:26:35 2005
# Current time GMT:   Sun Jul 17 22:26:35 2005
# Using Test.pm version 1.25
ok 1
ok
t/test3....# _command_line: /usr/bin/perl -w t/test3.t
# Running: /usr/bin/perl -w t/test3.t
# PERL5LIB=
# _command_line: /usr/bin/perl -w t/test3.t
Can't locate TestModule.pm in @INC (@INC contains: 
/usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 
/usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 
/usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin 
/usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at 
t/test3.t line 2.
BEGIN failed--compilation aborted at t/test3.t line 2.
dubious
         Test returned status 2 (wstat 512, 0x200)
t/test4....# _command_line: /usr/bin/perl -w t/test4.t
# Running: /usr/bin/perl -w t/test4.t
# PERL5LIB=blib/lib:blib/arch
# _command_line: /usr/bin/perl -w t/test4.t
1..1
# Running under perl version 5.008007 for cygwin
# Current time local: Mon Jul 18 00:26:36 2005
# Current time GMT:   Sun Jul 17 22:26:36 2005
# Using Test.pm version 1.25
ok 1
ok
t/test5....# _command_line: /usr/bin/perl -w t/test5.t
# Running: /usr/bin/perl -w t/test5.t
# PERL5LIB=
# _command_line: /usr/bin/perl -w t/test5.t
Can't locate TestModule.pm in @INC (@INC contains: 
/usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 
/usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 
/usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin 
/usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at 
t/test5.t line 2.
BEGIN failed--compilation aborted at t/test5.t line 2.
dubious
         Test returned status 2 (wstat 512, 0x200)
Failed Test Stat Wstat Total Fail  Failed  List of Failed
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
t/test1.t      2   512    ??   ??       %  ??
t/test3.t      2   512    ??   ??       %  ??
t/test5.t      2   512    ??   ??       %  ??
Failed 3/6 test scripts, 50.00% okay. 0/3 subtests failed, 100.00% okay.


> Do any of these tests have -T in the #! line?

No, all the same files, interesting thing is that only every second
time it fails, every other test succeeds:

$ for i in `ls t`; do cat t/$i ; done
use Test;
use TestModule;

BEGIN { plan tests => 1 }

ok(1);
use Test;
use TestModule;

BEGIN { plan tests => 1 }

ok(1);
use Test;
use TestModule;

BEGIN { plan tests => 1 }

ok(1);
use Test;
use TestModule;

BEGIN { plan tests => 1 }

ok(1);
use Test;
use TestModule;

BEGIN { plan tests => 1 }

ok(1);
use Test;
use TestModule;

BEGIN { plan tests => 1 }

ok(1);


Funny ;)


Gerrit
-- 
=^..^=

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is present
  2005-07-17 21:43             ` Gerrit P. Haase
@ 2005-07-17 21:58               ` Michael G Schwern
  2005-07-17 22:27                 ` Gerrit P. Haase
  2005-07-17 22:31               ` Gerrit P. Haase
  1 sibling, 1 reply; 35+ messages in thread
From: Michael G Schwern @ 2005-07-17 21:58 UTC (permalink / raw)
  To: Gerrit P. Haase; +Cc: Andrew Ho, cygwin, makemaker, perl5-porters, petdance

On Sun, Jul 17, 2005 at 11:43:39PM +0200, Gerrit P. Haase wrote:
> Nope, Teat::Harness now at version 2.52:
>
> $ make test
> /usr/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 
> 'blib/lib', 'blib/arch')" t/*.t

Ok, see if MakeMaker has anything to do with this by running:

perl -MTest::Harness -Iblib/lib -Iblib/arch -wle 'runtests @ARGV' t/*.t

If it still fails then we know MakeMaker is not involved.  I don't think
it is.

Then try:

perl -MTest::Harness -Iblib/lib -Iblib/arch -wle '$Test::Harness::Debug = 1;  $Test::Harness::Verbose = 1;  runtests @ARGV' t/*.t

The lines we're looking for are "# PERL5LIB=..." from THS->analyze_file()
telling us how TH is setting @INC.

You'll probably also want to look at the output of THS->_command_line().
Unfortunately there's not a $Debug print for that so you should put one in.

Do any of these tests have -T in the #! line?


-- 
Michael G Schwern     schwern@pobox.com     http://www.pobox.com/~schwern
ROCKS FALL! EVERYONE DIES!
	http://www.somethingpositive.net/sp05032002.shtml

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is  present
  2005-07-17 21:18           ` Michael G Schwern
@ 2005-07-17 21:43             ` Gerrit P. Haase
  2005-07-17 21:58               ` Michael G Schwern
  2005-07-17 22:31               ` Gerrit P. Haase
  0 siblings, 2 replies; 35+ messages in thread
From: Gerrit P. Haase @ 2005-07-17 21:43 UTC (permalink / raw)
  To: Michael G Schwern; +Cc: Andrew Ho, cygwin, makemaker, perl5-porters, petdance

Michael G Schwern wrote:

> On Sun, Jul 17, 2005 at 10:16:40PM +0200, Gerrit P. Haase wrote:
> 
>>>I'm going to guess somethign wacky is going on inside Test::Harness.  What
>>>version is being used?
>>
>>The dafault Test::Harness which is included with perl-5.8.7:
>>$ perl -e 'use Test::Harness; print "$Test::Harness::VERSION\n";'
>>2.48
> 
> 
> Try upgrading TH and see if that fixes it.

Nope, Teat::Harness now at version 2.52:

$ make test
/usr/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'blib/lib', 'blib/arch')" t/*.t
t/test0....ok 

t/test1....Can't locate TestModule.pm in @INC (@INC contains: 
/usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 
/usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 
/usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin 
/usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at 
t/test1.t line 2.
BEGIN failed--compilation aborted at t/test1.t line 2.
t/test1....dubious 

         Test returned status 2 (wstat 512, 0x200)
t/test2....ok 

t/test3....Can't locate TestModule.pm in @INC (@INC contains: 
/usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 
/usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 
/usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin 
/usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at 
t/test3.t line 2.
BEGIN failed--compilation aborted at t/test3.t line 2.
t/test3....dubious 

         Test returned status 2 (wstat 512, 0x200)
t/test4....ok 

t/test5....Can't locate TestModule.pm in @INC (@INC contains: 
/usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 
/usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 
/usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin 
/usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at 
t/test5.t line 2.
BEGIN failed--compilation aborted at t/test5.t line 2.
t/test5....dubious 

         Test returned status 2 (wstat 512, 0x200)
Failed Test Stat Wstat Total Fail  Failed  List of Failed
--------------------------------------------------------------------------------------------------------------------
t/test1.t      2   512    ??   ??       %  ??
t/test3.t      2   512    ??   ??       %  ??
t/test5.t      2   512    ??   ??       %  ??
Failed 3/6 test scripts, 50.00% okay. 0/3 subtests failed, 100.00% okay.
make: *** [test_dynamic] Error 14


@INC path in MM.pm is still correct:
/home/gerrit/perltemp/TestModule_broken/blib/lib 
/home/gerrit/perltemp/TestModule_broken/blib/arch 
/usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 
/usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 
/usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin 
/usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .


Maybe a cygwin problem, I'll fetch a snapshot.

Gerrit
-- 
=^..^=

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is present
  2005-07-17 20:16         ` Gerrit P. Haase
@ 2005-07-17 21:18           ` Michael G Schwern
  2005-07-17 21:43             ` Gerrit P. Haase
  0 siblings, 1 reply; 35+ messages in thread
From: Michael G Schwern @ 2005-07-17 21:18 UTC (permalink / raw)
  To: Gerrit P. Haase; +Cc: Andrew Ho, cygwin, makemaker, perl5-porters, petdance

On Sun, Jul 17, 2005 at 10:16:40PM +0200, Gerrit P. Haase wrote:
> >I'm going to guess somethign wacky is going on inside Test::Harness.  What
> >version is being used?
> 
> The dafault Test::Harness which is included with perl-5.8.7:
> $ perl -e 'use Test::Harness; print "$Test::Harness::VERSION\n";'
> 2.48

Try upgrading TH and see if that fixes it.


-- 
Michael G Schwern     schwern@pobox.com     http://www.pobox.com/~schwern
Don't try the paranormal until you know what's normal.
	-- "Lords and Ladies" by Terry Prachett

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is present
  2005-07-17 20:39         ` Gerrit P. Haase
@ 2005-07-17 21:18           ` Michael G Schwern
  0 siblings, 0 replies; 35+ messages in thread
From: Michael G Schwern @ 2005-07-17 21:18 UTC (permalink / raw)
  To: Gerrit P. Haase; +Cc: Andrew Ho, cygwin, makemaker, perl5-porters, petdance

On Sun, Jul 17, 2005 at 10:39:05PM +0200, Gerrit P. Haase wrote:
> >Hmm.  That's very strange.  Particularly the oscilating nature.  The reason
> >its failing only when in lib/ is because '.' is in @INC so it can find
> >the module.  If you run the tests under taint mode (which removes the .)
> >they should fail.
> 
> Simply running the command with -t, like so:
> /usr/bin/perl.exe -t "-MExtUtils::Command::MM" "-e" "test_harness(0, 
> 'blib/lib', 'blib/arch')" t/*.t
> 
> or is this not the right way to activate taint mode?

Full on taint mode is -T and -t is just warnings.  Anyhow, it serves the
purpose.

> $ /usr/bin/perl.exe -t "-MExtUtils::Command::MM" "-e" "test_harness(0, 
> 'blib/lib', 'blib/arch')" t/*.t
> [...]
> t/test5....Insecure dependency in `` while running with -t switch at 
> /usr/lib/perl5/5.8/Test/Harness/Straps.pm line 478.

Oh yeah, TH isn't taint safe.  Nevermind.


-- 
Michael G Schwern     schwern@pobox.com     http://www.pobox.com/~schwern
'All anyone gets in a mirror is themselves,' she said. 'But what you
gets in a good gumbo is everything.'
	-- "Witches Abroad" by Terry Prachett

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is  present
       [not found]       ` <20050717195041.GC5605@windhund.schwern.org>
  2005-07-17 20:16         ` Gerrit P. Haase
@ 2005-07-17 20:39         ` Gerrit P. Haase
  2005-07-17 21:18           ` Michael G Schwern
  1 sibling, 1 reply; 35+ messages in thread
From: Gerrit P. Haase @ 2005-07-17 20:39 UTC (permalink / raw)
  To: Michael G Schwern; +Cc: Andrew Ho, cygwin, makemaker, perl5-porters, petdance

Michael G Schwern wrote:

> On Sun, Jul 17, 2005 at 12:57:17PM +0200, Gerrit P. Haase wrote:
> 
>>we are on Cygwin: 1.5.18(0.132/4/2) 2005-07-02 20:30, perl is the latest
>>stable release: This is perl, v5.8.7 built for cygwin-thread-multi-64int
>>
>>We have a problem building modules, i.e. make test fails if a .pm file
>>in the source package is located below the root in a subdirectory called
>>'lib'.
> 
> 
> Hmm.  That's very strange.  Particularly the oscilating nature.  The reason
> its failing only when in lib/ is because '.' is in @INC so it can find
> the module.  If you run the tests under taint mode (which removes the .)
> they should fail.

Simply running the command with -t, like so:
/usr/bin/perl.exe -t "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'blib/lib', 'blib/arch')" t/*.t

or is this not the right way to activate taint mode?

@INC:
/home/gerrit/perltemp/TestModule_working/blib/lib
/home/gerrit/perltemp/TestModule_working/blib/arch
/usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8
/usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8
/usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin
/usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8

^^^ no . in @INC

This is with the working version of TestModule (without the lib
subdircetory):

$ /usr/bin/perl.exe -t "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'blib/lib', 'blib/arch')" t/*.t
[...]
t/test5....Insecure dependency in `` while running with -t switch at 
/usr/lib/perl5/5.8/Test/Harness/Straps.pm line 478.
Insecure $ENV{PATH} while running with -t switch at 
/usr/lib/perl5/5.8/Test/Harness/Straps.pm line 478.
Insecure EXEC while running with -t switch at 
/usr/lib/perl5/5.8/Test/Harness/Straps.pm line 478.
Insecure $ENV{PATH} while running with -t switch at 
/usr/lib/perl5/5.8/Test/Harness/Straps.pm line 291.
Insecure dependency in piped open while running with -t switch at 
/usr/lib/perl5/5.8/Test/Harness/Straps.pm line 291.
Insecure $ENV{PATH} while running with -t switch at 
/usr/lib/perl5/5.8/Test/Harness/Straps.pm line 291.
Insecure EXEC while running with -t switch at 
/usr/lib/perl5/5.8/Test/Harness/Straps.pm line 291.
t/test5....ok 

All tests successful.
Files=6, Tests=6,  2 wallclock secs ( 1.04 cusr +  1.01 csys =  2.05 CPU)


> I'm going to guess somethign wacky is going on inside Test::Harness.  What
> version is being used?


Gerrit
-- 
=^..^=

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [perl-5.8.7] Perl regression tests fail when lib directory is  present
       [not found]       ` <20050717195041.GC5605@windhund.schwern.org>
@ 2005-07-17 20:16         ` Gerrit P. Haase
  2005-07-17 21:18           ` Michael G Schwern
  2005-07-17 20:39         ` Gerrit P. Haase
  1 sibling, 1 reply; 35+ messages in thread
From: Gerrit P. Haase @ 2005-07-17 20:16 UTC (permalink / raw)
  To: Michael G Schwern; +Cc: Andrew Ho, cygwin, makemaker, perl5-porters, petdance

Hi Michael,


Michael G Schwern wrote:

> On Sun, Jul 17, 2005 at 12:57:17PM +0200, Gerrit P. Haase wrote:
> 
>>we are on Cygwin: 1.5.18(0.132/4/2) 2005-07-02 20:30, perl is the latest
>>stable release: This is perl, v5.8.7 built for cygwin-thread-multi-64int
>>
>>We have a problem building modules, i.e. make test fails if a .pm file
>>in the source package is located below the root in a subdirectory called
>>'lib'.
> 
> 
> Hmm.  That's very strange.  Particularly the oscilating nature.  The reason
> its failing only when in lib/ is because '.' is in @INC so it can find
> the module.  If you run the tests under taint mode (which removes the .)
> they should fail.
> 
> I'm going to guess somethign wacky is going on inside Test::Harness.  What
> version is being used?

The dafault Test::Harness which is included with perl-5.8.7:
$ perl -e 'use Test::Harness; print "$Test::Harness::VERSION\n";'
2.48



Gerrit
-- 
=^..^=

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [perl-5.8.7] Perl regression tests fail when lib directory is present
  2005-07-16 19:27   ` Andrew Ho
@ 2005-07-17 10:57     ` Gerrit P. Haase
       [not found]       ` <20050717195041.GC5605@windhund.schwern.org>
  0 siblings, 1 reply; 35+ messages in thread
From: Gerrit P. Haase @ 2005-07-17 10:57 UTC (permalink / raw)
  To: Andrew Ho; +Cc: cygwin, makemaker, perl5-porters

Hello,

we are on Cygwin: 1.5.18(0.132/4/2) 2005-07-02 20:30, perl is the latest
stable release: This is perl, v5.8.7 built for cygwin-thread-multi-64int

We have a problem building modules, i.e. make test fails if a .pm file
in the source package is located below the root in a subdirectory called
'lib'.


Andrew Ho wrote:
 >>> It appears that on the latest version of Cygwin's Perl, Perl modules
 >>> with regression tests (for example, ones you can download from CPAN)
 >>> fail "make test" on every other test. I did some experimentation and
 >>> this appears to happen only if the modules are in a subdirectory
 >>> (typically "lib") rather than in the install root.
 >>>
 >>> How to reproduce:
 >>>
 >>>     * Upgrade to latest versions of all Cygwin packages (probably
 >>>       Perl is the only relevant one)
 >>>
 >>>     * Download any CPAN module (or create a Perl module) whose files
 >>>       are in a "lib" subdirectory. Lingua::EN::Inflect is an arbitrary
 >>>       example of one that is unlikely to be already installed.
 >>>
 >>>     * Run through the usual Perl install steps:
 >>>       perl Makefile.PL && make && make test
 >>>
 >>>     * Observe that "make test" fails on every other test (odd numbered
 >>>       runs, apparently).
 >>>
 >>> I have reduced this breakage to the smallest possible test case:
 >>> http://www.zeuscat.com/andrew/src/TestModule.tar.gz

> Did you try to run "make test" on the TestModule.tar.gz that I linked 
> to? I'm curious to see if that simple case fails (it contains both a 
> "working" and "broken" version, the latter has the module in a "lib" 
> subdirectory). And is it possible you already had Lingua::EN::Inflect 
> installed on your test system?

Hm, maybe I tried it at first from a cpan shell, and then from the 
command line. I saw a similar problem with XML::GDOME, however tests are
failing even when running from a cpan shell, I reported this as a bug to
the Gdome list, because there are also tests failing after the module
was installed and could be found in @INC.  Unfortunately I didn't 
realized that the "Can't locate ... in @INC" could be a perl bug
since other modules are working ok or I used the cpan shell to install
them.



Now I see that you're right:

$ wget http://www.zeuscat.com/andrew/src/TestModule.tar.gz
--12:11:14--  http://www.zeuscat.com/andrew/src/TestModule.tar.gz
            => `TestModule.tar.gz'
Resolving www.zeuscat.com... 205.217.153.72
Connecting to www.zeuscat.com[205.217.153.72]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 754 [application/x-tar]

100%[====================================>] 754           --.--K/s 


12:11:15 (7.19 MB/s) - `TestModule.tar.gz' saved [754/754]

$ tar zxvf TestModule.tar.gz
TestModule_broken/
TestModule_broken/lib/
TestModule_broken/lib/TestModule.pm
TestModule_broken/Makefile.PL
TestModule_broken/t/
TestModule_broken/t/test0.t
TestModule_broken/t/test1.t
TestModule_broken/t/test2.t
TestModule_broken/t/test3.t
TestModule_broken/t/test4.t
TestModule_broken/t/test5.t
TestModule_working/
TestModule_working/Makefile.PL
TestModule_working/t/
TestModule_working/t/test0.t
TestModule_working/t/test1.t
TestModule_working/t/test2.t
TestModule_working/t/test3.t
TestModule_working/t/test4.t
TestModule_working/t/test5.t
TestModule_working/TestModule.pm

$ cd TestModule_broken/

$ perl Makefile.PL
Writing Makefile for TestModule

$ make
cp lib/TestModule.pm blib/lib/TestModule.pm

$ make test
/usr/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'blib/lib', 'blib/arch')" t/*.t
t/test0....ok 

t/test1....Can't locate TestModule.pm in @INC (@INC contains: 
/usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 
/usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 
/usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin 
/usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at 
t/test1.t line 2.
BEGIN failed--compilation aborted at t/test1.t line 2.
t/test1....dubious 

         Test returned status 2 (wstat 512, 0x200)
t/test2....ok 

t/test3....Can't locate TestModule.pm in @INC (@INC contains: 
/usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 
/usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 
/usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin 
/usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at 
t/test3.t line 2.
BEGIN failed--compilation aborted at t/test3.t line 2.
t/test3....dubious 

         Test returned status 2 (wstat 512, 0x200)
t/test4....ok 

t/test5....Can't locate TestModule.pm in @INC (@INC contains: 
/usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 
/usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 
/usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin 
/usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at 
t/test5.t line 2.
BEGIN failed--compilation aborted at t/test5.t line 2.
t/test5....dubious 

         Test returned status 2 (wstat 512, 0x200)
Failed Test Stat Wstat Total Fail  Failed  List of Failed
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
t/test1.t      2   512    ??   ??       %  ??
t/test3.t      2   512    ??   ??       %  ??
t/test5.t      2   512    ??   ??       %  ??
Failed 3/6 test scripts, 50.00% okay. 0/3 subtests failed, 100.00% okay.
make: *** [test_dynamic] Error 14

$ cd ../TestModule_working/

$ perl Makefile.PL
Writing Makefile for TestModule

$ make
cp TestModule.pm blib/lib/TestModule.pm

$ make test
/usr/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'blib/lib', 'blib/arch')" t/*.t
t/test0....ok 

t/test1....ok 

t/test2....ok 

t/test3....ok 

t/test4....ok 

t/test5....ok 

All tests successful.
Files=6, Tests=6,  2 wallclock secs ( 1.14 cusr +  0.90 csys =  2.04 CPU)



The problem seems to be that blib and/or blib/lib isn't added to @INC:

t/test1....Can't locate TestModule.pm in @INC (@INC contains: 
/usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 
/usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 
/usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin 
/usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at 
t/test1.t line 2.

The .pm is right there:
$ ls blib/lib
TestModule.pm  auto/


This is dubious since it works ok when the .pm in the original
source package is in TestModule_working/TestModule.pm instead of
TestModule_working/lib/TestModule.pm.

How does the location of the source affect the @INC settings?

in test_harness this is called:
     unshift @INC, map { File::Spec->rel2abs($_) } @_;

I added a print here:
/home/gerrit/perltemp/TestModule_broken/blib/lib
/home/gerrit/perltemp/TestModule_broken/blib/arch
/usr/lib/perl5/5.8/cygwin
/usr/lib/perl5/5.8
/usr/lib/perl5/site_perl/5.8/cygwin
/usr/lib/perl5/site_perl/5.8
/usr/lib/perl5/site_perl/5.8
/usr/lib/perl5/vendor_perl/5.8/cygwin
/usr/lib/perl5/vendor_perl/5.8
/usr/lib/perl5/vendor_perl/5.8
.

So the path seems to be correct in the first step.

Then Test::Harness::runtests is called, the @INC setting is different
now (i.e. just the default):

Can't locate TestModule.pm in @INC (@INC contains:
/usr/lib/perl5/5.8/cygwin
/usr/lib/perl5/5.8
/usr/lib/perl5/site_perl/5.8/cygwin
/usr/lib/perl5/site_perl/5.8
/usr/lib/perl5/site_perl/5.8
/usr/lib/perl5/vendor_perl/5.8/cygwin
/usr/lib/perl5/vendor_perl/5.8
/usr/lib/perl5/vendor_perl/5.8
.) at t/test1.t line 2.


Here I have no idea.  After a short view into Harness.pm I decided
to ask someone who is more familiar with MakeMaker and Test::Harness
than me.


Gerrit
-- 
=^..^=

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2005-07-27 10:41 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-20  2:16 [perl-5.8.7] Perl regression tests fail when lib directory is present Scott Bolte
2005-07-20 18:48 ` Michael G Schwern
2005-07-21  2:02   ` Andrew Ho
2005-07-21  8:50     ` Michael G Schwern
  -- strict thread matches above, loose matches on Subject: below --
2005-07-26 12:45 Scott Bolte
2005-07-26 18:20 ` Gerrit P. Haase
2005-07-26 18:23   ` Michael G Schwern
2005-07-26 18:47     ` Gerrit P. Haase
2005-07-26 20:14       ` Michael G Schwern
2005-07-26 20:58         ` Gerrit P. Haase
2005-07-26 22:27           ` Michael G Schwern
2005-07-26 22:33             ` Andrew Ho
2005-07-26 22:43               ` Michael G Schwern
2005-07-27  8:27                 ` Andrew Ho
2005-07-27 10:56                   ` Gerrit P. Haase
2005-07-22 20:31 Scott Bolte
2005-07-22 21:03 ` Christopher Faylor
2005-07-25 16:33   ` Gerrit P. Haase
2005-07-19 12:45 Scott Bolte
2005-07-19 15:27 ` Michael G Schwern
2005-07-16  8:00 1.5.18: " Andrew Ho
2005-07-16  9:40 ` Gerrit P. Haase
2005-07-16 19:27   ` Andrew Ho
2005-07-17 10:57     ` [perl-5.8.7] " Gerrit P. Haase
     [not found]       ` <20050717195041.GC5605@windhund.schwern.org>
2005-07-17 20:16         ` Gerrit P. Haase
2005-07-17 21:18           ` Michael G Schwern
2005-07-17 21:43             ` Gerrit P. Haase
2005-07-17 21:58               ` Michael G Schwern
2005-07-17 22:27                 ` Gerrit P. Haase
2005-07-17 22:41                   ` Michael G Schwern
2005-07-17 23:03                     ` Gerrit P. Haase
2005-07-17 23:15                       ` Michael G Schwern
2005-07-17 22:31               ` Gerrit P. Haase
2005-07-17 22:39                 ` Gerrit P. Haase
2005-07-17 22:42                   ` Michael G Schwern
2005-07-18  8:52                 ` Michael G Schwern
2005-07-17 20:39         ` Gerrit P. Haase
2005-07-17 21:18           ` Michael G Schwern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).