From: Adeel Kazmi Date: Mon, 23 Jan 2023 18:08:58 +0000 (+0000) Subject: (Automated Tests) Ensure we kill off any sleeping dbus sessions that we create when... X-Git-Tag: dali_2.2.12~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=b4055d0a5a5cf474aebd6f754352f310e8926607;p=platform%2Fcore%2Fuifw%2Fdali-core.git (Automated Tests) Ensure we kill off any sleeping dbus sessions that we create when running Change-Id: Iac299a0ea3f57505fdb0e906d22a38f0a21946f4 --- diff --git a/automated-tests/execute.sh b/automated-tests/execute.sh index 35b4939..152b052 100755 --- a/automated-tests/execute.sh +++ b/automated-tests/execute.sh @@ -187,6 +187,19 @@ else done echo $1 not found fi + + # Kill off any dangling or sleeping dbus sessions that we would have created + cgroup=$(awk -F ':' '$2 == "name=systemd" { print $3 }' /proc/self/cgroup) + if [ -n "$cgroup" ] ; then + for pid in $(cat /sys/fs/cgroup/systemd/$cgroup/tasks 2>/dev/null); do + comm=$(cat /proc/$pid/comm 2>/dev/null) + case "$comm" in + dbus-daemon|dbus-launch) + kill $pid + ;; + esac + done + fi fi if [ -f summary.xml ] ; then