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

ASSIGNED
Assigned to

Status

()

ASSIGNED
11 years ago
a year ago

People

(Reporter: glandium, Assigned: smontagu)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

11 years ago
../../_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
(Assignee)

Comment 1

11 years ago
So I assume bug 364285 itself is not fixed on non-UTF-8 Linux locales?
(Reporter)

Comment 2

11 years ago
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)

Comment 3

11 years ago
Created attachment 327386 [details] [diff] [review]
Disable the test on non-UTF-8 Linux
Assignee: nobody → smontagu
Status: NEW → ASSIGNED
Attachment #327386 - Flags: review?(benjamin)

Comment 4

10 years ago
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?

Comment 6

10 years ago
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.
You need to log in before you can comment on or make changes to this bug.