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 790214 - Multiple test issues
Multiple test issues
Status: RESOLVED WONTFIX
Product: NetworkManager
Classification: Platform
Component: general
1.10.x
Other Linux
: Normal blocker
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-11-11 18:30 UTC by Jean-Christophe Manciot
Modified: 2017-12-09 18:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Whole build log (1.40 MB, text/x-vhdl)
2017-11-11 18:30 UTC, Jean-Christophe Manciot
Details
./tools/run-nm-test.sh log (1.67 MB, text/x-log)
2017-11-14 13:02 UTC, Jean-Christophe Manciot
Details
Log of test-link-linux (67.61 KB, text/x-log)
2017-11-14 15:46 UTC, Jean-Christophe Manciot
Details
Building without root privileges (1.41 MB, text/x-vhdl)
2017-11-17 19:39 UTC, Jean-Christophe Manciot
Details

Description Jean-Christophe Manciot 2017-11-11 18:30:42 UTC
Created attachment 363398 [details]
Whole build log

Ubuntu 17.10
sources: git://anonscm.debian.org/pkg-utopia/network-manager.git
tag: debian/1.10.0-1

The test issues do not appear to be debian specific but I may be wrong.
There are also some strange build errors: "Error: no ID for constraint linkend: ..." (cf. attached build log).

Building in a clean chroot (as root as requested by some tests) with:
sudo dpkg-buildpackage --no-sign --build=binary

leads to the following failed tests:
=============================================
   NetworkManager 1.10.0: ./test-suite.log
=============================================

# TOTAL: 790
# PASS:  786
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 4

.. contents:: :depth: 2

ERROR: src/platform/tests/test-link-linux
=========================================

# random seed: R02S15ec6fd2b06cef70ed148f0629d5ac77
1..48
# Start of link tests
ok 1 /link/bogus
PASS: src/platform/tests/test-link-linux 1 /link/bogus
ok 2 /link/loopback
PASS: src/platform/tests/test-link-linux 2 /link/loopback

