Bug 215327 - [GTK][WPE] regionDisplayName test failure with ICU 64
Summary: [GTK][WPE] regionDisplayName test failure with ICU 64
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-10 11:11 PDT by Lauro Moura
Modified: 2020-09-18 00:16 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lauro Moura 2020-08-10 11:11:03 PDT
On GTK and WPE JS Bots:

stress/intl-displaynames.js.default: Exception: Error: bad value: 419
stress/intl-displaynames.js.default: shouldBe@intl-displaynames.js:5:24
stress/intl-displaynames.js.default: global code@intl-displaynames.js:49:17
stress/intl-displaynames.js.default: ERROR: Unexpected exit code: 3
FAIL: stress/intl-displaynames.js.default

The test expects the region code to be translated to the region name also in the short style for ICU >= 64.

The flatpak SDK ships ICU 64.2 (from the Freedesktop SDK 19.08) and is returning only the code. The same applies to ICU built from source.

Using Ubuntu's 66.1 displays the correct behavior.


Sample JS script:
```
var regionNames = new Intl.DisplayNames(['en'], {type: 'region', style: 'short'});
var longRegionNames = new Intl.DisplayNames(['en'], {type: 'region'});

var regions = [
    '001', '002', '003', '019', '419',
]

regions.forEach(region => {
    debug('Region code: ' + region);
    debug('Short: ' + regionNames.of(region));
    debug('Long: ' + longRegionNames.of(region));
});
```
Comment 1 Philippe Normand 2020-08-12 02:21:44 PDT
FDO 20.08 should ship ICU 67.1. So when we upgrade the SDK these test should pass again.
Comment 2 Philippe Normand 2020-09-14 05:26:38 PDT
Since https://bugs.webkit.org/show_bug.cgi?id=216073 landed, JS tests pass now: https://build.webkit.org/builders/WPE%20Linux%2064-bit%20Release%20%28Tests%20JS%29/builds/1510

But test-262 fail:

FAIL test/built-ins/Array/length/define-own-prop-length-coercion-order.js (default)
Full Output:
Exception: Test262Error: Expected a TypeError to be thrown but no exception was thrown at all

FAIL test/built-ins/Array/length/define-own-prop-length-coercion-order.js (strict mode)
Full Output:
Exception: Test262Error: Expected a TypeError to be thrown but no exception was thrown at all

FAIL test/intl402/Intl/getCanonicalLocales/unicode-ext-canonicalize-yes-to-true.js (default)
Full Output:
Exception: Test262Error: Expected SameValue(«und-u-ka», «und-u-ka-yes») to be true

FAIL test/intl402/Intl/getCanonicalLocales/unicode-ext-canonicalize-yes-to-true.js (strict mode)
Full Output:
Exception: Test262Error: Expected SameValue(«und-u-ka», «und-u-ka-yes») to be true

FAIL test/intl402/Locale/prototype/minimize/removing-likely-subtags-first-adds-likely-subtags.js (default)
Full Output:
Exception: Test262Error: "und".minimize() should be "en" Expected SameValue(«und», «en») to be true

FAIL test/intl402/Locale/prototype/minimize/removing-likely-subtags-first-adds-likely-subtags.js (strict mode)
Full Output:
Exception: Test262Error: "und".minimize() should be "en" Expected SameValue(«und», «en») to be true
Comment 3 Philippe Normand 2020-09-14 10:15:54 PDT
I'm not sure if this is bugs in test262, spec bugs, or ICU bugs...
Comment 4 Michael Catanzaro 2020-09-14 11:02:39 PDT
Without looking, the intl ones are (probably) test262 bugs. ICU output changes regularly in both major and minor releases, so it's expected that tests have to be continuously adapted to be compatible with newer or older versions of ICU. Our EWS and buildbot coverage of different ICU versions is not very good, so newly-added tests, or modifications to existing tests, are likely to result in breakage with untested ICU versions.
Comment 5 Lauro Moura 2020-09-14 20:12:34 PDT
(In reply to Philippe Normand from comment #2)
<snip>

> But test-262 fail:
> 
> FAIL test/built-ins/Array/length/define-own-prop-length-coercion-order.js
> (default)
> Full Output:
> Exception: Test262Error: Expected a TypeError to be thrown but no exception
> was thrown at all
> 
> FAIL test/built-ins/Array/length/define-own-prop-length-coercion-order.js
> (strict mode)
> Full Output:
> Exception: Test262Error: Expected a TypeError to be thrown but no exception
> was thrown at all
> 

These are present since r266925 (update to test262)

> FAIL
> test/intl402/Intl/getCanonicalLocales/unicode-ext-canonicalize-yes-to-true.
> js (default)
> Full Output:
> Exception: Test262Error: Expected SameValue(«und-u-ka», «und-u-ka-yes») to
> be true
> 
> FAIL
> test/intl402/Intl/getCanonicalLocales/unicode-ext-canonicalize-yes-to-true.
> js (strict mode)
> Full Output:
> Exception: Test262Error: Expected SameValue(«und-u-ka», «und-u-ka-yes») to
> be true
> 

New failures since 0.3 update.

> FAIL
> test/intl402/Locale/prototype/minimize/removing-likely-subtags-first-adds-
> likely-subtags.js (default)
> Full Output:
> Exception: Test262Error: &#34;und&#34;.minimize() should be &#34;en&#34;
> Expected SameValue(«und», «en») to be true
> 
> FAIL
> test/intl402/Locale/prototype/minimize/removing-likely-subtags-first-adds-
> likely-subtags.js (strict mode)
> Full Output:
> Exception: Test262Error: &#34;und&#34;.minimize() should be &#34;en&#34;
> Expected SameValue(«und», «en») to be true

Also present since before the flatpak update but still ICU related. Even with ICU 67 (from git), minimizing "und" locales becomes a NOP (returning the same locale). Likely due to passing an invalid locale ID to IntlLocale::minimize() (language is passed empty istead of "und"). I'll open an bug about it.
Comment 6 Philippe Normand 2020-09-18 00:16:09 PDT
I think we can close this now because the original bug is fixed. The follow-ups are tracked in linked bugs.