Message ID | 20220617194929.95991-1-frederic.danis@collabora.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 19ad4310c9b461783bc73a570be8efffd32b1e42 |
Headers | show |
Series | [BlueZ] test-runner: Fix issues found by coverity | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/checkpatch | success | Checkpatch PASS |
tedd_an/gitlint | success | Gitlint PASS |
tedd_an/setupell | success | Setup ELL PASS |
tedd_an/buildprep | success | Build Prep PASS |
tedd_an/build | success | Build Configuration PASS |
tedd_an/makecheck | success | Make Check PASS |
tedd_an/makecheckvalgrind | success | Make Check PASS |
tedd_an/makedistcheck | success | Make Distcheck PASS |
tedd_an/build_extell | success | Build External ELL PASS |
tedd_an/build_extell_make | success | Build Make with External ELL PASS |
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
Hello: This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>: 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!
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) {