Skip Menu |

This queue is for tickets about the IPC-Run CPAN distribution.

Report information
The Basics
Id: 42354
Status: resolved
Priority: 0/
Queue: IPC-Run

People
Owner: Nobody in particular
Requestors: james.lick [...] jameslick.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.82
Fixed in: 0.83



Subject: Windows shell hardcoded to obsoleted 'command.com' (t/run test 19 fails on XP x64)
t/run test 19 fails on XP x64 complaining that it can't find 'command'. This is because the Windows shell has changed from command.com to cmd.exe. In earlier versions of XP 32-bit both were available, but in the 64-bit version command.com has been removed. This probably also applies to later versions of the OS. I haven't found authoritative documentation on which versions of Windows no longer have command.com. The problem occurs due to this code (in 0.82 at line 1653 of lib/Run.pm): if ( Win32_MODE ) { @args = ( [ qw( command /c ), win32_parse_cmd_line $_[0] ] ); } If this is changed to: if ( Win32_MODE ) { @args = ( [ qw( cmd /c ), win32_parse_cmd_line $_[0] ] ); } Then the test will pass. However, this is not an acceptable patch because it would break older OS which do not have cmd.exe. The OS version needs to be checked before deciding whether to use command.com or cmd.exe. With this change, all tests pass. Without this change: C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/adopt............skipped all skipped: adopt not implemented yet t/binmode..........ok t/bogus............ok 1/2 skipped: Can't really exec() MSWin32 t/filter...........ok t/harness..........ok t/io...............ok 9/14 skipped: MSWin32 does not allow select() on non-sockets t/kill_kill........skipped all skipped: Temporarily ignoring test failure on Win32 t/parallel.........ok t/pty..............skipped all skipped: IO::Pty not installed t/pump.............ok t/run..............ok 1/266Command 'command' not found in C:\Perl\site\bin, C:\P erl\bin, C:\Perl64\site\bin, C:\Perl64\bin, C:\WINDOWS\system32, C:\WINDOWS, C:\ WINDOWS\System32\Wbem at t/run.t line 38 # Looks like you planned 266 tests but only ran 19. # Looks like your test died just after 19. t/run..............dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 20-266 Failed 247/266 tests, 7.14% okay t/signal...........skipped all skipped: Skipping on Win32 t/timeout..........ok t/timer............ok t/win32_compile....ok Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/run.t 255 65280 266 494 185.71% 20-266 4 tests and 10 subtests skipped. Failed 1/15 test scripts, 93.33% okay. 247/637 subtests failed, 61.22% okay. dmake: Error code 255, while making 'test_dynamic'
Some additional information gleaned from some investigation: command.com is the only shell on Win9X based systems (95/98/ME). cmd.exe is available on all WinNT based systems (NT/2K/XP/2K3/Vista/2K8). command.com is also available on 32-bit WinNT based systems. (Unconfirmed claims it was removed in 32-bit XP SP2 and later.) command.com is a 16-bit application and is incapable of running and therefore not included in 64-bit WinNT based systems. XP x64 confirmed, probably applies to x64 versions of 2K3, Vista, 2K8. Proposed solution: On Win9X systems use command.com. On WinNT systems use cmd.exe.
From: james.lick [...] jameslick.com
Proposed fix: Tested on XP x64. Needs testing on other platforms. if ( Win32_MODE ) { if( ((Win32::GetOSVersion())[4]) > 1 ) { @args = ( [ qw( cmd /c ), win32_parse_cmd_line $_[0] ] ); } else { @args = ( [ qw( command /c ), win32_parse_cmd_line $_[0] ] ); } }
This is fixed since 0.83 according to the Changelog. -- Olivier Mengué - http://search.cpan.org/~dolmen/ http://github.com/dolmen/