2022-06-17 19:53:34

by Frédéric Danis

[permalink] [raw]
Subject: [PATCH BlueZ] test-runner: Fix issues found by coverity

---
tools/test-runner.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/tools/test-runner.c b/tools/test-runner.c
index 49fc21325..6886d66c6 100644
--- a/tools/test-runner.c
+++ b/tools/test-runner.c
@@ -275,6 +275,10 @@ static void start_qemu(void)
char *xdg_runtime_dir, *audiodev;

xdg_runtime_dir = getenv("XDG_RUNTIME_DIR");
+ if (!xdg_runtime_dir) {
+ fprintf(stderr, "XDG_RUNTIME_DIR not set\n");
+ exit(1);
+ }
audiodev = alloca(40 + strlen(xdg_runtime_dir));
sprintf(audiodev, "id=audio,driver=pa,server=%s/pulse/native",
xdg_runtime_dir);
@@ -474,8 +478,14 @@ static void create_dbus_session_conf(void)
"/usr/share/dbus-1/session.conf") < 0)
perror("Failed to create session.conf symlink");

- mkdir("/run/user", 0755);
- mkdir("/run/user/0", 0755);
+ if (mkdir("/run/user", 0755) < 0) {
+ fprintf(stderr, "unable to create /run/user directory\n");
+ return;
+ }
+ if (mkdir("/run/user/0", 0755) < 0) {
+ fprintf(stderr, "unable to create /run/user/0 directory\n");
+ return;
+ }
}

static pid_t start_dbus_daemon(bool session)
@@ -919,7 +929,7 @@ start_next:

if (corpse == dbus_session_pid) {
printf("D-Bus session daemon terminated\n");
- dbus_pid = -1;
+ dbus_session_pid = -1;
}

if (corpse == daemon_pid) {
--
2.25.1


2022-06-17 21:31:05

by bluez.test.bot

[permalink] [raw]
Subject: RE: [BlueZ] test-runner: Fix issues found by coverity

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=651543

---Test result---

Test Summary:
CheckPatch PASS 1.62 seconds
GitLint PASS 1.03 seconds
Prep - Setup ELL PASS 43.93 seconds
Build - Prep PASS 0.71 seconds
Build - Configure PASS 8.76 seconds
Build - Make PASS 1362.74 seconds
Make Check PASS 12.30 seconds
Make Check w/Valgrind PASS 456.93 seconds
Make Distcheck PASS 239.35 seconds
Build w/ext ELL - Configure PASS 8.90 seconds
Build w/ext ELL - Make PASS 1322.51 seconds
Incremental Build with patchesPASS 0.00 seconds



---
Regards,
Linux Bluetooth

2022-06-17 23:22:11

by patchwork-bot+bluetooth

[permalink] [raw]
Subject: Re: [PATCH BlueZ] test-runner: Fix issues found by coverity

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <[email protected]>:

On Fri, 17 Jun 2022 21:49:29 +0200 you wrote:
> ---
> tools/test-runner.c | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)

Here is the summary with links:
- [BlueZ] test-runner: Fix issues found by coverity
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=19ad4310c9b4

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html