[neon/backports-focal/xdg-desktop-portal/Neon/unstable] tests: tests: use kill from PATH

Simon McVittie null at kde.org
Wed Jan 13 06:32:43 GMT 2021


Git commit 84de3e45d0e7dba73fc7bc4a16d8d57321daa23b by Simon McVittie, on behalf of Jan Tojnar.
Committed on 09/09/2020 at 12:01.
Pushed by ash into branch 'Neon/unstable'.

tests: use kill from PATH

It is not guaranteed that /bin/kill exists and we are already using the bash builtin elsewhere in the script.

M  +2    -2    tests/test-document-fuse.sh

https://invent.kde.org/neon/backports-focal/xdg-desktop-portal/commit/84de3e45d0e7dba73fc7bc4a16d8d57321daa23b

diff --git a/tests/test-document-fuse.sh b/tests/test-document-fuse.sh
index a571a16..cd51356 100755
--- a/tests/test-document-fuse.sh
+++ b/tests/test-document-fuse.sh
@@ -49,7 +49,7 @@ export XDG_RUNTIME_DIR=${TEST_DATA_DIR}/runtime
 cleanup () {
     fusermount -u $XDG_RUNTIME_DIR/doc || :
     sleep 0.1
-    /bin/kill -9 $DBUS_SESSION_BUS_PID
+    kill -9 $DBUS_SESSION_BUS_PID
     kill $(jobs -p) &> /dev/null || true
     rm -rf $TEST_DATA_DIR
 }
@@ -62,7 +62,7 @@ dbus-daemon --fork --config-file=session.conf --print-address=3 --print-pid=4 \
 export DBUS_SESSION_BUS_ADDRESS="$(cat dbus-session-bus-address)"
 DBUS_SESSION_BUS_PID="$(cat dbus-session-bus-pid)"
 
-if ! /bin/kill -0 "$DBUS_SESSION_BUS_PID"; then
+if ! kill -0 "$DBUS_SESSION_BUS_PID"; then
     assert_not_reached "Failed to start dbus-daemon"
 fi
 



More information about the Neon-commits mailing list