public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ 0/2] Fix bluetoothctl no output
@ 2026-02-27 11:27 Bastien Nocera
  2026-02-27 11:27 ` [PATCH BlueZ 1/2] Revert "shared/shell: Don't init input for non-interactive shells" Bastien Nocera
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Bastien Nocera @ 2026-02-27 11:27 UTC (permalink / raw)
  To: linux-bluetooth

This fixes a regression in 5.86, and works around a problem specific to
btmgmt.

Both commits can be tested independently using the regression test in
the meson port:
https://github.com/hadess/bluez/commits/wip/hadess/add-integration-tests/

Bastien Nocera (2):
  Revert "shared/shell: Don't init input for non-interactive shells"
  tools: Work-around broken stdin handling in home-made mainloop

 Makefile.tools     |  4 ++--
 src/shared/shell.c | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

-- 
2.53.0


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

* [PATCH BlueZ 1/2] Revert "shared/shell: Don't init input for non-interactive shells"
  2026-02-27 11:27 [PATCH BlueZ 0/2] Fix bluetoothctl no output Bastien Nocera
@ 2026-02-27 11:27 ` Bastien Nocera
  2026-02-27 12:40   ` Fix bluetoothctl no output bluez.test.bot
  2026-02-27 11:27 ` [PATCH BlueZ 2/2] tools: Work-around broken stdin handling in home-made mainloop Bastien Nocera
  2026-02-27 15:20 ` [PATCH BlueZ 0/2] Fix bluetoothctl no output patchwork-bot+bluetooth
  2 siblings, 1 reply; 5+ messages in thread
From: Bastien Nocera @ 2026-02-27 11:27 UTC (permalink / raw)
  To: linux-bluetooth

This reverts commit e73bf582dae60356641a32fc27ae03d359ec4c47.

The fix caused "bluetoothctl list" to not output any text, breaking
a lot of existing scripts.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2440346
---
 src/shared/shell.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/shared/shell.c b/src/shared/shell.c
index 78d58c513d3e..b061f8001414 100644
--- a/src/shared/shell.c
+++ b/src/shared/shell.c
@@ -1642,13 +1642,13 @@ static bool shell_quit(void *data)
 
 bool bt_shell_attach(int fd)
 {
-	if (data.mode == MODE_INTERACTIVE) {
-		struct input *input;
+	struct input *input;
 
-		input = input_new(fd);
-		if (!input)
-			return false;
+	input = input_new(fd);
+	if (!input)
+		return false;
 
+	if (data.mode == MODE_INTERACTIVE) {
 		io_set_read_handler(input->io, input_read, input, NULL);
 		io_set_disconnect_handler(input->io, input_hup, input, NULL);
 
-- 
2.53.0


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

* [PATCH BlueZ 2/2] tools: Work-around broken stdin handling in home-made mainloop
  2026-02-27 11:27 [PATCH BlueZ 0/2] Fix bluetoothctl no output Bastien Nocera
  2026-02-27 11:27 ` [PATCH BlueZ 1/2] Revert "shared/shell: Don't init input for non-interactive shells" Bastien Nocera
@ 2026-02-27 11:27 ` Bastien Nocera
  2026-02-27 15:20 ` [PATCH BlueZ 0/2] Fix bluetoothctl no output patchwork-bot+bluetooth
  2 siblings, 0 replies; 5+ messages in thread
From: Bastien Nocera @ 2026-02-27 11:27 UTC (permalink / raw)
  To: linux-bluetooth

bluetoothd has 3 mainloop implementations, one relying on ell, one
relying on glib, and another home-made.

The home-made mainloop handler use epoll() without any fallbacks, and
will hang if one tries to epoll() an stdin that redirects from
/dev/null.

Closes: https://github.com/bluez/bluez/issues/700
---
 Makefile.tools | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.tools b/Makefile.tools
index 589f7c94f9df..7c52e053ffee 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -531,8 +531,8 @@ tools_obexctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \
 
 tools_btmgmt_SOURCES = tools/btmgmt.c src/uuid-helper.c client/display.c \
 			client/mgmt.c
-tools_btmgmt_LDADD = lib/libbluetooth-internal.la src/libshared-mainloop.la \
-				-lreadline
+tools_btmgmt_LDADD = lib/libbluetooth-internal.la src/libshared-glib.la \
+				$(GLIB_LIBS) -lreadline
 if DEPRECATED
 noinst_PROGRAMS += attrib/gatttool
 
-- 
2.53.0


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

* RE: Fix bluetoothctl no output
  2026-02-27 11:27 ` [PATCH BlueZ 1/2] Revert "shared/shell: Don't init input for non-interactive shells" Bastien Nocera
@ 2026-02-27 12:40   ` bluez.test.bot
  0 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2026-02-27 12:40 UTC (permalink / raw)
  To: linux-bluetooth, hadess

[-- Attachment #1: Type: text/plain, Size: 1622 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=1058931

---Test result---

Test Summary:
CheckPatch                    PENDING   0.27 seconds
GitLint                       PENDING   0.35 seconds
BuildEll                      PASS      22.00 seconds
BluezMake                     PASS      738.49 seconds
MakeCheck                     PASS      19.00 seconds
MakeDistcheck                 PASS      264.31 seconds
CheckValgrind                 PASS      309.83 seconds
CheckSmatch                   WARNING   374.42 seconds
bluezmakeextell               PASS      194.64 seconds
IncrementalBuild              PENDING   0.35 seconds
ScanBuild                     PASS      1120.04 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
src/shared/shell.c: note: in included file (through /usr/include/readline/readline.h):src/shared/shell.c: note: in included file (through /usr/include/readline/readline.h):src/shared/shell.c: note: in included file (through /usr/include/readline/readline.h):
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


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

* Re: [PATCH BlueZ 0/2] Fix bluetoothctl no output
  2026-02-27 11:27 [PATCH BlueZ 0/2] Fix bluetoothctl no output Bastien Nocera
  2026-02-27 11:27 ` [PATCH BlueZ 1/2] Revert "shared/shell: Don't init input for non-interactive shells" Bastien Nocera
  2026-02-27 11:27 ` [PATCH BlueZ 2/2] tools: Work-around broken stdin handling in home-made mainloop Bastien Nocera
@ 2026-02-27 15:20 ` patchwork-bot+bluetooth
  2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+bluetooth @ 2026-02-27 15:20 UTC (permalink / raw)
  To: Bastien Nocera; +Cc: linux-bluetooth

Hello:

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

On Fri, 27 Feb 2026 12:27:16 +0100 you wrote:
> This fixes a regression in 5.86, and works around a problem specific to
> btmgmt.
> 
> Both commits can be tested independently using the regression test in
> the meson port:
> https://github.com/hadess/bluez/commits/wip/hadess/add-integration-tests/
> 
> [...]

Here is the summary with links:
  - [BlueZ,1/2] Revert "shared/shell: Don't init input for non-interactive shells"
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=b33e923b55e4
  - [BlueZ,2/2] tools: Work-around broken stdin handling in home-made mainloop
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=21e13976f2e3

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] 5+ messages in thread

end of thread, other threads:[~2026-02-27 15:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-27 11:27 [PATCH BlueZ 0/2] Fix bluetoothctl no output Bastien Nocera
2026-02-27 11:27 ` [PATCH BlueZ 1/2] Revert "shared/shell: Don't init input for non-interactive shells" Bastien Nocera
2026-02-27 12:40   ` Fix bluetoothctl no output bluez.test.bot
2026-02-27 11:27 ` [PATCH BlueZ 2/2] tools: Work-around broken stdin handling in home-made mainloop Bastien Nocera
2026-02-27 15:20 ` [PATCH BlueZ 0/2] Fix bluetoothctl no output 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