Closed Bug 442627 Opened 16 years ago Closed 2 years ago

xpcom/tests/unit/test_bug364285-1.js fails when locale charset is not UTF-8

Categories

(Core :: XPCOM, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: glandium, Unassigned)

Details

Attachments

(1 file)

../../_tests/xpcshell-simple/xpcom/unit/test_bug364285-1.js: FAIL
../../_tests/xpcshell-simple/xpcom/unit/test_bug364285-1.js.log:
>>>>>>>
*** test pending
*** exiting
*** CHECK FAILED:  CAA:89 ==  CAA:89
JS frame :: ../../tools/test-harness/xpcshell-simple/head.js :: do_throw ::
line 99
JS frame :: ../../tools/test-harness/xpcshell-simple/head.js :: do_check_eq ::
line 114
JS frame :: ../../_tests/xpcshell-simple/xpcom/unit/test_bug364285-1.js ::
create_file :: line 33
JS frame :: ../../_tests/xpcshell-simple/xpcom/unit/test_bug364285-1.js ::
test_create :: line 40
JS frame :: ../../_tests/xpcshell-simple/xpcom/unit/test_bug364285-1.js ::
run_test :: line 49
JS frame :: ../../tools/test-harness/xpcshell-simple/tail.js :: _execute_test
:: line 41
JS frame :: ../../tools/test-harness/xpcshell-simple/execute_test.js ::
<TOP_LEVEL> :: line 38
2147500036
*** FAIL ***

<<<<<<<

It would probably go a little further with ru_RU.KOI8-R, but would then stop on the japanese text that can't be expressed in KOI8-R. (Or maybe it would stop even earlier because of the french ç)

Anyways, the test only passes when the locale charset is UTF-8.

FWIW, I spotted this because by build chroots don't set a particular locale, therefore using POSIX as locale.
Component: General → XPCOM
Product: Testing → Core
QA Contact: general → xpcom
Version: unspecified → Trunk
So I assume bug 364285 itself is not fixed on non-UTF-8 Linux locales?
Actually the problem is different than that of bug 364285. Here, the problem is that the filenames are UTF16 that can't be transcribed in "native" charset, where "native" charset is the one from the system locale, in some cases (depending on the system locale). The -n files are correctly named. The problem is that the test assumes the filenames can be converted in native charset losslessly.
Assignee: nobody → smontagu
Status: NEW → ASSIGNED
Attachment #327386 - Flags: review?(benjamin)
Comment on attachment 327386 [details] [diff] [review]
Disable the test on non-UTF-8 Linux

I don't think we want this. We assume that any modern Linux is going to have their system locale in UTF8... we should check this assumption at startup and do something sane (abort?) if it's not, but we shouldn't cripple our unit tests like this.
Attachment #327386 - Flags: review?(benjamin) → review-
What about other unices?
FWIW, I am trying to build firefox3 on Irix, and I know that Irix is failing this test because it doesn't support UTF-8 locales.

The bug assignee didn't login in Bugzilla in the last 7 months.
:nika, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: smontagu → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(nika)

I don't think things have changed here in the last 14 years. If we still have problems we should open a new bug.

Status: NEW → RESOLVED
Closed: 2 years ago
Flags: needinfo?(nika)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: