From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v1 3/4] tools/gap-tester: Enable hciemu debug output
Date: Tue, 5 May 2026 16:47:18 -0400 [thread overview]
Message-ID: <20260505204719.1348473-3-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20260505204719.1348473-1-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Add print_debug callback and call hciemu_set_debug when debug output is
enabled so that hciemu error paths are visible during test runs.
---
tools/gap-tester.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/tools/gap-tester.c b/tools/gap-tester.c
index 942c37d270b8..8c69765aa9c2 100644
--- a/tools/gap-tester.c
+++ b/tools/gap-tester.c
@@ -23,11 +23,21 @@ static GDBusProxy *adapter_proxy = NULL;
static struct hciemu *hciemu_stack = NULL;
+static void print_debug(const char *str, void *user_data)
+{
+ const char *prefix = user_data;
+
+ tester_print("%s%s", prefix, str);
+}
+
static void connect_handler(DBusConnection *connection, void *user_data)
{
tester_print("Connected to daemon");
hciemu_stack = hciemu_new(HCIEMU_TYPE_BREDRLE);
+
+ if (tester_use_debug())
+ hciemu_set_debug(hciemu_stack, print_debug, "hciemu: ", NULL);
}
static void disconnect_handler(DBusConnection *connection, void *user_data)
--
2.53.0
next prev parent reply other threads:[~2026-05-05 20:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-05 20:47 [PATCH BlueZ v1 1/4] emulator/vhci: Add debug messages to error paths Luiz Augusto von Dentz
2026-05-05 20:47 ` [PATCH BlueZ v1 2/4] emulator/hciemu: " Luiz Augusto von Dentz
2026-05-05 20:47 ` Luiz Augusto von Dentz [this message]
2026-05-05 20:47 ` [PATCH BlueZ v1 4/4] tools/userchan-tester: Enable hciemu debug output Luiz Augusto von Dentz
2026-05-05 21:53 ` [BlueZ,v1,1/4] emulator/vhci: Add debug messages to error paths bluez.test.bot
2026-05-06 13:30 ` [PATCH BlueZ v1 1/4] " patchwork-bot+bluetooth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260505204719.1348473-3-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox