Bug 158066

Summary: REGRESSION(r201066): [GTK] Several intl tests started to fail in GTK+ bot after r201066
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: fpizlo, keith_miller, ossy
Priority: P2 Keywords: Gtk, LayoutTestFailure
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=154530
Bug Depends on:    
Bug Blocks: 157755    
Attachments:
Description Flags
Patch for landing none

Description Carlos Garcia Campos 2016-05-25 05:23:46 PDT
This is because since r201066 JSC also uses the preferred language from the system locale instead of falling back to "en" and those tests expect the locale to be en_US. run-javascriptcore-tests does $ENV{LANG}="en_US.UTF-8"; but we are not actually honoring the environment variables at all when using jsc binary. We are using setlocale with a nullptr locale to get the current one, but the current one is always "C", because to set the locale according to the environment variables we need to call setlocale with an empty string as locale. That's done by gtk_init(), which is called by all our binaries (web process, network process, etc.), but not by jsc (because jsc doesn't depend on GTK+). The reason why it has always worked for EFL is because they call ecore_init() in jsc that calls setlocale.
Comment 1 Carlos Garcia Campos 2016-05-25 05:26:30 PDT
Created attachment 279759 [details]
Patch for landing
Comment 2 Csaba Osztrogonác 2016-05-25 05:48:01 PDT
r201066 made the following tests fail on JSCOnly ARM bots:
	mozilla-tests.yaml/ecma_3/Date/15.9.5.6.js.mozilla
	mozilla-tests.yaml/ecma_3/Date/15.9.5.6.js.mozilla-baseline
	mozilla-tests.yaml/ecma_3/Date/15.9.5.6.js.mozilla-dfg-eager-no-cjit-validate-phases
	mozilla-tests.yaml/ecma_3/Date/15.9.5.6.js.mozilla-llint

but fixed these tests:
	jsc-layout-tests.yaml/js/script-tests/number-toLocaleString.js.layout
	jsc-layout-tests.yaml/js/script-tests/number-toLocaleString.js.layout-dfg-eager-no-cjit
	jsc-layout-tests.yaml/js/script-tests/number-toLocaleString.js.layout-no-cjit
	jsc-layout-tests.yaml/js/script-tests/number-toLocaleString.js.layout-no-llint
Comment 3 Carlos Garcia Campos 2016-05-25 08:22:40 PDT
Committed r201383: <http://trac.webkit.org/changeset/201383>