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 761146 - test-suite failure on various architectures
test-suite failure on various architectures
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:
 
 
Reported: 2016-01-26 19:58 UTC by Michael Biebl
Modified: 2016-03-11 18:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] core/tests: increase exit delay of child script (1.27 KB, patch)
2016-01-27 15:33 UTC, Beniamino Galvani
none Details | Review

Description Michael Biebl 2016-01-26 19:58:03 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
Comment 1 Beniamino Galvani 2016-01-27 14:04:15 UTC
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
Comment 2 Beniamino Galvani 2016-01-27 15:33:00 UTC
Created attachment 319838 [details] [review]
[PATCH] core/tests: increase exit delay of child script
Comment 3 Beniamino Galvani 2016-01-27 15:37:49 UTC
Hi Michael,

can you please try if the patch fixes the problem?
Comment 4 Michael Biebl 2016-01-27 18:35:53 UTC
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.
Comment 5 Michael Biebl 2016-01-27 19:30:58 UTC
Wonder if this is related: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=390433
Comment 7 Michael Biebl 2016-01-28 14:02:13 UTC
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