nmtst: initialize nmtst_get_rand() with NMTST_SEED_RAND=159047309
ok 3 /link/internal
PASS: src/platform/tests/test-link-linux 3 /link/internal
ok 4 /link/external
PASS: src/platform/tests/test-link-linux 4 /link/external
# Start of software tests
ok 5 /link/software/bridge
PASS: src/platform/tests/test-link-linux 5 /link/software/bridge
ok 6 /link/software/bond
PASS: src/platform/tests/test-link-linux 6 /link/software/bond
ok 7 /link/software/team
PASS: src/platform/tests/test-link-linux 7 /link/software/team
ok 8 /link/software/vlan
PASS: src/platform/tests/test-link-linux 8 /link/software/vlan
# Start of bridge tests
ok 9 /link/software/bridge/addr
PASS: src/platform/tests/test-link-linux 9 /link/software/bridge/addr
# End of bridge tests
# Start of detect tests
# Start of gre tests
ok 10 /link/software/detect/gre/external
PASS: src/platform/tests/test-link-linux 10 /link/software/detect/gre/external
ok 11 /link/software/detect/gre/platform
PASS: src/platform/tests/test-link-linux 11 /link/software/detect/gre/platform
ok 12 /link/software/detect/gre/random
PASS: src/platform/tests/test-link-linux 12 /link/software/detect/gre/random
# End of gre tests
# Start of ip6tnl tests
ok 13 /link/software/detect/ip6tnl/external
PASS: src/platform/tests/test-link-linux 13 /link/software/detect/ip6tnl/external
ok 14 /link/software/detect/ip6tnl/platform
PASS: src/platform/tests/test-link-linux 14 /link/software/detect/ip6tnl/platform
ok 15 /link/software/detect/ip6tnl/random
PASS: src/platform/tests/test-link-linux 15 /link/software/detect/ip6tnl/random
# End of ip6tnl tests
# Start of ipip tests
ok 16 /link/software/detect/ipip/external
PASS: src/platform/tests/test-link-linux 16 /link/software/detect/ipip/external
ok 17 /link/software/detect/ipip/platform
PASS: src/platform/tests/test-link-linux 17 /link/software/detect/ipip/platform
ok 18 /link/software/detect/ipip/random
PASS: src/platform/tests/test-link-linux 18 /link/software/detect/ipip/random
# End of ipip tests
# Start of macvlan tests
ok 19 /link/software/detect/macvlan/external
PASS: src/platform/tests/test-link-linux 19 /link/software/detect/macvlan/external
ok 20 /link/software/detect/macvlan/platform
PASS: src/platform/tests/test-link-linux 20 /link/software/detect/macvlan/platform
ok 21 /link/software/detect/macvlan/random
PASS: src/platform/tests/test-link-linux 21 /link/software/detect/macvlan/random
# End of macvlan tests
# Start of macvtap tests
ok 22 /link/software/detect/macvtap/external
PASS: src/platform/tests/test-link-linux 22 /link/software/detect/macvtap/external
ok 23 /link/software/detect/macvtap/platform
PASS: src/platform/tests/test-link-linux 23 /link/software/detect/macvtap/platform
ok 24 /link/software/detect/macvtap/random
PASS: src/platform/tests/test-link-linux 24 /link/software/detect/macvtap/random
# End of macvtap tests
# Start of sit tests
ok 25 /link/software/detect/sit/external
PASS: src/platform/tests/test-link-linux 25 /link/software/detect/sit/external
ok 26 /link/software/detect/sit/platform
PASS: src/platform/tests/test-link-linux 26 /link/software/detect/sit/platform
ok 27 /link/software/detect/sit/random
PASS: src/platform/tests/test-link-linux 27 /link/software/detect/sit/random
# End of sit tests
# Start of vlan tests
ok 28 /link/software/detect/vlan/external
PASS: src/platform/tests/test-link-linux 28 /link/software/detect/vlan/external
ok 29 /link/software/detect/vlan/platform
PASS: src/platform/tests/test-link-linux 29 /link/software/detect/vlan/platform
ok 30 /link/software/detect/vlan/random
PASS: src/platform/tests/test-link-linux 30 /link/software/detect/vlan/random
# End of vlan tests
# Start of vxlan tests
# Start of 0 tests
ok 31 /link/software/detect/vxlan/0/external
PASS: src/platform/tests/test-link-linux 31 /link/software/detect/vxlan/0/external
ok 32 /link/software/detect/vxlan/0/platform
PASS: src/platform/tests/test-link-linux 32 /link/software/detect/vxlan/0/platform
ok 33 /link/software/detect/vxlan/0/random
PASS: src/platform/tests/test-link-linux 33 /link/software/detect/vxlan/0/random
# End of 0 tests
# Start of 1 tests
ok 34 /link/software/detect/vxlan/1/external
PASS: src/platform/tests/test-link-linux 34 /link/software/detect/vxlan/1/external
ok 35 /link/software/detect/vxlan/1/platform
PASS: src/platform/tests/test-link-linux 35 /link/software/detect/vxlan/1/platform
ok 36 /link/software/detect/vxlan/1/random
PASS: src/platform/tests/test-link-linux 36 /link/software/detect/vxlan/1/random
# End of 1 tests
# End of vxlan tests
# End of detect tests
# Start of vlan tests
ok 37 /link/software/vlan/set-xgress
PASS: src/platform/tests/test-link-linux 37 /link/software/vlan/set-xgress
# End of vlan tests
# End of software tests
# Start of create-many-links tests
ok 38 /link/create-many-links/20
PASS: src/platform/tests/test-link-linux 38 /link/create-many-links/20
ok 39 /link/create-many-links/1000
PASS: src/platform/tests/test-link-linux 39 /link/create-many-links/1000
# End of create-many-links tests
# Start of nl-bugs tests
ok 40 /link/nl-bugs/veth
PASS: src/platform/tests/test-link-linux 40 /link/nl-bugs/veth
ok 41 /link/nl-bugs/spurious-newlink
PASS: src/platform/tests/test-link-linux 41 /link/nl-bugs/spurious-newlink
ok 42 /link/nl-bugs/spurious-dellink
PASS: src/platform/tests/test-link-linux 42 /link/nl-bugs/spurious-dellink
# End of nl-bugs tests
# End of link tests
# Start of general tests
# Start of netns tests
**
NetworkManager:ERROR:src/platform/tests/test-link.c:1902:_test_netns_create_platform: assertion failed: (NMP_IS_NETNS (netns))
<error> [1510423899.4897] netns: failed mount --make-rslave: Invalid argument
./tools/run-nm-test.sh: line 193: 30324 Aborted                 (core dumped) "${NMTST_DBUS_RUN_SESSION[@]}" "$TEST" "$@"
# NetworkManager:ERROR:src/platform/tests/test-link.c:1902:_test_netns_create_platform: assertion failed: (NMP_IS_NETNS (netns))
ERROR: src/platform/tests/test-link-linux - too few tests run (expected 48, got 42)
ERROR: src/platform/tests/test-link-linux - exited with status 134 (terminated by signal 6?)

