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 702647 - nm-platform's test-link-linux test fails
nm-platform's test-link-linux test fails
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks: 699751
 
 
Reported: 2013-06-19 11:55 UTC by Pavel Simerda
Modified: 2013-06-26 17:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pavel Simerda 2013-06-19 11:55:44 UTC
When running on my system, nm-platform's test-link-linux test fails:

/link/bogus: OK
/link/loopback: OK
/link/internal: 
** (/root/NetworkManager/src/platform/tests/.libs/lt-test-link-linux:28230): ERROR **: Attemted to accept a non-received signal 'link-added'.

Backtrace:

  • #0 g_logv
    at gmessages.c line 974
  • #1 g_log
    at gmessages.c line 1003
  • #2 accept_signal
    at test-common.c line 22
  • #3 test_internal
    at test-link.c line 411
  • #4 test_case_run
    at gtestutils.c line 1679
  • #5 g_test_run_suite_internal
    at gtestutils.c line 1732
  • #6 g_test_run_suite_internal
    at gtestutils.c line 1743
  • #7 g_test_run_suite
    at gtestutils.c line 1788
  • #8 main
    at test-link.c line 581
  • #2 accept_signal
    at test-common.c line 22

Notes:

It looks like nm-linux-platform no longer sends 'link-added' when a dummy (at least in this case) interface is created.
Comment 1 Pavel Simerda 2013-06-26 17:44:20 UTC
commit e8c58c957ba130575c3293c8b93ffe4cf97b3865
Author: Dan Williams <dcbw@redhat.com>
Date:   Wed Jun 19 16:18:29 2013 -0500

    platform: specify link-added signal as asynchronous
    
    With the move of udev logic into the Linux platform class, the
    link-added signals are asynchronous, that is they are not emitted
    during the call to nm_platform_*_add(), but after that call has
    returned.  The Fake implementation still emitted them synchronously,
    which broke the testcases.  Convert the Fake implementation to emit
    link-added signals asynchronously and update the testcases to handle
    this.

 src/platform/nm-fake-platform.c  | 42 ++++++++++++++++++++++++++++++++++++++++--
 src/platform/nm-platform.c       |  3 ++-
 src/platform/tests/test-common.c |  3 ++-
 src/platform/tests/test-common.h |  6 ++++--
 src/platform/tests/test-link.c   | 47 +++++++++++++++++++++++++++++++++--------------
 5 files changed, 81 insertions(+), 20 deletions(-)

commit 5c705e643ad6f8ed73a1c38cba14285f07eb1539
Author: Dan Williams <dcbw@redhat.com>
Date:   Wed Jun 19 12:33:54 2013 -0500

    platform: update linux platform testcases for udev/platform merge
    
    Since the platform started using udev for link-added signals, we need
    to run the glib mainloop to wait for the udev signals to come in,
    instead of expecting them to be emitted immediately.

 src/platform/tests/test-link.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)