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 650483 - Test failure on several architectures
Test failure on several architectures
Status: RESOLVED FIXED
Product: json-glib
Classification: Core
Component: Core
0.13.x
Other Linux
: Normal major
: ---
Assigned To: json-glib-maint
json-glib-maint
Depends on:
Blocks:
 
 
Reported: 2011-05-18 13:53 UTC by Laurent Bigonville
Modified: 2012-03-13 22:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix GVariant creation (3.98 KB, patch)
2011-07-06 10:39 UTC, Laurent Bigonville
committed Details | Review

Description Laurent Bigonville 2011-05-18 13:53:32 UTC
json-glib FTBFS on several architectures due to /gvariant/from-json/byte test.

It fails with:

ERROR:gvariant-test.c:193:test_json_to_gvariant: assertion failed (test_case->variant_data == variant_data): ("(byte 0xff,)" == "(byte 0x00,)")

All the logs can be found at:
https://buildd.debian.org/status/package.php?p=json-glib

Details about the different architectures in debian:
http://wiki.debian.org/ArchitectureSpecificsMemo
Comment 1 Emmanuele Bassi (:ebassi) 2011-05-28 10:13:03 UTC
I don't have any of the architectures to test on, so any patches are welcome. the failures seem to be concentrated in the GVariant code, so it could even be a GVariant issue.
Comment 2 Laurent Bigonville 2011-06-08 23:29:34 UTC
Any test code to see if the issue is coming from json-glib or the GVariant code?

I can have access to some of these architectures
Comment 3 Laurent Bigonville 2011-07-05 23:12:25 UTC
Hi,

Yes the issue seems in json_to_gvariant_recurse and related to GVariant.

g_variant_new ("y", (gint64) 255); doesn't seems to work the same on all architectures...

On S390 it gives byte 0x00 while on amd64 it gives byte 0xff

Is this a GLib or a json-glib issue?

Cheers
Comment 4 Emmanuele Bassi (:ebassi) 2011-07-06 09:45:00 UTC
if you can create a GVariant-to-string-only test case that fails, then it's a GVariant portability bug.

if a GVariant-to-string test case works then it's a bug in JSON-GLib.
Comment 5 Laurent Bigonville 2011-07-06 10:39:50 UTC
Created attachment 191391 [details] [review]
Fix GVariant creation

This fix casting issue when creating GVariant.

The tests now succeed at least on S390
Comment 6 Emmanuele Bassi (:ebassi) 2011-07-06 13:34:13 UTC
Review of attachment 191391 [details] [review]:

looks good to me.
Comment 7 Emmanuele Bassi (:ebassi) 2011-07-06 17:21:38 UTC
attachment 191391 [details] [review] pushed to master.

again, thanks for the detective work and for the patch.
Comment 8 André Klapper 2012-03-13 22:08:44 UTC
[Fixing Default QA assignee for json-glib - see 613232#c1. Sorry for bugmail noise.]