Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ 0/2] Test links completing after their connection was aborted
@ 2026-10-08 21:57 Hitalo Souza
  2026-10-08 21:57 ` [PATCH BlueZ 1/2] tools/sco-tester: Add test closing the socket before the link is up Hitalo Souza
  2026-10-08 21:57 ` [PATCH BlueZ 2/2] tools/l2cap-tester: Add tests closing the socket before the link is up Hitalo Souza
  0 siblings, 2 replies; 4+ messages in thread
From: Hitalo Souza @ 2026-10-08 21:57 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: luiz.dentz, Hitalo Souza

Luiz asked for tests that abort a connection while its connection
complete event is pending [1], for the kernel series "Bluetooth: Fix
SCO setup failures after an abandoned setup" [2]. These close the
socket while the emulator holds that event, by sleeping in the event
hook as hook_delay_evt() does, so that the kernel aborts the connection
before the link comes up. They expect the kernel to disconnect the
link, which no connection takes:

  eSCO CVSD - Close Before Complete
  L2CAP BR/EDR Client - Close Before Complete
  L2CAP LE Client - Close Before Complete

Results in a QEMU VM on bluetooth-next (c85976511aa9), without and with
v2 of the series:

                       without    with v2
  sco-tester (31)      30 pass    31 pass
  l2cap-tester (113)   111 pass   113 pass

Without the series the three new tests time out, and btmon shows no
Disconnect for the link. Repeated 20 times each with the CPUs loaded,
they passed every time with v2 and timed out every time without it.

The incoming case of patch 5 of v2, a connection aborted after it was
accepted, is not covered: the emulator answers Create Connection Cancel
only after it sends the held Connection Complete, so the connection is
still there when its link completes, which is the case of patch 3.
iso-tester is unchanged, as the series does not touch CIS or BIS.

[1] https://lore.kernel.org/linux-bluetooth/CABBYNZK9Oy2iL5PosxRy1KPup0PgYDfPUxeHemjYjKyAUu4+=Q@mail.gmail.com/
[2] https://lore.kernel.org/linux-bluetooth/20261008151238.2138665-1-enghitalo@gmail.com/

Hitalo Souza (2):
  tools/sco-tester: Add test closing the socket before the link is up
  tools/l2cap-tester: Add tests closing the socket before the link is up

 tools/l2cap-tester.c | 107 +++++++++++++++++++++++++++++++++++++++++++
 tools/sco-tester.c   |  45 ++++++++++++++++++
 2 files changed, 152 insertions(+)

-- 
2.55.0


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

end of thread, other threads:[~2026-10-09  2:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-08 21:57 [PATCH BlueZ 0/2] Test links completing after their connection was aborted Hitalo Souza
2026-10-08 21:57 ` [PATCH BlueZ 1/2] tools/sco-tester: Add test closing the socket before the link is up Hitalo Souza
2026-10-09  2:28   ` Test links completing after their connection was aborted bluez.test.bot
2026-10-08 21:57 ` [PATCH BlueZ 2/2] tools/l2cap-tester: Add tests closing the socket before the link is up Hitalo Souza

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