Make task-killing tests more reliable
test_execute_cmd_finished_before_killpg_sigkill assumed that its test
subprocess would finish exiting between the SIGKILL sent by the test
(due to wait_popen_sigkill=True) and the SIGTERM sent by
RunCommandTask._run_cmd. This was typically the case, but not always;
quite small perturbations such as adjusting the short timeout used by
RunCommandTaskForTesting._wait_popen could disturb it, and it
sometimes failed in CI.
The failure was just because RunCommandTask._run_cmd didn't log
"aborted:" and "returncode:" in the case where the task was aborted and
the subprocess didn't finish before _run_cmd sent SIGTERM to it. Try
harder to force this scenario in tests, and fix the logging.
Fixes: #458 (closed)
Closes: https://bugs.debian.org/1077903
Edited by Colin Watson