Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 2955
Status: resolved
Priority: 0/
Queue: WWW-Mechanize

People
Owner: andy [...] petdance.com
Requestors: peter.martin [...] proxima-tech.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



From: "Peter G. Martin" <peter.martin [...] proxima-tech.com>
To: <bug-www-mechanize [...] rt.cpan.org>
Date: Mon, 14 Jul 2003 13:02:18 +1000
Subject: Win32 test failure in mech-forms.t WWW::Mechanize-0.52
nmake test after nmake gives following output to STDERR Microsoft (R) Program Maintenance Utility Version 1.50 Copyright (c) Microsoft Corp 1988-94. All rights reserved. # Failed test (t\mech-forms.t at line 13) # got: 'GET file://C:/search # hl=en (hidden) # ie=ISO-8859-1 (hidden) # q= # btnG=Google Search (submit) # btnI=I'm Feeling Lucky (submit) # # ' # expected: 'GET file:/search # hl=en (hidden) # ie=ISO-8859-1 (hidden) # q= # btnG=Google Search (submit) # btnI=I'm Feeling Lucky (submit) # # ' # Looks like you failed 1 tests of 1. Invalid value for shared scalar at C:/Perl/lib/Test/Builder.pm line 319. WHOA! Somehow you got a different number of results than tests ran! This should never happen! Please contact the author immediately! END failed--call queue aborted. Failed 2/24 test scripts, 91.67% okay. 3/225 subtests failed, 98.67% okay. NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code '0x2' Stop. While redirected STDOUT details are: C:\Perl\bin\perl.exe -MExtUtils::Command -e cp script/mech-forms blib\script\mech-forms pl2bat.bat blib\script\mech-forms C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t\00.load.t t\99.pod.t t\add_header.t t\back.t t\click-local.t t\click.t t\field.t t\find_link.t t\follow-local.t t\follow.t t\follow_link.t t\form-local.t t\form.t t\get-local.t t\get.t t\mech-forms.t t\new-local.t t\new.t t\page_stack.t t\reload-local.t t\reload.t t\submit-local.t t\submit.t t\tick.t t\00.load.........ok t\99.pod..........ok t\add_header......ok t\back............skipped all skipped: This doesn't work at all yet, and people were freaking at the unexpected successes. t\click-local.....ok t\click...........ok t\field...........ok t\find_link.......ok t\follow-local....ok t\follow..........ok t\follow_link.....ok t\form-local......ok t\form............ok t\get-local.......ok t\get.............ok t\mech-forms......dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 1 Failed 1/1 tests, 0.00% okay t\new-local.......ok t\new.............ok t\page_stack......ok t\reload-local....ok t\reload..........ok t\submit-local....ok t\submit..........ok t\tick............dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 4-5 Failed 2/5 tests, 60.00% okay Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t\mech-forms.t 1 256 1 1 100.00% 1 t\tick.t 2 512 5 4 80.00% 4-5 1 test skipped. ============================= Other details: C:\peterm\.cpanplus\5.8.0\build\WWW-Mechanize-0.52>pmvers Test::Builder 0.17 C:\peterm\.cpanplus\5.8.0\build\WWW-Mechanize-0.52>perl -V Summary of my perl5 (revision 5 version 8 subversion 0) configuration: Platform: osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef usethreads=undef use5005threads=undef useithreads=define usemultiplicity=def ine useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cl', ccflags ='-nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE - DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_ PERLIO -DPERL_MSVCRT_READFIX', optimize='-MD -Zi -DNDEBUG -O1', cppflags='-DWIN32' ccversion='', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksi ze=8 alignbytes=8, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -release -libpath:"C:\Perl\lib\C ORE" -machine:x86' libpth="C:\Perl\lib\CORE" libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32 lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsoc k32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comd lg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl58.lib gnulibc_version='undef' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release -libpath:"C: \Perl\lib\CORE" -machine:x86' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_ CONTEXT PERL_IMPLICIT_SYS Locally applied patches: ActivePerl Build 805 Built under MSWin32 Compiled at Feb 4 2003 18:08:02 @INC: C:/Perl/lib C:/Perl/site/lib . ========================================== The url for this test in Win32 is converted to the form file://C:/..... etc by the Win32 branch of File::Spec etc. So GET file:/search is NOT going to match in Win32... I haven't tracked the problems down beyond this level, and haven't found the problem with tick.t yet -- although I +seem+ to recall seeing a "wstat" error message somewhere -- which is common to tests not geared to Win32, apparently... OS function not same or available ?? -Peter G. Martin, Technical writer, Proxima Technology
From: "Peter G. Martin" <peter.martin [...] proxima-tech.com>
To: <bug-WWW-Mechanize [...] rt.cpan.org>
Date: Mon, 14 Jul 2003 14:37:33 +1000
Subject: [cpan #2943] Test::Harness doesn't share "file:/C://something"
RT-Send-Cc:
Show quoted text
>From what I've managed to trace in the test tick.t, it +appears+ that
this code in Test::Builder v0.17 is a source of the problem: if( defined $name ) { $name =~ s|#|\\#|g; # # in a name can confuse Test::Harness. $out .= " - $name"; $result->{name} = $name; # <===== here } The error message refers to the sharing of the sharing of a scalar and as, in Win32, the $name scalar has a value of something like: file://C:/peterm/.cpanplus/5.8.0/build/WWW-Mechanize-0.52/blib/t/tick.html it appears the # is not the only thing that can confuse Test::Harness?? If I change $name to "file:/peterm/......./tick.html" there's no problem with sharing. Haven't checked what Test::Harness is really choking on, but it's down to that... -Peter G. Martin, Technical writer, Proxima Technology
Date: Mon, 14 Jul 2003 09:40:28 -0500
To: bug-WWW-Mechanize [...] rt.cpan.org
From: Andy Lester <andy [...] petdance.com>
Subject: Re: [cpan #2943] Test::Harness doesn't share "file:/C://something"
RT-Send-Cc:
Please try this: Remove line 13, the isa_ok(), from tick.t, and rerun it. I think that URI::file isn't playing well with others. Thanks for your help. xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance
From: "Peter G. Martin" <peter.martin [...] proxima-tech.com>
To: <bug-WWW-Mechanize [...] rt.cpan.org>
Date: Tue, 15 Jul 2003 12:05:10 +1000
Subject: Re: [cpan #2943] Test::Harness doesn't share "file:/C://something"
RT-Send-Cc:
Andy: On Mon, 14 Jul 2003 10:40:33 -0400 (EDT), you are alleged to have written: Show quoted text
>Full context and any attached attachments can be found at: ><URL: http://rt.cpan.org/NoAuth/Bug.html?id=2943 > > >Please try this: Remove line 13, the isa_ok(), from tick.t, and rerun it. > >I think that URI::file isn't playing well with others. > >Thanks for your help. > >xoa
Naah. That isn't where the problem is. The problem is in line 16, ok( $mech->success, $uri ); and it looks like a thread-related problem. If I comment +that+ line out, tick.t runs and only reports that it looked like I only ran four tests when I planned to run 5 -- which is true. See my last not in bug page. Running in the debugger, if I previously reset the value of the $name scalar at line 318 in Builder.pm, and take out the "//C:" stuff, the assignment to the (shared) $result->{name} works ok, and the test passes. If I leave the //C: junk in, there's an immediate fatal error with the message about invalid value for a shared scalar at Builder.pm line 319.. More to the point -- I've now gone further. If I take out the "//" from the returned $uri, by changing the lines: ----------------------------- $mech->get( $uri ); ok( $mech->success, $uri ); ------------ to --------- $mech->get( $uri ); $uri =~ s|//||; ok( $mech->success, $uri ); -------------------------- -- the test runs successfully to conclusion, and reports the relevant result as: ok 4 - file:C:/peterm/.cpanplus/5.8.0/build/WWW-Mechanize-0.52/t/tick.html When it comes to threads, I bow out... but that share is the source of the problem for tick.t in Win32.. Presumably, if, as the code comment says in line 317, that "#" is a problem with Test::Harness, then "//" is a similar problem ? And may benefit from similar fix there? ie, $name =~ s|//||g; ? Meanwhile, attempting a similar fix in mech-forms.t still produces an error, even though the reported got looks just the same as the expected, when I add the kludge of : $expected =~ s|/|//C:/| if($^O =~ /MSWin/); atter the <DATA> collection. May be some control or formatting chars making the difference? Trying a further test to see if I can save and diff the "got" and expected data. -Peter -Peter G. Martin, Technical writer, Proxima Technology
From: "Peter G. Martin" <peter.martin [...] proxima-tech.com>
To: <bug-WWW-Mechanize [...] rt.cpan.org>
Date: Tue, 15 Jul 2003 13:39:14 +1000
Subject: [cpan#2943] Win32 tests v0.52 -- mech-forms.t
Andy: Once the file://C:/ issue's overcome in mech-forms.t, the difference detected between expected and actual amounts to double spaces forming right-padding before end of line in the actual result, cf expected result. ie. just white-space. Not sure what you do about this one.. good luck. -Peter G. Martin, Technical writer, Proxima Technology
This is fixed. The resulting page target is now platform-specific, since we're delaing with cross-platform testing. New Mech should be up today, or get it from CVS on sourceforge.
[PETDANCE - Tue Jul 15 11:52:18 2003]: Show quoted text
> This is fixed. The resulting page target is now platform-specific, > since we're delaing with cross-platform testing. > > New Mech should be up today, or get it from CVS on sourceforge.
tick.t fixed ok, but mech-forms.t still not right in 0.53 under Win32. Test failure report shows actual "file://C:/target-page" when expected "file:/target-page" # Failed test (t/mech-forms.t at line 18) # got: 'GET file://C:/target-page # hl=en (hidden) # ie=ISO-8859-1 (hidden) # q= # btnG=Google Search (submit) # btnI=I'm Feeling Lucky (submit) # # ' # expected: 'GET file:/target-page # hl=en (hidden) # ie=ISO-8859-1 (hidden) # q= # btnG=Google Search (submit) # btnI=I'm Feeling Lucky (submit) # # '
Date: Sun, 20 Jul 2003 21:08:58 -0500
To: bug-WWW-Mechanize [...] rt.cpan.org
From: Andy Lester <andy [...] petdance.com>
Subject: Re: [cpan #2955] [cpan#2943] Win32 tests v0.52 -- mech-forms.t
RT-Send-Cc:
This got fixed in 0.54. Andy -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance