Re: [Python-Dev] [Python-checkins] cpython (3.2): Skip test_getsetlocale_issue1813() on Fedora due to setlocale() bug.
On Tue, 02 Aug 2011 01:22:03 +0200, stefan.krah <python-checkins@python.org> wrote:
http://hg.python.org/cpython/rev/68b5f87566fb changeset: 71683:68b5f87566fb branch: 3.2 parent: 71679:1f9ca1819d7c user: Stefan Krah <skrah@bytereef.org> date: Tue Aug 02 01:06:16 2011 +0200 summary: Skip test_getsetlocale_issue1813() on Fedora due to setlocale() bug. See: https://bugzilla.redhat.com/show_bug.cgi?id=726536
files: Lib/test/test_locale.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py --- a/Lib/test/test_locale.py +++ b/Lib/test/test_locale.py @@ -1,4 +1,5 @@ from test.support import run_unittest, verbose +from platform import linux_distribution import unittest import locale import sys @@ -391,6 +392,8 @@ # crasher from bug #7419 self.assertRaises(locale.Error, locale.setlocale, 12345)
+ @unittest.skipIf(linux_distribution()[0] == 'Fedora', "Fedora setlocale() " + "bug: https://bugzilla.redhat.com/show_bug.cgi?id=726536") def test_getsetlocale_issue1813(self): # Issue #1813: setting and getting the locale under a Turkish locale oldlocale = locale.setlocale(locale.LC_CTYPE)
Why 'Fedora'? This bug affects more than just Fedora: as I reported on the issue, I'm seeing it on Gentoo as well. (Also, including the issue number in the commit message is helpful). Note that since the bug report says that "Gentoo has been including this fix for two years", the fact that it is failing on my Gentoo system would seem to indicate that something about the fix is not right. So, I'm not sure this skip is even valid. I'm not sure we've finished diagnosing the bug. If there are any helpful tests I can run on Gentoo, please let me know. -- R. David Murray http://www.bitdance.com
On 2 Aug, 2011, at 4:22, R. David Murray wrote:
On Tue, 02 Aug 2011 01:22:03 +0200, stefan.krah <python-checkins@python.org> wrote:
http://hg.python.org/cpython/rev/68b5f87566fb changeset: 71683:68b5f87566fb branch: 3.2 parent: 71679:1f9ca1819d7c user: Stefan Krah <skrah@bytereef.org> date: Tue Aug 02 01:06:16 2011 +0200 summary: Skip test_getsetlocale_issue1813() on Fedora due to setlocale() bug. See: https://bugzilla.redhat.com/show_bug.cgi?id=726536
files: Lib/test/test_locale.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py --- a/Lib/test/test_locale.py +++ b/Lib/test/test_locale.py @@ -1,4 +1,5 @@ from test.support import run_unittest, verbose +from platform import linux_distribution import unittest import locale import sys @@ -391,6 +392,8 @@ # crasher from bug #7419 self.assertRaises(locale.Error, locale.setlocale, 12345)
+ @unittest.skipIf(linux_distribution()[0] == 'Fedora', "Fedora setlocale() " + "bug: https://bugzilla.redhat.com/show_bug.cgi?id=726536") def test_getsetlocale_issue1813(self): # Issue #1813: setting and getting the locale under a Turkish locale oldlocale = locale.setlocale(locale.LC_CTYPE)
Why 'Fedora'? This bug affects more than just Fedora: as I reported on the issue, I'm seeing it on Gentoo as well. (Also, including the issue number in the commit message is helpful).
Note that since the bug report says that "Gentoo has been including this fix for two years", the fact that it is failing on my Gentoo system would seem to indicate that something about the fix is not right.
So, I'm not sure this skip is even valid. I'm not sure we've finished diagnosing the bug.
If there are any helpful tests I can run on Gentoo, please let me know.
Wouldn't it be better to mark this as an expected failure on the affected platforms? Skipping the test unconditionally will skip the test even when Fedora gets around to fixing this issue. Ronald
-- R. David Murray http://www.bitdance.com _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/ronaldoussoren%40mac.com
R. David Murray <rdmurray@bitdance.com> wrote:
On Tue, 02 Aug 2011 01:22:03 +0200, stefan.krah <python-checkins@python.org> wrote:
Skip test_getsetlocale_issue1813() on Fedora due to setlocale() bug. See: https://bugzilla.redhat.com/show_bug.cgi?id=726536 + @unittest.skipIf(linux_distribution()[0] == 'Fedora', "Fedora setlocale() " + "bug: https://bugzilla.redhat.com/show_bug.cgi?id=726536")
Why 'Fedora'? This bug affects more than just Fedora: as I reported on the issue, I'm seeing it on Gentoo as well. (Also, including the issue number in the commit message is helpful).
Note that since the bug report says that "Gentoo has been including this fix for two years", the fact that it is failing on my Gentoo system would seem to indicate that something about the fix is not right.
So, I'm not sure this skip is even valid. I'm not sure we've finished diagnosing the bug.
Fedora's glibc has an additional issue with the Turkish 'I' that can be reproduced by the simple C program in: https://bugzilla.redhat.com/show_bug.cgi?id=726536 I disabled the test specifically on Fedora because it a) seems to be the only Linux buildbot where this test fails and b) this does not seem like a Python issue to me. Since you say that the fix for issue #1813 might not be right, do you think that the fix should work around this glibc issue?
If there are any helpful tests I can run on Gentoo, please let me know.
Yes, you could run the small test program. If you get the same results as on Fedora, then I wonder why the Gentoo buildbots are green. Do they have tr_TR and tr_TR.iso88599 installed? Stefan Krah
Stefan Krah <stefan@bytereef.org> wrote:
Fedora's glibc has an additional issue with the Turkish 'I' that can be reproduced by the simple C program in:
OK, this runs successfully on Ubuntu Lucid and FreeBSD (if you change the first tr_TR to tr_TR.UTF-8). But it fails on Debian lenny, as does test_getsetlocale_issue1813(). I suspect many buildbots are green because they don't have tr_TR and tr_TR.iso8859-9 installed. Synopsis for the people who don't want to wade through the bug reports: If this is a valid C program ... #include <stdio.h> #include <locale.h> int main(void) { char *s; printf("%s\n", setlocale(LC_CTYPE, "tr_TR")); printf("%s\n", setlocale(LC_CTYPE, NULL)); s = setlocale(LC_CTYPE, "tr_TR.ISO8859-9"); printf("%s\n", s ? s : "null"); return 0; } ..., several systems (Fedora 14, Debian lenny) have a glibc bug that is exposed by test_getsetlocale_issue1813(). People usually don't see this because tr_TR and tr_TR.iso8859-9 aren't installed. Stefan Krah
On Tue, 02 Aug 2011 12:12:37 +0200, Stefan Krah <stefan@bytereef.org> wrote:
Stefan Krah <stefan@bytereef.org> wrote:
Fedora's glibc has an additional issue with the Turkish 'I' that can be reproduced by the simple C program in:
OK, this runs successfully on Ubuntu Lucid and FreeBSD (if you change the first tr_TR to tr_TR.UTF-8).
But it fails on Debian lenny, as does test_getsetlocale_issue1813().
I suspect many buildbots are green because they don't have tr_TR and tr_TR.iso8859-9 installed.
This is true for my Gentoo buildbots. Once we've figured out the best way to handle this, I'll fix that (install the other locales) for my two.
Synopsis for the people who don't want to wade through the bug reports:
If this is a valid C program ...
#include <stdio.h> #include <locale.h> int main(void) { char *s; printf("%s\n", setlocale(LC_CTYPE, "tr_TR")); printf("%s\n", setlocale(LC_CTYPE, NULL)); s = setlocale(LC_CTYPE, "tr_TR.ISO8859-9"); printf("%s\n", s ? s : "null"); return 0; }
..., several systems (Fedora 14, Debian lenny) have a glibc bug that is exposed by test_getsetlocale_issue1813(). People usually don't see this because tr_TR and tr_TR.iso8859-9 aren't installed.
I get null as the final output of that regardless of whether I use 'tr_TR' or 'tr_TR.utf8'. This is with glibc-2.13-r2 (the r2 is Gentoo's mod number). I'll attach this to the bug report, too, perhaps the discussion should move there. -- R. David Murray http://www.bitdance.com
On 8/2/2011 4:48 AM, Stefan Krah wrote:
R. David Murray <rdmurray@bitdance.com> wrote:
If there are any helpful tests I can run on Gentoo, please let me know.
Yes, you could run the small test program. If you get the same results as on Fedora, then I wonder why the Gentoo buildbots are green.
Do they have tr_TR and tr_TR.iso88599 installed?
Highly doubtful. It is a normal part of the Gentoo install process to select the locales that you want for the system. Even the example list of locales doesn't include any Turkish locales, so one would've had to gone to specific effort to add that one. -- Scott Dial scott@scottdial.com
participants (4)
-
R. David Murray -
Ronald Oussoren -
Scott Dial -
Stefan Krah