public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v1] test-uhid: Fix attempting to run when bt_uhid is NULL
@ 2024-08-23 15:20 Luiz Augusto von Dentz
  2024-08-23 17:07 ` [BlueZ,v1] " bluez.test.bot
  2024-08-23 20:20 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2024-08-23 15:20 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

When running under root there is a possibility the bt_uhid_new_default
doesn't work (e.g. fakeroot) in which case the test shall be aborted
since it is likely a device specific test case which would require
proper permissions to run.
---
 unit/test-uhid.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/unit/test-uhid.c b/unit/test-uhid.c
index 2765feb72b06..6871c22eeaa1 100644
--- a/unit/test-uhid.c
+++ b/unit/test-uhid.c
@@ -201,6 +201,11 @@ static struct context *create_context(gconstpointer data)
 	 */
 	if (test_data->test_device && !uid) {
 		context->uhid = bt_uhid_new_default();
+		if (!context->uhid) {
+			tester_test_abort();
+			context_quit(context);
+			return NULL;
+		}
 		return context;
 	}
 
@@ -255,9 +260,13 @@ static const struct uhid_event ev_feature = {
 static void test_client(gconstpointer data)
 {
 	struct context *context = create_context(data);
-	struct test_device *device = context->data->test_device;
+	struct test_device *device;
 	int err;
 
+	if (!context)
+		return;
+
+	device = context->data->test_device;
 	if (device)
 		err = bt_uhid_create(context->uhid, device->name,
 					BDADDR_ANY, BDADDR_ANY,
-- 
2.46.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [BlueZ,v1] test-uhid: Fix attempting to run when bt_uhid is NULL
  2024-08-23 15:20 [PATCH BlueZ v1] test-uhid: Fix attempting to run when bt_uhid is NULL Luiz Augusto von Dentz
@ 2024-08-23 17:07 ` bluez.test.bot
  2024-08-23 20:20 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2024-08-23 17:07 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

[-- Attachment #1: Type: text/plain, Size: 949 bytes --]

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=882708

---Test result---

Test Summary:
CheckPatch                    PASS      0.50 seconds
GitLint                       PASS      0.34 seconds
BuildEll                      PASS      25.18 seconds
BluezMake                     PASS      1727.35 seconds
MakeCheck                     PASS      13.79 seconds
MakeDistcheck                 PASS      182.82 seconds
CheckValgrind                 PASS      256.54 seconds
CheckSmatch                   PASS      357.55 seconds
bluezmakeextell               PASS      120.85 seconds
IncrementalBuild              PASS      1491.88 seconds
ScanBuild                     PASS      1051.32 seconds



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH BlueZ v1] test-uhid: Fix attempting to run when bt_uhid is NULL
  2024-08-23 15:20 [PATCH BlueZ v1] test-uhid: Fix attempting to run when bt_uhid is NULL Luiz Augusto von Dentz
  2024-08-23 17:07 ` [BlueZ,v1] " bluez.test.bot
@ 2024-08-23 20:20 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2024-08-23 20:20 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hello:

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

On Fri, 23 Aug 2024 11:20:06 -0400 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> When running under root there is a possibility the bt_uhid_new_default
> doesn't work (e.g. fakeroot) in which case the test shall be aborted
> since it is likely a device specific test case which would require
> proper permissions to run.
> 
> [...]

Here is the summary with links:
  - [BlueZ,v1] test-uhid: Fix attempting to run when bt_uhid is NULL
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=4ed7060ca9df

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-23 20:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-23 15:20 [PATCH BlueZ v1] test-uhid: Fix attempting to run when bt_uhid is NULL Luiz Augusto von Dentz
2024-08-23 17:07 ` [BlueZ,v1] " bluez.test.bot
2024-08-23 20:20 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox