Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Net::Daemon make test failing on windows..

by prashantktyagi (Scribe)
on Apr 26, 2013 at 08:55 UTC ( #1030793=perlquestion: print w/replies, xml ) Need Help??
prashantktyagi has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
I am installing Net::Daemon (v0.48) from source. I am on activestate Perl v 5.16.3 (Win 7 64 bit). make test return failure and cause perl interpreter to stop working in t/threadm.t test. I debugged test and found this.
c:\Perl64\cpan\build\Net-Daemon-0.48-ISrOkZ>perl "-MExtUtils::Command: +:MM" "-e" "test_harness(1, 'blib\lib', 'blib\arch')" t/ithreadm.t t/ithreadm.t .. Starting server: C:\Perl64\bin\perl.exe -Iblib/lib -Iblib/arch t/serve +r --mode=ithreads logfile=stderr debug Starting process: proc = C:\Perl64\bin\perl.exe, args = C:\Perl64\bin\ +perl.exe -Iblib/lib -Iblib/arch t/server --mode=ithreads logfile=stde +r r debug 1..10 ok 1 Dubious, test returned 116 (wstat 29696, 0x7400) Failed 9/10 subtests Test Summary Report ------------------- t/ithreadm.t (Wstat: 29696 Tests: 1 Failed: 0) Non-zero exit status: 116 Parse errors: Bad plan. You planned 10 tests but ran 1. Files=1, Tests=1, 5 wallclock secs ( 0.06 usr + 0.00 sys = 0.06 CPU +) Result: FAIL Failed 1/1 test programs. 0/1 subtests failed.
I have checked the test code and it is failing on $tid->join(). That time I can see mutiple instance of perl process in the system.
my @threads; for (my $i = 0; $i < 10; $i++) { #print "Spawning child $i.\n"; my $tid = threads->new(\&MyChild, $i); if (!$tid) { print STDERR "Failed to create new thread: $!\n"; exit 1; } push(@threads, $tid); } eval { alarm 1; alarm 0 }; alarm 120 unless $@; for (my $i = 1; $i <= 10; $i++) { my $tid = shift @threads; #culprit==== if ($tid->join()) { print "ok $i\n"; } else { print "not ok $i\n"; } }
I have checked cpan-rt and found similiar bug https://rt.cpan.org/Public/Bug/Display.html?id=75005, but the workaround didn't solve my problem. When I modify condition
if (1) { print "ok $i\n"; } else {
test went pass. I am not much familiar with threads, so why this is causing the problem. Is this a test problem? should I report a bug on cpan RT ?
Thanks,
updated title ,typo in name.

Replies are listed 'Best First'.
Re: Net::Daemon make test failing on windows..
by Anonymous Monk on Apr 26, 2013 at 12:53 UTC

    When I modify condition

    Don't do that, its a waste of time

    You can install a module with failing test, you either skip the tests, or you force install, or both cpan -f -i -T Net::Daemon

    You get to decide if this bug affects you -- if you're a programmer and experience problems with your app after the update, don't forget about these failing tests, don't forget to check the changelog/changes

    should I report a bug on cpan RT ?

    Given that there are many FAIL reports (97) and many open RT tickets, chances are its a known issue

    This patch looks interesting Bug #82539 for Net-Daemon: Net::Daemon fork mode on Windows/Strawberry Perl

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1030793]
Front-paged by Corion
help
Chatterbox?
[stevieb]: Then throw in changes to Windows that throws everything you trusted right out the window.
[shmem]: that's why it is called "Windows"
[stevieb]: shmem thanks for the 'insight' :P
[shmem]: good thing that Sun already took "OpenWindows", otherwise I'd not stop to shudder imagining an "OpenWindows" from MS
[shmem]: more garbage in, more garbage out that would be
[stevieb]: I found that win10 broke a C# library I was using for one project while enhancing tests for a Perl dist, which breaks other Perl dists, and I'm about to throw my hands up on berrybrew. win2k12 broke one thing, win10 breaks something...
[stevieb]: ...unrelated which requires replacing a lot of code and a whole lib. I'm about to go nix only ffs
[shmem]: stevieb: what you're doing sounds afwully complex. Too much for me this evening to provide brighter insight ;-)
[stevieb]: I don't even own a Windows computer. Both my girl and I have a laptop each with Linux. I'm supporting Windows in some of my projects and I can't even guage whether it's worth it or not.

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2017-03-28 22:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (342 votes). Check out past polls.