diff mbox series

dbus: Create the transient services directory before running ptests

Message ID 20261109024931.93787-1-khem.raj@oss.qualcomm.com
State New
Headers show
Series dbus: Create the transient services directory before running ptests | expand

Commit Message

Khem Raj Nov. 9, 2026, 2:49 a.m. UTC
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
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 meta/recipes-core/dbus/dbus/run-ptest | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-core/dbus/dbus/run-ptest b/meta/recipes-core/dbus/dbus/run-ptest
index 54f43e1f68..71e142a706 100755
--- a/meta/recipes-core/dbus/dbus/run-ptest
+++ b/meta/recipes-core/dbus/dbus/run-ptest
@@ -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