GNOME Bugzilla – Bug 765835
ERROR:test-link.c:408:test_software: assertion failed (value == "789"): ("788" == "789")
Last modified: 2016-08-28 16:10:35 UTC
Ubuntu 16.04 4.4.0 NM 1.2.0 git commit "Release version 1.2.0-1 to unstable" ============================================================= NetworkManager 1.2.0: src/platform/tests/test-suite.log ============================================================= # TOTAL: 38 # PASS: 36 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 2 .. contents:: :depth: 2 ERROR: test-link-linux ====================== # random seed: R02S6ddcf00cb430c119b8f22cec87b8416c 1..46 # Start of link tests ok 1 /link/bogus PASS: test-link-linux 1 /link/bogus ok 2 /link/loopback PASS: test-link-linux 2 /link/loopback nmtst: initialize nmtst_get_rand() with NMTST_SEED_RAND=2671893694 ok 3 /link/internal PASS: test-link-linux 3 /link/internal ok 4 /link/external PASS: test-link-linux 4 /link/external ** NetworkManager:ERROR:test-link.c:408:test_software: assertion failed (value == "789"): ("788" == "789") # Start of software tests Aborted (core dumped) # NetworkManager:ERROR:test-link.c:408:test_software: assertion failed (value == "789"): ("788" == "789") ERROR: test-link-linux - too few tests run (expected 46, got 4) ERROR: test-link-linux - exited with status 134 (terminated by signal 6?)
Same error with commit debian/1.2.2-1. Different random seeds are used: ============================================================= NetworkManager 1.2.2: src/platform/tests/test-suite.log ============================================================= # TOTAL: 38 # PASS: 36 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 2 .. contents:: :depth: 2 ERROR: test-link-linux ====================== # random seed: R02Sf5eb66b29e396a34282e0945bc18284d 1..46 # Start of link tests ok 1 /link/bogus PASS: test-link-linux 1 /link/bogus ok 2 /link/loopback PASS: test-link-linux 2 /link/loopback nmtst: initialize nmtst_get_rand() with NMTST_SEED_RAND=192018096 ok 3 /link/internal PASS: test-link-linux 3 /link/internal ok 4 /link/external PASS: test-link-linux 4 /link/external ** NetworkManager:ERROR:test-link.c:408:test_software: assertion failed (value == "789"): ("788" == "789") # Start of software tests Aborted (core dumped) # NetworkManager:ERROR:test-link.c:408:test_software: assertion failed (value == "789"): ("788" == "789") ERROR: test-link-linux - too few tests run (expected 46, got 4) ERROR: test-link-linux - exited with status 134 (terminated by signal 6?)
Created attachment 328072 [details] Whole build log echo -------- echo Cleaning echo -------- cd git-network-manager git reset --hard git clean -fxd :/ git fetch --progress --prune origin git checkout debian/1.2.2-1 echo -------- echo Building echo -------- dpkg-buildpackage -b -m"Jean-Christophe Manciot <manciot.jeanchristophe@gmail.com>"
Same error with ***1.4.0-2***. The error message is slightly different though: test-link.c:403 ============================================================= NetworkManager 1.4.0: src/platform/tests/test-suite.log ============================================================= # TOTAL: 38 # PASS: 36 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 2 .. contents:: :depth: 2 ERROR: test-link-linux ====================== # random seed: R02Se804f8728416a0e9b562138de45a0724 1..46 # Start of link tests ok 1 /link/bogus PASS: test-link-linux 1 /link/bogus ok 2 /link/loopback PASS: test-link-linux 2 /link/loopback nmtst: initialize nmtst_get_rand() with NMTST_SEED_RAND=3948062492 ok 3 /link/internal PASS: test-link-linux 3 /link/internal ok 4 /link/external PASS: test-link-linux 4 /link/external ** NetworkManager:ERROR:test-link.c:403:test_software: assertion failed (value == "789"): ("788" == "789") # Start of software tests Aborted (core dumped) # NetworkManager:ERROR:test-link.c:403:test_software: assertion failed (value == "789"): ("788" == "789") ERROR: test-link-linux - too few tests run (expected 46, got 4) ERROR: test-link-linux - exited with status 134 (terminated by signal 6?) Around src/platform/tests/test-link.c:403 /* Set master option */ switch (link_type) { case NM_LINK_TYPE_BRIDGE: if (nmtstp_is_sysfs_writable ()) { g_assert (nm_platform_sysctl_master_set_option (NM_PLATFORM_GET, ifindex, "forward_delay", "789")); value = nm_platform_sysctl_master_get_option (NM_PLATFORM_GET, ifindex, "forward_delay"); g_assert_cmpstr (value, ==, "789"); g_free (value); } break; If I uninstall all packages which create bridges, namely libvirt & lxc/lxd in my case, reboot & rebuild networkmanager, the exact same error appears, so it does not depend on the presence/absence of Linux bridges. Anyhow, having a hard-coded value as "789" in the code is definitely not best practice, not mentioning the fact that only the programmer(s) know what it stands for.
The number 789 has no special meaning at all. Does it work when you change to something else? what happens when you create the bridge externally? ip link add name br0 type bridge echo 789 > /sys/devices/virtual/net/virbr0/br/forward_delay cat /sys/devices/virtual/net/br0/bridge/forward_delay
How about using something like this in /src/platform/tests/test-common.h to clarify it: #define DUMMY_TEST_VALUE 789 or maybe something more explicit Replacing all 789 occurrences with 999 leads to the same error: NetworkManager:ERROR:test-link.c:403:test_software: assertion failed (value == "999"): ("998" == "999") # Start of software tests Aborted (core dumped) # NetworkManager:ERROR:test-link.c:403:test_software: assertion failed (value == "999"): ("998" == "999") ERROR: test-link-linux - too few tests run (expected 46, got 4) ERROR: test-link-linux - exited with status 134 (terminated by signal 6?) I suppose you meant /sys/devices/virtual/net/br0/bridge: ip link add name br0 type bridge echo 999 > /sys/devices/virtual/net/br0/bridge/forward_delay cat /sys/devices/virtual/net/br0/bridge/forward_delay 998 !!!!!!!!! However: echo 998 > /sys/devices/virtual/net/br0/bridge/forward_delay cat /sys/devices/virtual/net/br0/bridge/forward_delay 998 echo 335 > /sys/devices/virtual/net/br0/bridge/forward_delay cat /sys/devices/virtual/net/br0/bridge/forward_delay 334 !!!!!!!!!! Very strange, so: #!/bin/bash for i in {0..9} do echo 99${i} > /sys/devices/virtual/net/br0/bridge/forward_delay cat /sys/devices/virtual/net/br0/bridge/forward_delay done leads to: 990 990 992 992 994 994 996 996 998 998 All uneven values are transformed into even ones (why?); so let's replace 789 with an even value (998 for instance), and rebuild: ============================================================================ Testsuite summary for NetworkManager 1.4.0 ============================================================================ # TOTAL: 11 # PASS: 11 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ However, another issue pops up: dh binary --with gir,systemd,autoreconf,ppp dh_testroot dh_prep dh_installdirs /home/actionmystique/Program-Files/Ubuntu/Network-Manager/git-network-manager/debian/network-manager.dirs: 1: /home/actionmystique/Program-Files/Ubuntu/Network-Manager/git-network-manager/debian/network-manager.dirs: var/lib/NetworkManager/: not found /home/actionmystique/Program-Files/Ubuntu/Network-Manager/git-network-manager/debian/network-manager.dirs: 2: /home/actionmystique/Program-Files/Ubuntu/Network-Manager/git-network-manager/debian/network-manager.dirs: etc/NetworkManager/conf.d/: not found /home/actionmystique/Program-Files/Ubuntu/Network-Manager/git-network-manager/debian/network-manager.dirs: 3: /home/actionmystique/Program-Files/Ubuntu/Network-Manager/git-network-manager/debian/network-manager.dirs: etc/NetworkManager/dnsmasq.d/: not found /home/actionmystique/Program-Files/Ubuntu/Network-Manager/git-network-manager/debian/network-manager.dirs: 4: /home/actionmystique/Program-Files/Ubuntu/Network-Manager/git-network-manager/debian/network-manager.dirs: etc/NetworkManager/dnsmasq-shared.d/: not found /home/actionmystique/Program-Files/Ubuntu/Network-Manager/git-network-manager/debian/network-manager.dirs: 5: /home/actionmystique/Program-Files/Ubuntu/Network-Manager/git-network-manager/debian/network-manager.dirs: etc/NetworkManager/system-connections/: not found /home/actionmystique/Program-Files/Ubuntu/Network-Manager/git-network-manager/debian/network-manager.dirs: 6: /home/actionmystique/Program-Files/Ubuntu/Network-Manager/git-network-manager/debian/network-manager.dirs: etc/NetworkManager/VPN/: not found dh_installdirs: debian/network-manager.dirs (executable config) returned exit code 127 debian/rules:8: recipe for target 'binary' failed make: *** [binary] Error 127 Any suggestion? should I file another bug report?
This seems like a kernel issue. anyway, let's just change the tested number to an even number: master: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=895c61a742eb1d816b022c260494f5632bd7a922 nm-1-4: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=5696a99eecdd291b0e4f53c3c1c1e3e778255741 I assume this fixes your test-failures, therefore I close the bug (please reopen, if that's not the case). Thanks. Thank you for reporting the issue. The `dh binary --with gir,systemd,autoreconf,ppp` is not an upstream issue. Something is wrong with the downstream package. Please report it against Ubuntu (I presume??).