Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ] iso-tester: Accept ETIMEDOUT for Connection Failed to be Established
@ 2026-11-24  8:33 Simon Mikuda
  2026-11-24 11:37 ` [BlueZ] " bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Mikuda @ 2026-11-24  8:33 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Simon Mikuda

ISO Connect - Reject has the emulator reject the CIS with Connection
Failed to be Established (0x3e) and expects ENOSYS, which the kernel's
bt_to_errno() returns for any code it does not map.

The kernel patch "Bluetooth: lib: Map Connection Failed to be
Established to ETIMEDOUT" maps 0x3e to ETIMEDOUT like Connection
Timeout (0x08). Accept ETIMEDOUT as well as ENOSYS, since the tester
also runs on kernels without that patch.

Assisted-by: Claude:claude-opus-5-5
---
 tools/iso-tester.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/iso-tester.c b/tools/iso-tester.c
index bfc905643..92a937ee5 100644
--- a/tools/iso-tester.c
+++ b/tools/iso-tester.c
@@ -678,6 +678,7 @@ struct iso_client_data {
 	};
 	struct bt_iso_qos qos_2;
 	int expect_err;
+	int expect_err_alt;
 	const struct iovec *send;
 	const struct iovec *recv;
 	bool server;
@@ -1417,6 +1418,7 @@ static const struct iso_client_data connect_invalid = {
 
 static const struct iso_client_data connect_reject = {
 	.qos = QOS_16_1_2,
+	.expect_err_alt = -ETIMEDOUT,
 	.expect_err = -ENOSYS
 };
 
@@ -4096,7 +4098,9 @@ static bool iso_connect(struct tester_io *io, uint32_t cond,
 		tester_print("Successfully connected");
 	}
 
-	if (err != isodata->expect_err) {
+	if (err != isodata->expect_err &&
+			(!isodata->expect_err_alt ||
+			err != isodata->expect_err_alt)) {
 		tester_warn("Expect error: %s (%d) != %s (%d)",
 				strerror(-isodata->expect_err),
 				-isodata->expect_err, strerror(-err), -err);

base-commit: 1608f836188610aabeff5a3164169ebe0360e443
-- 
2.43.0


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

end of thread, other threads:[~2026-11-24 11:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24  8:33 [PATCH BlueZ] iso-tester: Accept ETIMEDOUT for Connection Failed to be Established Simon Mikuda
2026-11-24 11:37 ` [BlueZ] " bluez.test.bot

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