After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 666833 - Buggy testsuite: checks conversion of signed integer to unsigned char
Buggy testsuite: checks conversion of signed integer to unsigned char
Status: RESOLVED DUPLICATE of bug 659870
Product: glib
Classification: Platform
Component: gobject
2.30.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-12-25 15:18 UTC by Philipp Kern
Modified: 2017-11-17 12:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Philipp Kern 2011-12-25 15:18:29 UTC
The following line in the gobject testsuite (gobject/tests/param.c) is IMHO buggy:

  CHECK_INT_CONVERSION(G_TYPE_CHAR, char, -124)

You cannot assume that this works without specifying that char needs to be signed.  On architectures where C's standard char is unsigned (armel, s390, s390x, powerpc, avr32) this then fails:

TEST: param... (pid=17482)
**
ERROR:/build/buildd-glib2.0_2.30.2-4-s390x-0J7ZlY/glib2.0-2.30.2/./gobject/tests/param.c:148:test_value_transform:
assertion failed (g_value_get_char (&dest) == -124): (132 == -124)
  /value/transform:                                                    FAIL
GTester: last random seed: R02S186980d972380fe09bc2895cde5249ba
/bin/bash: line 1: 17430 Terminated              MALLOC_CHECK_=2
MALLOC_PERTURB_=$((${RANDOM:-256} % 256)) ../../glib/gtester --verbose boxed
enums param signals threadtests dynamictests binding properties reference
ifaceproperties valuearray
Comment 1 Philip Withnall 2017-11-17 12:10:59 UTC
This was fixed in bug #659870.

*** This bug has been marked as a duplicate of bug 659870 ***