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 683384 - /gvariant/checksum-basic failure on big endian machines
/gvariant/checksum-basic failure on big endian machines
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gvariant
2.33.x
Other Linux
: Normal normal
: ---
Assigned To: Allison Karlitskaya (desrt)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-09-05 07:37 UTC by Martin Pitt
Modified: 2012-09-06 13:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests/gvariant: Fix test on big endian architectures (924 bytes, patch)
2012-09-05 13:08 UTC, Colin Walters
committed Details | Review

Description Martin Pitt 2012-09-05 07:37:01 UTC
2.33.12 started to fail in the test suite on big-endian machines such as mips and powerpc:

mips/powerpc:
  /gvariant/checksum-basic:                                            FAIL

** GLib:ERROR:/build/buildd-glib2.0_2.33.12-1-mips-NBBCMR/glib2.0-2.33.12/./glib/tests/gvariant.c:4188:verify_gvariant_checksum: assertion failed (sha256 == checksum): ("e8a4b2ee7ede79a3afb332b5b6cc3d952a65fd8cffb897f5d18016577c33d7cc" == "ae3c8b8d99a39542f78af83dbbb42c81cd94199ec1b5f60a0801063e95842570")

Full build log at https://buildd.debian.org/status/fetch.php?pkg=glib2.0&arch=powerpc&ver=2.33.12-1&stamp=1346775318 if you want to look at it.
Comment 1 Martin Pitt 2012-09-05 09:10:05 UTC
Quite unsurprisingly this is due to

http://git.gnome.org/browse/glib/commit/?id=d54e10632a575963790d50661ae75692bb159b37

I didn't consider this at first as that commit's Date: is from March, but it was only actually committed a few days ago.

What I am not sure about is: Are the checksums supposed to be platform independent and stable across architectures? I. e. do we need to fix the test cases to check for bit-endian alternatives, or do we need to fix the checksumming in GVariant itself?
Comment 2 Colin Walters 2012-09-05 12:45:23 UTC
(In reply to comment #1)
> Quite unsurprisingly this is due to
> 
> http://git.gnome.org/browse/glib/commit/?id=d54e10632a575963790d50661ae75692bb159b37
> 
> I didn't consider this at first as that commit's Date: is from March, but it
> was only actually committed a few days ago.
> 
> What I am not sure about is: Are the checksums supposed to be platform
> independent and stable across architectures? I. e. do we need to fix the test
> cases to check for bit-endian alternatives,

We need to fix the test - I hadn't considered this.  I'll work on a patch.
Comment 3 Colin Walters 2012-09-05 13:08:33 UTC
Created attachment 223534 [details] [review]
tests/gvariant: Fix test on big endian architectures

We need to ensure we get the exact same byte-level GVariant, so
byteswap on big endian architectures.
Comment 4 Martin Pitt 2012-09-06 08:38:21 UTC
Thanks Colin! I confirm that this works on x86, x86_64, arm (all little endian) and PowerPC (big endian).
Comment 5 Matthias Clasen 2012-09-06 12:22:14 UTC
Review of attachment 223534 [details] [review]:

lets get it in, then
Comment 6 Colin Walters 2012-09-06 13:23:54 UTC
Attachment 223534 [details] pushed as e6df67a - tests/gvariant: Fix test on big endian architectures