bugGNU Octave - Bugs: bug #37518, test always dumps shared variables...

 
 

bug #37518: test always dumps shared variables on failure

Submitter:  None
Submitted:  Sun 07 Oct 2012 01:21:35 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Florian Hars Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.6.2
Release:  Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 12 Oct 2012 04:01:43 AM UTC, comment #2: 

%!test is behaving as it should.  The shared variables are part of the system state and need to be displayed in order to allow debugging.  For example, testing functions with random inputs is a good methodology, but it wouldn't work if a function failed and you couldn't determine what the problem input was.  This common case is outlined below.


%!shared testdat
%! testdat = rand (100,100);
%!
%!assert (some_function (testdat), some_other_func (testdat));


Rik <rik5>
Group administrator
Sun 07 Oct 2012 06:07:57 PM UTC, comment #1: 

I don't understand... what should it do instead?

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Sun 07 Oct 2012 01:21:35 PM UTC, original submission:  

If a test fails, test.m always dumps all shared variables, which makes it mostly useless for testing user written code because the test results get swamped out by usesles administrative gunk and irrelevant static test data.


%!shared a
%! a = ones(100000,1);

%!test
%! assert(false)


Anonymous

 

(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 rik5 (Posted a comment)
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by None (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-10-12 rik5 StatusNeed Info Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2012-10-07 jordigh StatusNone Need Info

    Back to the top

    Powered by Savane 3.15-e6e5.
    Corresponding source code