Skip to content
Snippets Groups Projects
Commit fac25875 authored by Philip Withnall's avatar Philip Withnall Committed by Sjoerd Simons
Browse files

traffic-control: Ignore failure to kill tcdemo processes

When cleaning up, ignore failure to kill tcdemo processes, caused by
them already exiting or being killed earlier on. This fixes all test
cases after the first one in the traffic-control-tcdemo unit test
running.

Bug: https://bugs.apertis.org/show_bug.cgi?id=328
Differential Revision: https://phabricator.apertis.org/D430


Signed-off-by: default avatarPhilip Withnall <philip.withnall@collabora.co.uk>
Reviewed-by: default avatarSjoerd Simons <sjoerd.simons@collabora.com>
parent 9cbc04a0
No related branches found
No related tags found
No related merge requests found
......@@ -20,15 +20,15 @@ _kill_procs() {
for proc in "${ROOT_PROC_KILL_LIST[@]}"; do
if ps -p $proc >/dev/null; then
# Let sudo a chance to kill its child
sudo kill -SIGINT $proc
sudo kill -SIGINT $proc || true
sleep 0.2
sudo kill -SIGKILL $proc
sudo kill -SIGKILL $proc || true
fi
done
for proc in "${PROC_KILL_LIST[@]}"; do
if ps -p $proc >/dev/null; then
# Only killing wget here. No need for sudo.
kill $proc
kill $proc || true
fi
done
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment