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

 
 

bug #29527: make check finds 12 unexpected failures

Submitted by:  None
Submitted on:  Mon 12 Apr 2010 03:52:44 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Søren Hauberg <hauberg>
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: 3.3.51
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission 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>
Project 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>In charge of this item.
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>
Project 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>In charge of this item.
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>
Project 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>
Project 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 File(s):
   
   
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
  • -unavailable- added by hauberg (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by dbateman (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 04 Jul 2010 09:03:48 PM UTCdbatemanCategoryNone=>Interpreter
      Item GroupNone=>Incorrect Result
      StatusConfirmed=>Fixed
      Assigned toNone=>hauberg
      Open/ClosedOpen=>Closed
    Thu 29 Apr 2010 07:01:50 PM UTChaubergAttached File-=>Added restore_locale.diff, #20375
    Tue 13 Apr 2010 10:14:34 PM UTCdbatemanStatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1