ERROR: src/platform/tests/test-nmp-object
=========================================

**
NetworkManager:ERROR:src/platform/tests/test-nmp-object.c:396:test_cache_link: assertion failed: (nmp_object_is_visible (obj_new))
# random seed: R02Sef64f64881958405fd4f38c411378bb4
1..2
# Start of nmp-object tests
ok 1 /nmp-object/obj-base
PASS: src/platform/tests/test-nmp-object 1 /nmp-object/obj-base

nmtst: initialize nmtst_get_rand() with NMTST_SEED_RAND=1654986464
./tools/run-nm-test.sh: line 193: 30387 Aborted                 (core dumped) "${NMTST_DBUS_RUN_SESSION[@]}" "$TEST" "$@"
# NetworkManager:ERROR:src/platform/tests/test-nmp-object.c:396:test_cache_link: assertion failed: (nmp_object_is_visible (obj_new))
ERROR: src/platform/tests/test-nmp-object - too few tests run (expected 2, got 1)
ERROR: src/platform/tests/test-nmp-object - exited with status 134 (terminated by signal 6?)
Comment 1 Jean-Christophe Manciot 2017-11-11 18:32:29 UTC
The build has been made in a debian sid chroot.
Comment 2 Thomas Haller 2017-11-14 11:33:42 UTC
please run the tests individually and attach the logfile of the failure.


E.g.

   NMTST_DEBUG=d ./tools/run-nm-test.sh -m src/platform/tests/test-link-linux

Limit running all tests to a particular test with

   NMTST_DEBUG=d ./tools/run-nm-test.sh -m src/platform/tests/test-link-linux -p /general/netns/general



Also, the unit tests are not intended to run in the most contrived ways. If they cannot run in chroot, maybe that's just fine. But if it's easily fixable, we should make them work also there too.
Comment 3 Jean-Christophe Manciot 2017-11-14 13:00:49 UTC
NMTST_DEBUG=d ./tools/run-nm-test.sh -m src/platform/tests/test-link-linux
leads to:
...
<error> [1510664119.4724] netns: failed mount --make-rslave: Invalid argument
**
NetworkManager:ERROR:src/platform/tests/test-link.c:1902:_test_netns_create_platform: assertion failed: (NMP_IS_NETNS (netns))
./tools/run-nm-test.sh: line 193: 26925 Aborted                 (core dumped) "${NMTST_DBUS_RUN_SESSION[@]}" "$TEST" "$@"

The whole log is attached.
Comment 4 Jean-Christophe Manciot 2017-11-14 13:02:27 UTC
Created attachment 363583 [details]
./tools/run-nm-test.sh log
Comment 5 Thomas Haller 2017-11-14 14:22:49 UTC
Thanks. Could you also show the output of

  make src/platform/tests/test-link-linux
  strace src/platform/tests/test-link-linux -p /general/netns/general
