GNOME Bugzilla – Bug 698014
evolution-data-server-3.8.1: /libebook/test-query/sexp/eqphone/gb test aborted
Last modified: 2013-04-17 18:47:22 UTC
We get the following error while running tests: /libebook/test-query/sexp/endswith: OK /libebook/test-query/sexp/eqphone/us: OK /libebook/test-query/sexp/eqphone/gb: ** ERROR:test-query.c:44:test_query: assertion failed (test->sexp == sexp): ("(or (eqphone \"phone\" \"+1-2215423789\" \"en_GB.UTF-8\") (eqphone_national \"phone\" \"2215423789\" \"en_GB.UTF-8\") (eqphone_short \"phone\" \"5423789\" \"en_GB.UTF-8\") )" == "(or (eqphone \"phone\" \"+1-2215423789\" \"en_ US.UTF-8\") (eqphone_national \"phone\" \"2215423789\" \"en_US.UTF-8\") (eqphone_short \"phone\" \"5423789\" \"en_US.UTF-8\") )") /bin/sh: línea 5: 16945 Abortado ${dir}$tst FAIL: test-query
Created attachment 241517 [details] build.log.xz
I get that failure too. The E-D-S code is correct, afaict, but the second setlocale(LC_ADDRESS, ...) call doesn't seem to take.
Are locales are working properly on your system? #include <stdio.h> #include <locale.h> int main() { printf("%s\n", setlocale(LC_ALL, NULL)); printf("%s\n", setlocale(LC_ALL, "")); printf("%s\n", setlocale(LC_ALL, NULL)); printf("%s\n", setlocale(LC_ALL, "en_US.UTF-8")); printf("%s\n", setlocale(LC_ALL, NULL)); printf("%s\n", setlocale(LC_ALL, "en_GB.UTF-8")); printf("%s\n", setlocale(LC_ALL, NULL)); return 0; } /* $ make sl cc sl.c -o sl $ ./sl C de_DE.UTF-8 de_DE.UTF-8 en_US.UTF-8 en_US.UTF-8 en_GB.UTF-8 en_GB.UTF-8 */
That program works, this program crashes: #include <stdio.h> #include <locale.h> int main() { printf("%s\n", setlocale(LC_ADDRESS, NULL)); printf("%s\n", setlocale(LC_ADDRESS, "")); printf("%s\n", setlocale(LC_ADDRESS, NULL)); printf("%s\n", setlocale(LC_ADDRESS, "en_US.UTF-8")); printf("%s\n", setlocale(LC_ADDRESS, NULL)); printf("%s\n", setlocale(LC_ADDRESS, "en_GB.UTF-8")); printf("%s\n", setlocale(LC_ADDRESS, NULL)); return 0; } (gdb) run C en_US.UTF-8 en_US.UTF-8 en_US.UTF-8 en_US.UTF-8 Program received signal SIGSEGV, Segmentation fault. __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:31 31 ../sysdeps/x86_64/multiarch/../strlen.S: No such file or directory. (gdb) backtrace
+ Trace 231797
That's consistent with the test-query program, since it's only setting LC_ADDRESS, not LC_ALL. Should the test just use LC_ALL?
The crash above is actually just from setlocale(LC_ADDRESS, "en_GB.UTF-8") returning NULL. Also relevant: bug 660624 LC_ADDRESS is non-standard and apparently not defined on OpenBSD. I think EVO_PHONENUMBER_SUPPORT should test for LC_ADDRESS as well. CC'ing Antoine since we could use some cross-platform testing help here.
(In reply to comment #5) > The crash above is actually just from setlocale(LC_ADDRESS, "en_GB.UTF-8") > returning NULL. > > Also relevant: bug 660624 > > LC_ADDRESS is non-standard and apparently not defined on OpenBSD. This is correct. > I think EVO_PHONENUMBER_SUPPORT should test for LC_ADDRESS as well. > > CC'ing Antoine since we could use some cross-platform testing help here. Well, I actually have 4 patches where I "if 0" all calls to setlocale (LC_ADDRESS,...). Sorry I haven't had time to properly make something commitable yet, that's why you haven't heard from me on this yet. They all have a "XXX fix and push upstream" comment though ;-) This is the list of locale definitions that we do _not_ provide: LC_PAPER, LC_NAME, LC_ADDRESS, LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION So I think e-d-s shoud indeed test for LC_ADDRESS.
I fixed all the unconditional LC_ADDRESS usage, and also made the relevant test cases fail gracefully if setlocale() fails. Fixed for E-D-S 3.9.1 and 3.8.2 in: https://git.gnome.org/browse/evolution-data-server/commit/?id=6a440ebb07a846ba40920c746bfb846992d6133a https://git.gnome.org/browse/evolution-data-server/commit/?h=gnome-3-8&id=0076314596c1c0315884a181b9ae9daa21d38840
Matthew, that's great. I can confirm e-d-s builds fine on OpenBSD with these patches and I'll merge them into our package until 3.8.2 comes out. Thank you!
Good! I wrote the patches on OpenBSD. :)