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 739448 - `make check` on master fails when using Python3 (libnm-glib/tests/test-nm-client)
`make check` on master fails when using Python3 (libnm-glib/tests/test-nm-cli...
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
0.9.x
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-10-31 11:47 UTC by Pacho Ramos
Modified: 2015-01-05 13:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gentoo/ixit build log: NetworkManager 1.0.0 (857.72 KB, text/plain)
2014-12-24 18:46 UTC, Pavel Simerda
Details
gentoo/ixit build log: NetworkManager git master (887.05 KB, text/plain)
2014-12-24 21:36 UTC, Pavel Simerda
Details

Description Pacho Ramos 2014-10-31 11:47:27 UTC
I get:
make  check-local
make[5]: Entering directory '/home/pacho/Descargas/NetworkManager/NetworkManager-0.9.10.1/_build/libnm-glib'
../../tools/check-exports.sh ./.libs/libnm-glib.so ../../libnm-glib/libnm-glib.ver
./.libs/libnm-glib.so: checking exported symbols against ../../libnm-glib/libnm-glib.ver
make[5]: Leaving directory '/home/pacho/Descargas/NetworkManager/NetworkManager-0.9.10.1/_build/libnm-glib'
make[4]: Leaving directory '/home/pacho/Descargas/NetworkManager/NetworkManager-0.9.10.1/_build/libnm-glib'
Making check in tests
make[4]: Entering directory '/home/pacho/Descargas/NetworkManager/NetworkManager-0.9.10.1/_build/libnm-glib/tests'
make  check-TESTS
make[5]: Entering directory '/home/pacho/Descargas/NetworkManager/NetworkManager-0.9.10.1/_build/libnm-glib/tests'
/libnm-glib/device-added: OK
/libnm-glib/wifi-ap-added-removed: **
ERROR:../../../libnm-glib/tests/test-nm-client.c:493:test_wifi_ap_added_removed: assertion failed: (info.signaled)
/bin/sh: línea 5: 25962 Abortado                (`core' generado) ../../../libnm-glib/tests/libnm-glib-test-launch.sh ${dir}$tst
FAIL: test-nm-client
Service started
/remote_settings/add_connection: Added connection /org/freedesktop/NetworkManager/Settings/Connection/1
OK
/remote_settings/make_invisible: OK
/remote_settings/make_visible: OK
/remote_settings/remove_connection: OK
PASS: test-remote-settings-client
===============================================================================
1 of 2 tests failed
Please report to http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager
===============================================================================
Makefile:655: recipe for target 'check-TESTS' failed
make[5]: *** [check-TESTS] Error 1
make[5]: Leaving directory '/home/pacho/Descargas/NetworkManager/NetworkManager-0.9.10.1/_build/libnm-glib/tests'
Makefile:778: recipe for target 'check-am' failed
make[4]: *** [check-am] Error 2
make[4]: Leaving directory '/home/pacho/Descargas/NetworkManager/NetworkManager-0.9.10.1/_build/libnm-glib/tests'
Makefile:1339: recipe for target 'check-recursive' failed
make[3]: *** [check-recursive] Error 1
make[3]: Leaving directory '/home/pacho/Descargas/NetworkManager/NetworkManager-0.9.10.1/_build/libnm-glib'
Makefile:1490: recipe for target 'check' failed
make[2]: *** [check] Error 2
make[2]: Leaving directory '/home/pacho/Descargas/NetworkManager/NetworkManager-0.9.10.1/_build/libnm-glib'
Makefile:851: recipe for target 'check-recursive' failed
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory '/home/pacho/Descargas/NetworkManager/NetworkManager-0.9.10.1/_build'
Makefile:1047: recipe for target 'distcheck' failed
make: *** [distcheck] Error 1

The trace:
[New LWP 25962]
[New LWP 25976]
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/home/pacho/Descargas/NetworkManager/NetworkManager-0.9.10.1/_build/libnm-glib/'.
Program terminated with signal SIGABRT, Aborted.

Comment 1 Thomas Haller 2014-10-31 12:08:38 UTC
What are the exact steps before the failure? What is the git-commit-id are you building?

Thanks
Comment 2 Pacho Ramos 2014-10-31 12:18:28 UTC
I follow this steps:
git clone git://anongit.freedesktop.org/NetworkManager/NetworkManager
cd NetworkManager
git checkout -b nm0.9.10 origin/nm-0-9-10
./autogen.sh  && make -j3 && make distcheck
Comment 3 Thomas Haller 2014-10-31 12:53:00 UTC
$ git clean -fdx && ./autogen.sh --enable-gtk-doc  && make -j3 && make distcheck

that works for me.


Can you reproduce the failure reliably?
Comment 4 Pacho Ramos 2014-10-31 13:11:14 UTC
I can reproduce always, running make distcheck or make check
Comment 5 Thomas Haller 2014-10-31 13:34:04 UTC
how does the 'master' branch work for you? Could you please try commit 48b4f6f8307addb821aea0db22c3a4801cf7a336 ?


As it also fails during regular `make check`, I assume calling test-nm-client directly also fails for you?

what gives:

$ libnm-glib/tests/test-nm-client
/libnm-glib/device-added: OK
/libnm-glib/wifi-ap-added-removed: OK
/libnm-glib/wimax-nsp-added-removed: OK
/libnm-glib/devices-array: OK
/libnm-glib/client-manager-running: OK
Comment 6 Pacho Ramos 2014-10-31 15:06:17 UTC
With master I get different failures:
PASS: test-settings-defaults
==================
All 7 tests passed
==================
make[5]: Leaving directory '/home/pacho/Descargas/master/NetworkManager/NetworkManager-0.9.11.0/_build/libnm-core/tests'
make[4]: Leaving directory '/home/pacho/Descargas/master/NetworkManager/NetworkManager-0.9.11.0/_build/libnm-core/tests'
make[3]: Leaving directory '/home/pacho/Descargas/master/NetworkManager/NetworkManager-0.9.11.0/_build/libnm-core'
make[2]: Leaving directory '/home/pacho/Descargas/master/NetworkManager/NetworkManager-0.9.11.0/_build/libnm-core'
Making check in libnm
make[2]: Entering directory '/home/pacho/Descargas/master/NetworkManager/NetworkManager-0.9.11.0/_build/libnm'
make  check-recursive
make[3]: Entering directory '/home/pacho/Descargas/master/NetworkManager/NetworkManager-0.9.11.0/_build/libnm'
Making check in .
make[4]: Entering directory '/home/pacho/Descargas/master/NetworkManager/NetworkManager-0.9.11.0/_build/libnm'
make  check-local
make[5]: Entering directory '/home/pacho/Descargas/master/NetworkManager/NetworkManager-0.9.11.0/_build/libnm'
../../tools/check-exports.sh ./.libs/libnm.so ../../libnm/libnm.ver
./.libs/libnm.so: checking exported symbols against ../../libnm/libnm.ver
make[5]: Leaving directory '/home/pacho/Descargas/master/NetworkManager/NetworkManager-0.9.11.0/_build/libnm'
make[4]: Leaving directory '/home/pacho/Descargas/master/NetworkManager/NetworkManager-0.9.11.0/_build/libnm'
Making check in tests
make[4]: Entering directory '/home/pacho/Descargas/master/NetworkManager/NetworkManager-0.9.11.0/_build/libnm/tests'
make  check-TESTS
make[5]: Entering directory '/home/pacho/Descargas/master/NetworkManager/NetworkManager-0.9.11.0/_build/libnm/tests'
/libnm/device-added: OK
/libnm/wifi-ap-added-removed: **
ERROR:../../../libnm/tests/test-nm-client.c:260:test_wifi_ap_added_removed: assertion failed: (info.signaled)
../../../libnm/tests/libnm-test-launch.sh: línea 9: 29363 Abortado                (`core' generado) "$@"
FAIL: test-nm-client
/client/add_connection: **
ERROR:../../../libnm/tests/test-remote-settings-client.c:48:add_cb: assertion failed (error == NULL): Traceback (most recent call last):
  • File "/usr/lib64/python3.3/site-packages/dbus/service.py", line 707 in _message_cb
    retval = candidate_method(self, *args, **keywords)
  • File "/home/pacho/Descargas/master/NetworkManager/NetworkManager-0.9.11.0/_build/../tools/test-networkmanager-service.py", line 1022 in AddConnection
    self.connections[path] = Connection(self.bus, path, settings, self.delete_connection)
  • File "/home/pacho/Descargas/master/NetworkManager/NetworkManager-0.9.11.0/_build/../tools/test-networkmanager-service.py", line 933 in __init__
    if not settings.has_key('connection'):
AttributeError: 'dbus.Dictionary' object has no attribute 'has_key'
 (g-io-error-quark, 36)
../../../libnm/tests/libnm-test-launch.sh: línea 9: 29391 Abortado                (`core' generado) "$@"
FAIL: test-remote-settings-client
/libnm/secret-agent/none: **
ERROR:../../../libnm/tests/test-secret-agent.c:216:connection_added_cb: assertion failed (error == NULL): Traceback (most recent call last):
  • File "/usr/lib64/python3.3/site-packages/dbus/service.py", line 707 in _message_cb
    retval = candidate_method(self, *args, **keywords)
  • File "/home/pacho/Descargas/master/NetworkManager/NetworkManager-0.9.11.0/_build/../tools/test-networkmanager-service.py", line 1022 in AddConnection
    self.connections[path] = Connection(self.bus, path, settings, self.delete_connection)
  • File "/home/pacho/Descargas/master/NetworkManager/NetworkManager-0.9.11.0/_build/../tools/test-networkmanager-service.py", line 933 in __init__
    if not settings.has_key('connection'):
AttributeError: 'dbus.Dictionary' object has no attribute 'has_key'
 (g-io-error-quark, 36)
../../../libnm/tests/libnm-test-launch.sh: línea 9: 29415 Abortado                (`core' generado) "$@"
FAIL: test-secret-agent
===============================================================================
3 of 3 tests failed
Please report to http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager
===============================================================================
Makefile:669: recipe for target 'check-TESTS' failed
make[5]: *** [check-TESTS] Error 1
make[5]: Leaving directory '/home/pacho/Descargas/master/NetworkManager/NetworkManager-0.9.11.0/_build/libnm/tests'
Makefile:792: recipe for target 'check-am' failed
make[4]: *** [check-am] Error 2
make[4]: Leaving directory '/home/pacho/Descargas/master/NetworkManager/NetworkManager-0.9.11.0/_build/libnm/tests'
Makefile:1008: recipe for target 'check-recursive' failed
make[3]: *** [check-recursive] Error 1
make[3]: Leaving directory '/home/pacho/Descargas/master/NetworkManager/NetworkManager-0.9.11.0/_build/libnm'
Makefile:1158: recipe for target 'check' failed
make[2]: *** [check] Error 2
make[2]: Leaving directory '/home/pacho/Descargas/master/NetworkManager/NetworkManager-0.9.11.0/_build/libnm'
Makefile:671: recipe for target 'check-recursive' failed
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory '/home/pacho/Descargas/master/NetworkManager/NetworkManager-0.9.11.0/_build'
Makefile:867: recipe for target 'distcheck' failed
make: *** [distcheck] Error 1

Going back to 0.9.10 and running manually the test I get:
$ libnm-glib/tests/test-nm-client
/libnm-glib/device-added: OK
/libnm-glib/wifi-ap-added-removed: **
ERROR:test-nm-client.c:493:test_wifi_ap_added_removed: assertion failed: (info.signaled)
Abortado (`core' generado)
Comment 7 Thomas Haller 2014-10-31 15:51:02 UTC
The test failure you see on master are because the test script only works with python2.

I fixed those scripts, they don't fail on Python 3 for that reason.
http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=0923769285ba6e5f665a3c9b5f01b17d1be34d5b


But now I also see your original failure, and it is present in master too.
But only with python3.



In the meantime, just run `make dist` instead of `make distcheck` or use python2.

Btw. would be useful to know if it works for you with python2(??)


Thanks
Comment 8 Pacho Ramos 2014-10-31 16:16:44 UTC
Oh, right, it works fine with python2 :D

That explains why were are having this for ages in our Gentoo ebuild:
        # Use python2.7 shebangs for test scripts
        sed -e 's@\(^#!.*python\)@\12.7@' \
                -i */tests/*.py || die

Sorry for not remembering it... well, at least if that serves to finally make tests buildable with python3 :)

As a side note, I still need to run autogen.sh with --enable-more-warnings=no, otherwise it still fails by default with errors like:
gconf-helpers.c: In function '_create_keyring_add_attr_list':
gconf-helpers.c:118:2: error: 'gnome_keyring_attribute_list_new' is deprecated (declared at /usr/include/gnome-keyring-1/gnome-keyring.h:153): Use 'g_hash_table_new' instead [-Werror=deprecated-declarations]
  attrs = gnome_keyring_attribute_list_new ();
  ^


Not sure if that is expected :/
Comment 9 Thomas Haller 2014-10-31 20:23:53 UTC
(In reply to comment #8)
> Oh, right, it works fine with python2 :D

thanks for confirmation.


> That explains why were are having this for ages in our Gentoo ebuild:
>         # Use python2.7 shebangs for test scripts
>         sed -e 's@\(^#!.*python\)@\12.7@' \
>                 -i */tests/*.py || die
> 
> Sorry for not remembering it... well, at least if that serves to finally make
> tests buildable with python3 :)

well, not yet. There is still a bug with python 3
(I changed the subject of this bug) 


> As a side note, I still need to run autogen.sh with --enable-more-warnings=no,
> otherwise it still fails by default with errors like:
> gconf-helpers.c: In function '_create_keyring_add_attr_list':
> gconf-helpers.c:118:2: error: 'gnome_keyring_attribute_list_new' is deprecated
> (declared at /usr/include/gnome-keyring-1/gnome-keyring.h:153): Use
> 'g_hash_table_new' instead [-Werror=deprecated-declarations]
>   attrs = gnome_keyring_attribute_list_new ();
>   ^
> 
> Not sure if that is expected :/

Not expected. I pushed fixes for that to network-manager-applet:

master: https://git.gnome.org/browse/network-manager-applet/commit/?id=ad3b90cf877f444e57ffa9b55e8325cac74b1ed3

nma-0-9-10: https://git.gnome.org/browse/network-manager-applet/commit/?h=nma-0-9-10&id=7427eae263da45c4a2648916ff7ba87f32f224a4
Comment 10 Pavel Simerda 2014-12-24 16:21:24 UTC
I can confirm this bug. I'm building my ebuild[1] for NetworkManager-1.0.0 on Gentoo with FEATURES="test" and nmclient tests fail as well. I have both Python 2.x and Python 3.x available.

[1]: https://github.com/okias/ixit/tree/master/net-misc/networkmanager

I could possibly work around it by forcing NetworkManager to use Python 2.x and fix any scripts with wrong shebang but IMO NetworkManager should be able to choose a version of Python that it works with, whether by careful choice or by supporting the latest.
Comment 11 Pavel Simerda 2014-12-24 18:46:52 UTC
Created attachment 293324 [details]
gentoo/ixit build log: NetworkManager 1.0.0
Comment 12 Pavel Simerda 2014-12-24 21:36:18 UTC
Created attachment 293325 [details]
gentoo/ixit build log: NetworkManager git master
Comment 13 Thomas Haller 2015-01-05 13:25:08 UTC
I fixed one issue:

master:
http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=c569fc23bfc160acc1cf1d5bce2fffd9f7dd72ef

nm-1.0:
http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=9fabd1e589588a69052a13078d04a11771c0c2b7



With this change, `make check` succeeds for me both with Python 2 and Python 3. Hence I close this bug.
Feel free to reopen, if you find other issues.