Bug#906022: gjs: tests fail on s390x, ppc64: gi_marshalling_tests_ghashtable_int_none_in: assertion failed (GPOINTER_TO_INT (g_hash_table_lookup (hash_table, GINT_TO_POINTER (-1))) == 1): (0 == 1)
Simon McVittie
smcv at debian.org
Mon Aug 13 11:34:58 BST 2018
Source: gjs
Version: 1.52.3-2
Severity: important
Tags: upstream help
User: debian-s390 at lists.debian.org
Usertags: s390x
User: debian-powerpc at lists.debian.org
Usertags: ppc64
On ppc64 and s390x, a build-time unit test fails:
> Gjs:ERROR:installed-tests/gimarshallingtests.c:3092:gi_marshalling_tests_ghashtable_int_none_in: assertion failed (GPOINTER_TO_INT (g_hash_table_lookup (hash_table, GINT_TO_POINTER (-1))) == 1): (0 == 1)
This might be correlated with those being the two big-endian 64-bit
platforms where gjs builds; we previously had test failures on sparc64
too, but build-dependencies are not currently installable there.
The test is in installed-tests/js/testGIMarshalling.js:
const INT_DICT = {
'-1': 1,
0: 0,
1: -1,
2: -2,
};
...
it('can be passed in with integer value type', function () {
expect(() => GIMarshallingTests.ghashtable_int_none_in(INT_DICT))
.not.toThrow();
});
calling into this C function provided by src:gobject-introspection:
/**
* gi_marshalling_tests_ghashtable_int_none_in:
* @hash_table: (element-type gint gint) (transfer none):
*/
void
gi_marshalling_tests_ghashtable_int_none_in (GHashTable *hash_table)
{
g_assert_cmpint (GPOINTER_TO_INT (g_hash_table_lookup (hash_table, GINT_TO_POINTER (-1))), ==, 1);
g_assert_cmpint (GPOINTER_TO_INT (g_hash_table_lookup (hash_table, GINT_TO_POINTER (0))), ==, 0);
g_assert_cmpint (GPOINTER_TO_INT (g_hash_table_lookup (hash_table, GINT_TO_POINTER (1))), ==, -1);
g_assert_cmpint (GPOINTER_TO_INT (g_hash_table_lookup (hash_table, GINT_TO_POINTER (2))), ==, -2);
}
Now that mozjs52 works on s390x and ppc64, I think this might genuinely
be a bug in gjs or gobject-introspection.
Regards,
smcv
More information about the pkg-gnome-maintainers
mailing list