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 778734 - test-suite fails on various architectures (arm*, mips*)
test-suite fails on various architectures (arm*, mips*)
Status: RESOLVED FIXED
Product: libgudev
Classification: Other
Component: General
231
Other Linux
: Normal normal
: ---
Assigned To: libgudev Maintainers
libgudev Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-02-16 02:48 UTC by Michael Biebl
Modified: 2017-02-20 15:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Biebl 2017-02-16 02:48:08 UTC
The test suite that was added in 231 fails on various architectures as can be seen at https://buildd.debian.org/status/package.php?p=libgudev&suite=experimental

** (/«PKGBUILDDIR»/tests/.libs/lt-test-enumerator-filter:26993): WARNING **: umockdev.vala:449: add_devicev: Ignoring property key 'AFFF' without value
FAIL
Comment 1 Bastien Nocera 2017-02-16 03:28:54 UTC
Looks like umockdev doesn't support those architectures very well.

umockdev lives at https://github.com/martinpitt/umockdev/

You can disable the test suite with --disable-umockdev on those architectures in the meanwhile.
Comment 2 Martin Pitt 2017-02-20 12:57:43 UTC
I can reproduce this on a Debian porter box.

umockdev does support these architectures, its own tests pass on all supported Debian arches (https://buildd.debian.org/status/package.php?p=umockdev).

The problem here is that this call is (subtly) wrong:

        umockdev_testbed_add_device (testbed, "drm", "dev3", NULL,
                                     "ID_FOR_SEAT", "drm-pci-0000_00_02_0", NULL);

There is just a NULL terminator for the attributes list, but no NULL terminator for the (empty) properties list. Thus the varargs parser tries to read the args after the NULL and sees random stack data. If you change it to 

        umockdev_testbed_add_device (testbed, "drm", "dev3", NULL,
                                     "ID_FOR_SEAT", "drm-pci-0000_00_02_0", NULL, NULL);

then it works just fine.
Comment 3 Bastien Nocera 2017-02-20 15:21:33 UTC
(In reply to Martin Pitt from comment #2)
> I can reproduce this on a Debian porter box.
> 
> umockdev does support these architectures, its own tests pass on all
> supported Debian arches
> (https://buildd.debian.org/status/package.php?p=umockdev).
> 
> The problem here is that this call is (subtly) wrong:
> 
>         umockdev_testbed_add_device (testbed, "drm", "dev3", NULL,
>                                      "ID_FOR_SEAT", "drm-pci-0000_00_02_0",
> NULL);
> 
> There is just a NULL terminator for the attributes list, but no NULL
> terminator for the (empty) properties list. Thus the varargs parser tries to
> read the args after the NULL and sees random stack data. If you change it to 
> 
>         umockdev_testbed_add_device (testbed, "drm", "dev3", NULL,
>                                      "ID_FOR_SEAT", "drm-pci-0000_00_02_0",
> NULL, NULL);
> 
> then it works just fine.

Filed https://github.com/martinpitt/umockdev/issues/54 about adding sentinel checks.

commit 08412886f840603db9127d3d66ecbc1cc2326f43
Author: Bastien Nocera <hadess@hadess.net>
Date:   Mon Feb 20 16:17:50 2017 +0100

    tests: Fix crash on plenty of architectures
    
    umockdev_testbed_add_device() expects 2 sentinels, one for the sysfs
    attributes, one for the udev properties.
    
    Spotted by Martin Pitt <martinpitt@gnome.org>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=778734