Test suite failures on musl
Hi! I'm building glib 2.66.1 on the musl libc version of Void Linux. When attempting to run the test suite, I am getting multiple errors (mainly related to locale conversions, I believe). Attached is a patch that disabled all the asserts necessary for the test suite to "pass". I don't believe these are regressions, but rather incompatibilities that have always been there.
At least for some of the gdatetime.c
failures, I believe they might be caused by using potentially non public fields of struct tm
, tm_gmtoff
and __tm_gmtoff
. As for the g_date_time_get_*
ones, I'm unsure what's causing them.
fix_gio_test.patch
An example failure in line 2248 of gdatetime.c
is:
GLib:ERROR:../glib/tests/gdatetime.c:2248:test_strftime: assertion failed (c_str == dt_str): ("aWed AWednesday bDec BDecember cWed Dec 31 21:00:00 1969 C19 d31 e31 F1969-12-31 g70 G1970 hDec H21 I09 j365 m12 M00 n\n pPM r09:00:00 PM R21:00 S00 t\t T21:00:00 u3 V01 w3 x12/31/69 X21:00:00 y69 Y1969 z-0300 Z-03 %" == "aThu AThursday bJan BJanuary cThu Jan 1 00:00:00 1970 C19 d01 e 1 F1970-01-01 g70 G1970 hJan H00 I12 j001 m01 M00 n\n pAM r12:00:00 AM R00:00 S00 t\t T00:00:00 u4 V01 w4 x01/01/70 X00:00:00 y70 Y1970 z+0000 ZUTC %")
For line 1760:
GLib:ERROR:../glib/tests/gdatetime.c:1760:test_modifiers: assertion failed (p == ("\333\262\333\263")): ("23" == "\333\262\333\263")
Other relevant patches for musl can be found in:
- https://code.foxkit.us/adelie/packages/-/blob/2b0e79727fefc4f22e1ea43f3c8c6981b17c8926/user/glib/0001-gquark-fix-initialization-with-c-constructors.patch
- https://github.com/void-linux/void-packages/commit/11bb8361a3be3fed1b639612786d1ec2e9810fa2
These aren't related to the testsuite itself, and I can open separate issues/PRs for them.