bugGNU Octave - Bugs: bug #50235, return code is zero, even if there...

 
 

bug #50235: return code is zero, even if there was an error

Submitter:  Carnë Draug <carandraug>
Submitted:  Mon 06 Feb 2017 03:07:46 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Duplicate Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.2.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Thu 09 Feb 2017 12:26:20 AM UTC, comment #3: 

Yes, we probably should have tests for this kind of thing.  Can we do it reasonably within the existing test framework, or is this something we should do with a shell script?  Is a shell script sufficient?  I think it should be because we don't really need to worry about continuing after a test failure that causes a segfault, for exmaple.

John W. Eaton <jwe>
Group administrator
Mon 06 Feb 2017 10:49:29 AM UTC, comment #2: 

Ah! I missed that bug report because no one mentioned the return code. We should have test units for this stuff.

Carnë Draug <carandraug>
Group Member
Mon 06 Feb 2017 10:18:21 AM UTC, comment #1: 

This was reported and fixed in bug #49271.

Guillaume <gyom>
Mon 06 Feb 2017 03:07:46 AM UTC, original submission:  

If there is an error in an Octave program, the return code should be non-zero.  This was the behaviour in previous versions, but seems like this bug creped in version 4.2:


$ octave-3.8.2 --quiet --eval "error ('foo');" ; echo $?
error: foo
1
$ octave-4.0.1 --quiet --eval "error ('foo');" ; echo $?
error: foo
1
$ /usr/local/bin/octave-4.2.0 --quiet --eval "error ('foo');" ; echo $?
error: foo
error: unhandled execution exception -- eval failed
0


Carnë Draug <carandraug>
Group Member

 

Attached Files

This item currently has no attached files.

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

Attach Files:
   
   
Comment:
   

 

Dependencies

Digest:
   bug dependencies.

No items depend on this one.

 

Mail Notification Carbon-Copy List

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

    Votes

    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.

     

    History

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-06 carandraug StatusNone Duplicate
    2017-02-06 carandraug Open/ClosedOpen Closed
        Dependencies- Depends on bugs #49271

    Back to the top

    Powered by Savane 3.16-11ef.
    Corresponding source code