bugGNU Octave - Bugs: bug #29527, make check finds 12 unexpected...

 
 

bug #29527: make check finds 12 unexpected failures

Submitter:  None
Submitted:  Mon 12 Apr 2010 03:52:44 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  hauberg
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.3.51
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 04 Jul 2010 09:03:48 PM UTC, comment #6: 

I'm closing this bug as Soren's patch was applied in the changeset

http://hg.savannah.gnu.org/hgweb/octave/rev/d27bd2f74137

D.

David Bateman <dbateman>
Group Member
Thu 29 Apr 2010 07:01:50 PM UTC, comment #5: 

I am not in a position to generate a proper changeset, but the attached diff solves the problem for me. If it is okay, could somebody apply it for me?

(file #20375)

Søren Hauberg <hauberg>
Thu 29 Apr 2010 06:17:09 PM UTC, comment #4: 

Well, we need the save/restore anyway if we want to work around the GraphicsMagick problem, so I'd be grateful to have a patch for that.

But if we allow users to have any locale setting, won't these tests continue to fail since the tests are not localized?  How do we cope with that?

Should we write Octave functions that allow the locale to be set so we can set it to "C" when running tests that might be affected by the locale setting?

I guess a quicker fix would be to set LANG to "C" in the test/Makefile when running the tests.  But then a change like this will probably need to be undone when Octave does support locales better and we want some locale-specific tests.

John W. Eaton <jwe>
Group administrator
Thu 29 Apr 2010 05:56:40 PM UTC, comment #3: 

Do we really need to set the locale to "C" when Octave starts (not that I mind) ? I think it would be just fine to save and restore the locale around the GraphicsMagick::init call.

Søren Hauberg <hauberg>
Thu 29 Apr 2010 05:40:05 PM UTC, comment #2: 

Given that Octave doesn't really do anything smart about localization now, should we just have Octave set the locale to "C" when it starts?  And then, of course, as a workaround, we need to avoid the GraphicsMagick init problem by saving and restoring the locale around the call to GraphicsMagick::init.

Or is there something else that would be better?

John W. Eaton <jwe>
Group administrator
Tue 13 Apr 2010 10:14:34 PM UTC, comment #1: 

I presume this is a someone putting this

http://n4.nabble.com/Localisation-in-datestr-and-datevec-td1666433.html

discussion in the bug tracker. The reason for the problem iss resolved and is the fault of GraphicsMagick, but no solution has yet to be applied.

The only solution I see that would make sense is a configuration test that detects the bug in GraphicsMagick and then resets the locale after the initialization of GraphicsMagick. GraphicsMagick's developers have been made aware of the problem and might fix it one day

David Bateman <dbateman>
Group Member
Mon 12 Apr 2010 03:52:44 PM UTC, original submission:  

TEST of
datestr and datevec  fails  because of not considering LOCALE

I have
LANG=de_AT.utf8
and the test uses some other value of  LANG 

that cause a problem with:
!!!!! test failed
assert (datestr (testtime, 0),"18-Dec-2005 02:33:17") expected
18-Dec-2005 02:33:17
but got
18-Dez-2005 02:33:17
shared variables {
  testtime =

       2005.0000     12.0000     18.0000      2.0000     33.0000     17.3822

}
several other tests fails for the same reason.
datevec has the same problem

This error(s)  occur ONLY when 
make check

 When testing in
 run-octave
 test datevec
 PASSES 11 out of 11 tests
 octave:2> test datestr
 PASSES 34 out of 34 tests

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #20375:  restore_locale.diff added by hauberg (991B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hauberg (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by dbateman (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-07-04 dbateman CategoryNone Interpreter
        Item GroupNone Incorrect Result
        StatusConfirmed Fixed
        Assigned toNone hauberg
        Open/ClosedOpen Closed
    2010-04-29 hauberg Attached File- Added restore_locale.diff, #20375
    2010-04-13 dbateman StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code