Verified Commit 441f9b3c authored by Thomas Haller's avatar Thomas Haller
Browse files

tests: adjust timeouts for test nm_utils_kill_child()

The test spawns processes and tries to kill them, with timeouts and retry.
That is inherently racy, and it's hard to deterministically test the
interesting cases, without having unstable tests.

Try to adjust the timeout, to make it more stable:

    14:02:27 /builds/NetworkManager/NetworkManager/tools/run-nm-test.sh --called-from-make /builds/NetworkManager/NetworkManager/build    --launch-dbus=auto /builds/NetworkManager/NetworkManager/build/src/tests/test-core-with-expect
    --- stdout ---
    # random seed: R02S7748fae8fc946b7a755b72efb5815250
    1..5
    # Start of general tests
    ok 1 /general/nm_utils_monotonic_timestamp_as_boottime
    # NetworkManager-DEBUG: <debug> [1601992953.4091] kill child process 'test-s-1-3' (18615): sending SIGKILL...
    # NetworkManager-DEBUG: <debug> [1601992953.4242] kill child process 'test-s-1-3' (18615): waiting for process to terminate after sending no signal (0) and SIGKILL...
    # NetworkManager-DEBUG: <debug> [1601992953.4257] kill child process 'test-s-1-3' (18615): after sending no signal (0) and SIGKILL, process 18615 exited by signal 9 (20807 usec elapsed)
    Bail out! GLib:ERROR:../src/tests/test-core-with-expect.c:154:test_nm_utils_kill_child_sync_do: Did not see expected message NetworkManager-DEBUG: *<debug> [*] kill child process 'test-s-1-3' (*): waiting up to 1 milliseconds for process to terminate normally after sending no signal (0)...
    Bail out! test:ERROR:../src/tests/test-core-with-expect.c:457:test_nm_utils_kill_child: assertion failed (exit_status == 0): (6 == 0)
    --- stderr ---
    **
    GLib:ERROR:../src/tests/test-core-with-expect.c:154:test_nm_utils_kill_child_sync_do: Did not see expected message NetworkManager-DEBUG: *<debug> [*] kill child process 'test-s-1-3' (*): waiting up to 1 milliseconds for process to terminate normally after sending no signal (0)...
    **
    test:ERROR:../src/tests/test-core-with-expect.c:457:test_nm_utils_kill_child: assertion failed (exit_status == 0): (6 == 0)
    /builds/NetworkManager/NetworkManager/tools/run-nm-test.sh: line 279: 18325 Aborted                 "${NMTST_DBUS_RUN_SESSION[@]}" "${NMTST_LIBTOOL[@]}" "$NMTST_VALGRIND" --quiet --error-exitcode=$VALGRIND_ERROR --leak-check=full --gen-suppressions=all "${NMTST_SUPPRESSIONS[@]}" --num-callers=100 --log-file="$LOGFILE" "$TEST" "$@"
parent 29282698
Pipeline #210426 passed with stages
in 52 minutes and 30 seconds
......@@ -236,7 +236,7 @@ do_test_nm_utils_kill_child(void)
char *argv1[] = {
"bash",
"-c",
"trap \"sleep 0.3; exit 10\" EXIT; "
"trap \"sleep 0.5; exit 10\" EXIT; "
"sleep 100000; exit $? #" TEST_TOKEN,
NULL,
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment