GNOME Bugzilla – Bug 761146
test-suite failure on various architectures
Last modified: 2016-03-11 18:14:11 UTC
As can be seen at [1], the test-suite for 1.1.90 fails on various architectures. I could easily reproduce the problem on a arm64 porter box also with the latest Git master: ERROR: test-general-with-expect =============================== ** GLib:ERROR:test-general-with-expect.c:148:test_nm_utils_kill_child_sync_do: Did not see expected message NetworkManager-DEBUG: *kill child process 'test-s-1-1' (*): waiting up to 3000 milliseconds for process to terminate normally after sending SIGTERM (15)... Aborted # random seed: R02Sde8043e3b36dc799fa279d573e59c785 1..6 # Start of general tests ok 1 /general/nm_utils_monotonic_timestamp_as_boottime PASS: test-general-with-expect 1 /general/nm_utils_monotonic_timestamp_as_boottime # NetworkManager-DEBUG: <debug> [1453838104.799391] [NetworkManagerUtils.c:891] nm_utils_kill_child_sync(): kill child process 'test-s-1-1' (32641): after sending SIGTERM (15), process 32641 exited by signal 15 # GLib:ERROR:test-general-with-expect.c:148:test_nm_utils_kill_child_sync_do: Did not see expected message NetworkManager-DEBUG: *kill child process 'test-s-1-1' (*): waiting up to 3000 milliseconds for process to terminate normally after sending SIGTERM (15)... ERROR: test-general-with-expect - too few tests run (expected 6, got 1) ERROR: test-general-with-expect - exited with status 134 (terminated by signal 6?) As said, I can easily reproduce the problem, so let me know if I can provide further information or if you want me to test any changes. [1] https://buildd.debian.org/status/package.php?p=network-manager&suite=experimental
Hi, the test fails because normally we would expect the following messages: "*kill child process 'test-s-1-1' (*): waiting up to 3000 milliseconds for process to terminate normally after sending SIGTERM (15)..."); "*kill child process 'test-s-1-1' (*): after sending SIGTERM (15), process * exited by signal 15 (* usec elapsed)"); but instead we get only the second, which means that between the kill() and the waitpid() in nm_utils_kill_child_sync() the process has already quit. But the process should terminate 300ms after receiving the signal and so the only explanations I can think of are: 1. the delay of 0.3 is too small 2. 'sleep' does not accept decimal values on such architectures 3. 'trap "sleep 0.3; exit 10" EXIT;' fails in some other ways
Created attachment 319838 [details] [review] [PATCH] core/tests: increase exit delay of child script
Hi Michael, can you please try if the patch fixes the problem?
Today, ./src/tests/test-general-with-expect succeeded a few times. But if I let it run in a while loop, it eventually fails. Bumping the sleep to 1 didn't help. It still eventually fails. So I don't think 2. is the issue here. I suspect 3. leads to the right direction. Keep in mind, that on Debian/Ubuntu /bin/sh is a symlink to /bin/dash. For testing purposes I changed this to: index 91f3f33..a642628 100644 --- a/src/tests/test-general-with-expect.c +++ b/src/tests/test-general-with-expect.c @@ -232,7 +232,7 @@ test_nm_utils_kill_child (void) NULL, }; char *argv1[] = { - "sh", + "bash", "-c", "trap \"sleep 0.3; exit 10\" EXIT; " "sleep 100000; exit $? #" TEST_TOKEN, The while loop is now currently at the 100th iteration without a failure. So my guess is that this has something to do with bash vs dash.
Wonder if this is related: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=390433
fixed: http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=06dbbb899cf6b4a8283156f3d1b471e506ed37dd Thanks Michael, Beniamino.
Fwiw, I tested a build yesterday with basically the same patch as Thomas [0] The results look good so far [1], althouth not complete yet. [0] https://buildd.debian.org/status/package.php?p=network-manager&suite=experimental [1] https://buildd.debian.org/status/package.php?p=network-manager&suite=experimental
This is the correct link: [0] https://anonscm.debian.org/cgit/pkg-utopia/network-manager.git/commit/?h=experimental&id=59e6416758542e2a76eb7523e9901dbaa39ad750