diff mbox series

[BlueZ] test-runner: Fix not waiting for system_bus_socket

Message ID 20220601211230.1355268-1-luiz.dentz@gmail.com
State New
Headers show
Series [BlueZ] test-runner: Fix not waiting for system_bus_socket | expand

Commit Message

Luiz Augusto von Dentz June 1, 2022, 9:12 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This makes test-runner wait for system_bus_socket to be available before
continuing otherwise the likes of bluetoothd would likely fail to start.
---
 tools/test-runner.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

patchwork-bot+bluetooth@kernel.org June 2, 2022, 7:10 p.m. UTC | #1
Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed,  1 Jun 2022 14:12:30 -0700 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> This makes test-runner wait for system_bus_socket to be available before
> continuing otherwise the likes of bluetoothd would likely fail to start.
> ---
>  tools/test-runner.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Here is the summary with links:
  - [BlueZ] test-runner: Fix not waiting for system_bus_socket
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=7bcd32e67e93

You are awesome, thank you!
diff mbox series

Patch

diff --git a/tools/test-runner.c b/tools/test-runner.c
index 1f1a8c36f..945a16a77 100644
--- a/tools/test-runner.c
+++ b/tools/test-runner.c
@@ -452,13 +452,13 @@  static pid_t start_dbus_daemon(void)
 
 		if (!stat("/run/dbus/system_bus_socket", &st)) {
 			printf("Found D-Bus daemon socket\n");
-			break;
+			return pid;
 		}
 
-		usleep(25 * 1000);
+		sleep(1);
 	}
 
-	return pid;
+	return -1;
 }
 
 static const char *daemon_table[] = {