bugGNU Octave - Bugs: bug #35038, Test fail in toplev.cc (MinGW)

 
 

bug #35038: Test fail in toplev.cc (MinGW)

Submitter:  Tatsuro MATSUOKA <tmacchant>
Submitted:  Mon 12 Dec 2011 04:03:51 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 13 Dec 2011 12:09:02 AM UTC, comment #5: 

Okay, I merged the change onto the stable branch in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/4228c102eca9)

Rik <rik5>
Group administrator
Mon 12 Dec 2011 10:21:39 PM UTC, comment #4: 

Rik, I think this change would have been OK for the stable branch.  Since there haven't been any changes to default since I merged default to stable, it would be OK with me to merge default to stable again to correct that instead of transplanting the change.

John W. Eaton <jwe>
Group administrator
Mon 12 Dec 2011 10:11:26 PM UTC, comment #3: 
Rik <rik5>
Group administrator
Mon 12 Dec 2011 09:42:46 PM UTC, comment #2: 


octave:2> cmd = ls_command ()
cmd = cmd /C dir /D
octave:3>  [status, output] = system (cmd)
Parameter format not correct - "D"".
status =  127


After

__ls_command__ = "cmd /C dir /D";


is replaced as


__ls_command__ = "dir /D";


The result is


octave:1>  cmd = ls_command ()
cmd = dir /D
octave:2>  [status, output] = system (cmd)
status = 0
output =  Volume in drive E has no label.
 Volume Serial Number is FB33-3F70

 Directory of e:\usr\Tatsu\mingwhome\octaves\OctBuild\hg-devel

[.]              config.log       [libgnu]         [src]
[..]             config.status    [liboctave]      stamp-h1
.gdbinit         [doc]            libtool          [test]
AUTHORS          [examples]       Makefile         test1.emf
BUGS             INSTALL.OCTAVE   run-octave
config.h         [libcruft]       [scripts]
              12 File(s)      4,918,900 bytes
              10 Dir(s)  185,211,019,264 bytes free



Test of dos.m has a error from the same origin.

Before _ls_command_ is modified


octave:1> test dos.m
Parameter format not correct - "D"".
Parameter format not correct - "D"".
  ***** test
 cmd = ls_command ();
 old_wstate = warning ("query");
 warning ("off", "Octave:undefined-return-values");
 unwind_protect
   [status, output] = dos (cmd);
 unwind_protect_cleanup
   warning (old_wstate);
 end_unwind_protect

 if (ispc () && ! isunix ())
   [status, output] = dos (cmd);
   assert (status, 0);
   assert (ischar (output));
   assert (! isempty (output));
 else
   assert (status, []);
   assert (output, []);
 endif
!!!!! test failed
assert (status,0) expected
0
but got
 127
values do not match


After _ls_command_ is modified


octave:3> test dos.m
PASSES 3 out of 3 tests


"Maybe the problem is that the actual command for MinGW should just be "dir /D"?" seems to be correct.

Thanks
 

Tatsuro MATSUOKA <tmacchant>
Mon 12 Dec 2011 05:20:20 AM UTC, comment #1: 

Could you try running these two lines at an ordinary interpreter prompt?


 cmd = ls_command ()
 [status, output] = system (cmd)


ls_command() is supposed to return a valid shell command even for MinGW.  In fact, looking at ls_command.m it should return


ls_command = "cmd /C dir /D";


Maybe the problem is that the actual command for MinGW should just be "dir /D"?

Rik <rik5>
Group administrator
Mon 12 Dec 2011 04:03:51 AM UTC, original submission:  

In the development source,

changeset 14022:de90542b7afc
date Fri Dec 09 11:17:13 2011 -0800

One test in toplev.cc is in FAIL.


>>>>> processing e:\usr\Tatsu\mingwhome\octaves\hg\octave-work\src\toplev.cc
  ***** test
 cmd = ls_command ();
 [status, output] = system (cmd);
 assert (status, 0);
 assert (ischar (output));
 assert (! isempty (output));
!!!!! test failed
assert (status,0) expected
0
but got
 127
values do not match


This might be windows specific.

Tatsuro MATSUOKA <tmacchant>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by tmacchant (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-12-12 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code