bugGNU Octave - Bugs: bug #54955, 'test savefig' assumes it can...

 
 

bug #54955: 'test savefig' assumes it can write to current directory, leaves file behind

Submitter:  Mike Miller <mtmiller>
Submitted:  Sun 04 Nov 2018 06:25:57 PM UTC
   
 
Category:  Test Suite Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 05 Nov 2018 08:12:39 AM UTC, comment #2: 

Works for me, thank you.

Mike Miller <mtmiller>
Group Member
Sun 04 Nov 2018 10:26:15 PM UTC, comment #1: 

Yeah, simple oversight.  I changed the %!warning tests to use a filename in a temporary directory.  See https://hg.savannah.gnu.org/hgweb/octave/rev/8eb4b42771ff.  Marking as Ready for Test.

Rik <rik5>
Group administrator
Sun 04 Nov 2018 06:25:57 PM UTC, original submission:  

The unit tests in savefig.m have a couple of problems.

The first is that the test fails if pwd is an unwriteable directory. If the test needs to write files, it should write them to a newly created temporary directory.

Relatedly, if the current directory is writeable, the test leaves behind a file 'myfig.fig' in the current directory when the test finishes and even after Octave exits.

A temporary directory should be used to write files and be cleaned up properly.

Mike Miller <mtmiller>
Group Member

 

(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)
  •  

    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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-11-05 mtmiller StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2018-11-04 rik5 StatusNone Ready For Test
    2018-11-04 mtmiller Carbon-CopyRemoved 80942 -

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code