dbus: Create the transient services directory before running ptests
PATCH 1/1 dbus: Create the transient services directory before running ptests
integration/transient-services.sh bails out when
$XDG_RUNTIME_DIR/dbus-1/services does not exist:
Bail out! /run/user/0/dbus-1/services is not a directory
FAIL: dbus/integration/transient-services.sh_with_config.test
dbus-daemon creates that directory when it starts as a session bus. dbus-broker, which provides the user bus when VIRTUAL-RUNTIME_dbus is dbus-broker, reads service files from it but leaves creating it to its users. The test only passed when an earlier test in the randomized order had started a dbus-daemon with the session config and so created the directory.
Create it from run-ptest, owned by the user and mode 0700, the way dbus-daemon would.
AI-Generated: Uses Claude Code
--- meta/recipes-core/dbus/dbus/run-ptest | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
meta/recipes-core/dbus/dbus/run-ptest +7 -1
@@ -1,3 +1,9 @@ #!/bin/sh -gnome-desktop-testing-runner dbus +# dbus-daemon creates the transient services directory when it starts as the +# session bus, dbus-broker does not +if [ -n "$XDG_RUNTIME_DIR" ] && [ -O "$XDG_RUNTIME_DIR" ]; then + (umask 077 && mkdir -p "$XDG_RUNTIME_DIR/dbus-1/services") +fi + +gnome-desktop-testing-runner dbus