Comment 6 Thomas Haller 2017-11-14 14:38:58 UTC
(In reply to Thomas Haller from comment #5)
> Thanks. Could you also show the output of
> 
>   make src/platform/tests/test-link-linux
>   strace src/platform/tests/test-link-linux -p /general/netns/general

or how about https://cgit.freedesktop.org/NetworkManager/NetworkManager/log/?h=th/platform-test-netns-bgo790214 ?
Comment 7 Jean-Christophe Manciot 2017-11-14 15:45:39 UTC
# make src/platform/tests/test-link-linux
# strace src/platform/tests/test-link-linux -p /general/netns/general

The log of the second command is attached.
Comment 8 Jean-Christophe Manciot 2017-11-14 15:46:08 UTC
Created attachment 363609 [details]
Log of test-link-linux
Comment 9 Beniamino Galvani 2017-11-17 11:00:59 UTC
(In reply to Thomas Haller from comment #6)
> or how about
> https://cgit.freedesktop.org/NetworkManager/NetworkManager/log/?h=th/
> platform-test-netns-bgo790214 ?

LGTM
Comment 11 Thomas Haller 2017-11-17 11:42:11 UTC
btw, comment 0 says:

>>  Building in a clean chroot (as root as requested by some tests) with:

You should not run the tests as root and it's not required and discouraged.
Comment 12 Jean-Christophe Manciot 2017-11-17 19:36:08 UTC
>> it's not required and discouraged
Is that so? Not running the tests as root leads to:
...

=============================================
   NetworkManager 1.10.0: ./test-suite.log
=============================================

# TOTAL: 729
# PASS:  721
# SKIP:  6
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 2

.. contents:: :depth: 2

SKIP: src/platform/tests/test-link-linux
========================================

# random seed: R02S02f11d4f5ca789c0c44c96095025063c
Skipping test: requires root privileges (./src/platform/tests/test-link-linux)
1..0
SKIP: src/platform/tests/test-link-linux

SKIP: src/platform/tests/test-address-linux
===========================================

# random seed: R02Se917ed68ef375f31651d827ac52615bb
Skipping test: requires root privileges (./src/platform/tests/test-address-linux)
1..0
SKIP: src/platform/tests/test-address-linux

ERROR: src/platform/tests/test-nmp-object
=========================================

**
NetworkManager:ERROR:src/platform/tests/test-nmp-object.c:396:test_cache_link: assertion failed: (nmp_object_is_visible (obj_new))
# random seed: R02S58849f2dee38a521c6ed7ebaf182e9b9
1..2
# Start of nmp-object tests
ok 1 /nmp-object/obj-base
PASS: src/platform/tests/test-nmp-object 1 /nmp-object/obj-base

nmtst: initialize nmtst_get_rand() with NMTST_SEED_RAND=2732874456
./tools/run-nm-test.sh: line 193: 21599 Aborted                 (core dumped) "${NMTST_DBUS_RUN_SESSION[@]}" "$TEST" "$@"
# NetworkManager:ERROR:src/platform/tests/test-nmp-object.c:396:test_cache_link: assertion failed: (nmp_object_is_visible (obj_new))
ERROR: src/platform/tests/test-nmp-object - too few tests run (expected 2, got 1)
ERROR: src/platform/tests/test-nmp-object - exited with status 134 (terminated by signal 6?)

SKIP: src/platform/tests/test-route-linux
=========================================

# random seed: R02S83448855822208c1f8d694a339ee6784
Skipping test: requires root privileges (./src/platform/tests/test-route-linux)
1..0
SKIP: src/platform/tests/test-route-linux

SKIP: src/platform/tests/test-cleanup-linux
===========================================

# random seed: R02S90bae36151509176892c18ce66cfcd90
Skipping test: requires root privileges (./src/platform/tests/test-cleanup-linux)
1..0
SKIP: src/platform/tests/test-cleanup-linux

SKIP: src/devices/tests/test-lldp
=================================

# random seed: R02S8093eebad9986ad98e02a9b5d922366c
Skipping test: requires root privileges (./src/devices/tests/test-lldp)
1..0
SKIP: src/devices/tests/test-lldp

SKIP: src/devices/tests/test-arping
===================================

# random seed: R02Scdcd19901e72c2ca4e1187aa83c11fb8
Skipping test: requires root privileges (./src/devices/tests/test-arping)
1..0
SKIP: src/devices/tests/test-arping
...

Full build log is attached.
Comment 13 Jean-Christophe Manciot 2017-11-17 19:39:11 UTC
Created attachment 363947 [details]
Building without root privileges
Comment 14 Thomas Haller 2017-11-22 13:36:01 UTC
for you even src/platform/tests/test-nmp-object fails, which doesn't do anything fancy. Is there no udev?

I am not sure we care strongly about this. You cannot run the unit tests in any environment. Something with your environment is not as required.

But please attach a patch to fix this, or provide more information for how to reproduce the failure.


You can run individual tests like:

  ./tools/run-nm-test.sh -m src/platform/tests/test-nmp-object

To enable debug logging of the tests `export NMTST_DEBUG=d`


Thanks.
Comment 15 Jean-Christophe Manciot 2017-12-09 18:07:38 UTC
Good news: I was finally able to build it.

- destroyed the sid chroot
- created a new pristine sid chroot
- built debian/1.8.4-4

I got the following error:
ERROR: src/platform/tests/test-link-linux
=========================================

modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.13.0-19-generic/modules.dep.bin'
modprobe: FATAL: Module bonding not found in directory /lib/modules/4.13.0-19-generic
NetworkManager-Message: <error> [1512835218.8084] netns: failed mount --make-rslave: Invalid argument

Seeing the "4.13.0-19" inside the error message gave me the idea to build the sources within the Ubuntu artful host rather than inside a debian sid chroot and all tests passed for both debian/1.8.4-4 and debian/1.10.0-1.