Discussion:
[rt.cpan.org #121128] Test failures on Cygwin
(too old to reply)
Ken Brown via RT
2017-04-14 21:41:52 UTC
Permalink
Fri Apr 14 17:41:52 2017: Request 121128 was acted upon.
Transaction: Ticket created by ***@cornell.edu
Queue: Module-ScanDeps
Subject: Test failures on Cygwin
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@cornell.edu
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=121128 >


Hi Roderich,

I just installed Module::ScanDeps 1.23 on Cygwin (both 32-bit and 64-bit) and had a couple of test failures:

Test Summary Report
-------------------
t/10-case-insensitive-keys.t (Wstat: 512 Tests: 40 Failed: 2)
Failed tests: 29, 33
Non-zero exit status: 2
Parse errors: Bad plan. You planned 43 tests but ran 40.
Files=18, Tests=6293, 73 wallclock secs ( 0.80 usr 0.16 sys + 11.65 cusr 21.88 csys = 34.49 CPU)
Result: FAIL
Failed 1/18 test programs. 2/6293 subtests failed.
make: *** [Makefile:897: test_dynamic] Error 255

I reran the tests with TEST_VERBOSE=1 and am attaching the logs. The failures seem to be the same on both 32-bit and 64-bit Cygwin, but there are some differences in the logs that puzzle me, so I'm attaching both logs.

Let me know if there's anything I can do to help debug this. I'm a perl novice, so I'll need detailed instructions.

Thanks.

Ken

P.S. Version info:

32-bit:
$ perl -v

This is perl 5, version 24, subversion 1 (v5.24.1) built for i686-cygwin-threads-64int-multi

$ uname -a
CYGWIN_NT-10.0-WOW moufang 2.8.0(0.309/5/3) 2017-04-01 20:42 i686 Cygwin

64-bit:
$ perl -v

This is perl 5, version 24, subversion 1 (v5.24.1) built for x86_64-cygwin-threads-multi

$ uname -a
CYGWIN_NT-10.0 moufang 2.8.0(0.309/5/3) 2017-04-01 20:47 x86_64 Cygwin
Roderich Schupp via RT
2017-04-14 23:10:05 UTC
Permalink
Fri Apr 14 19:09:59 2017: Request 121128 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: Module-ScanDeps
Subject: Test failures on Cygwin
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@cornell.edu
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=121128 >
Post by Ken Brown via RT
I just installed Module::ScanDeps 1.23 on Cygwin (both 32-bit and 64-
Probably harmless.
But can you patch t/10-case-insensitive-keys.t

...
# Functional i/f
my $rv1 = scan_deps(@roots1);
#use Data::Dump qw(dump);
#print dump($rv1), "\n";
...

like so:

...
# Functional i/f
my $rv1 = scan_deps(@roots1);
use Data::Dumper;
print STDERR "\n", Dumper($rv1);
...

then run

make test TEST_VERBOSE=1 TEST_FILES=t/10-case-insensitive-keys.t

and attach its stdout/stderr.

Cheers, Roderich
Ken Brown via RT
2017-04-15 11:36:27 UTC
Permalink
Sat Apr 15 07:36:18 2017: Request 121128 was acted upon.
Transaction: Correspondence added by ***@cornell.edu
Queue: Module-ScanDeps
Subject: Re: [rt.cpan.org #121128] Test failures on Cygwin
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@cornell.edu
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=121128 >
Post by Roderich Schupp via RT
Probably harmless.
But can you patch t/10-case-insensitive-keys.t
...
# Functional i/f
#use Data::Dump qw(dump);
#print dump($rv1), "\n";
...
...
# Functional i/f
use Data::Dumper;
print STDERR "\n", Dumper($rv1);
...
then run
make test TEST_VERBOSE=1 TEST_FILES=t/10-case-insensitive-keys.t
and attach its stdout/stderr.
Attached.

By the way, my file system is set up to be case sensitive, which I guess
is the same as case_intolerant. [Cygwin users can control this by a
registry setting.] I wonder if the problem is that the File::Spec
module didn't detect this; shouldn't the test have been skipped?

I don't have time at the moment, but I'll take a look at the File::Spec
module later and see if that's the issue.

Ken
Ken Brown via RT
2017-04-15 11:44:50 UTC
Permalink
Sat Apr 15 07:44:44 2017: Request 121128 was acted upon.
Transaction: Correspondence added by ***@cornell.edu
Queue: Module-ScanDeps
Subject: Re: [rt.cpan.org #121128] Test failures on Cygwin
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@cornell.edu
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=121128 >
Post by Roderich Schupp via RT
Probably harmless.
But can you patch t/10-case-insensitive-keys.t
...
# Functional i/f
#use Data::Dump qw(dump);
#print dump($rv1), "\n";
...
...
# Functional i/f
use Data::Dumper;
print STDERR "\n", Dumper($rv1);
...
then run
make test TEST_VERBOSE=1 TEST_FILES=t/10-case-insensitive-keys.t
and attach its stdout/stderr.
Attached.

By the way, my file system is set up to be case sensitive, which I guess
is the same as case_intolerant. [Cygwin users can control this by a
registry setting.] I wonder if the problem is that the File::Spec
module didn't detect this; shouldn't the test have been skipped?

I don't have time at the moment, but I'll take a look at the File::Spec
module later and see if that's the issue.

Ken
Roderich Schupp via RT
2017-04-15 17:14:55 UTC
Permalink
Sat Apr 15 13:14:49 2017: Request 121128 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: Module-ScanDeps
Subject: Test failures on Cygwin
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@cornell.edu
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=121128 >
Post by Ken Brown via RT
Attached.
Yep, that is exactly the output you would get when forcing
t/10-case-insensitive-keys.t to run (not skip) on a case-sensitive filesystem.
Post by Ken Brown via RT
By the way, my file system is set up to be case sensitive, which I guess
is the same as case_intolerant.
:) "case intolerant" sounds like some form of allergy to me
Post by Ken Brown via RT
I wonder if the problem is that the File::Spec
module didn't detect this; shouldn't the test have been skipped?
I looked at File::Spec::Cygwin (from Perl 5.24.1) and it has indeed a Cygwin specific
File::Spec::case_tolerant. Sorry, I have no machine to test this, but on
first glance this test looks suspicious since there's no "use Cygwin":

sub case_tolerant {
return 1 unless $^O eq 'cygwin'
and defined &Cygwin::mount_flags;
...

Do the following two oneliners produce different output?

perl -E 'say "DEFINED" if defined &Cygwin::mount_flags'
perl -MCygwin -E 'say "DEFINED" if defined &Cygwin::mount_flags'

Cheers, Roderich
Ken Brown via RT
2017-04-15 17:40:59 UTC
Permalink
Sat Apr 15 13:40:53 2017: Request 121128 was acted upon.
Transaction: Correspondence added by ***@cornell.edu
Queue: Module-ScanDeps
Subject: Re: [rt.cpan.org #121128] Test failures on Cygwin
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@cornell.edu
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=121128 >
Post by Ken Brown via RT
<URL: https://rt.cpan.org/Ticket/Display.html?id=121128 >
Post by Ken Brown via RT
Attached.
Yep, that is exactly the output you would get when forcing
t/10-case-insensitive-keys.t to run (not skip) on a case-sensitive filesystem.
Post by Ken Brown via RT
By the way, my file system is set up to be case sensitive, which I guess
is the same as case_intolerant.
:) "case intolerant" sounds like some form of allergy to me
:)
Post by Ken Brown via RT
Post by Ken Brown via RT
I wonder if the problem is that the File::Spec
module didn't detect this; shouldn't the test have been skipped?
I looked at File::Spec::Cygwin (from Perl 5.24.1) and it has indeed a Cygwin specific
File::Spec::case_tolerant. Sorry, I have no machine to test this, but on
sub case_tolerant {
return 1 unless $^O eq 'cygwin'
and defined &Cygwin::mount_flags;
...
Do the following two oneliners produce different output?
perl -E 'say "DEFINED" if defined &Cygwin::mount_flags'
perl -MCygwin -E 'say "DEFINED" if defined &Cygwin::mount_flags'
Yes.

$ perl -E 'say "DEFINED" if defined &Cygwin::mount_flags'
DEFINED

$ perl -MCygwin -E 'say "DEFINED" if defined &Cygwin::mount_flags'
Can't locate Cygwin.pm in @INC (you may need to install the Cygwin
module) (@INC contains:
/usr/lib/perl5/site_perl/5.24/x86_64-cygwin-threads
/usr/lib/perl5/site_perl/5.24
/usr/lib/perl5/vendor_perl/5.24/x86_64-cygwin-threads
/usr/lib/perl5/vendor_perl/5.24
/usr/lib/perl5/5.24/x86_64-cygwin-threads /usr/lib/perl5/5.24 .).
BEGIN failed--compilation aborted.

Apparently there isn't actually a Cygwin module in the usual sense, but
Cygwin::mount_flags is defined in the perl C source code, in
cygwin/cygwin.c:

newXSproto("Cygwin::mount_table", XS_Cygwin_mount_table, file, "");

But I think the real issue here is that File::Spec doesn't know how to
test whether file systems are case sensitive on Cygwin. There's more to
it than what can be found in the mount table.

In any case, Module::ScanDeps seems to be fine. I'll file a bug report
about File::Spec.

Thanks, as always, for your help.

Ken
Roderich Schupp via RT
2017-04-15 17:59:39 UTC
Permalink
Sat Apr 15 13:59:27 2017: Request 121128 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: Module-ScanDeps
Subject: Test failures on Cygwin
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@cornell.edu
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=121128 >
Post by Ken Brown via RT
But I think the real issue here is that File::Spec doesn't know how to
test whether file systems are case sensitive on Cygwin. There's more
to it than what can be found in the mount table.
In any case, Module::ScanDeps seems to be fine. I'll file a bug
report about File::Spec.
Thanks for investigating, closing this ticket.

Cheers, Roderich

Loading...