All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ 0/8] Split bt_iso_qos into dedicated structures
@ 2023-03-20 14:37 Iulia Tanasescu
  2023-03-20 14:37 ` [PATCH BlueZ 1/8] btio: Use unicast structure for ISO QoS options Iulia Tanasescu
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Iulia Tanasescu @ 2023-03-20 14:37 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Iulia Tanasescu

This patch series updates the use of the bt_iso_qos structure,
which has been split into dedicated unicast and broadcast structures
as part of the Bluetooth kernel patch:
[PATCH] Split bt_iso_qos into dedicated structures.

This patch series depends on the Bluetooth kernel patch
[PATCH] Split bt_iso_qos into dedicated structures.

Iulia Tanasescu (8):
  btio: Use unicast structure for ISO QoS options
  client/player: Use unicast structure for ISO QoS options
  emulator/bthost: pass unicast QoS structure to bthost_set_cig_params
  lib: split bt_iso_qos into dedicated structures
  profiles/audio/bap: Use unicast structure for ISO QoS options
  tools/btiotest: Use unicast QoS structure for ISO io
  tools/isotest: Use dedicated ISO QoS options for unicast and broadcast
  tools/iso-tester: Use dedicated ISO QoS options for unicast and
    broadcast

 btio/btio.c          |  20 ++--
 client/player.c      |  16 +--
 emulator/bthost.c    |   3 +-
 emulator/bthost.h    |   3 +-
 lib/bluetooth.h      |  50 +++++---
 profiles/audio/bap.c |  13 ++-
 tools/btiotest.c     |   5 +-
 tools/iso-tester.c   | 270 ++++++++++++++++++++++++++++++++-----------
 tools/isotest.c      | 159 +++++++++++++++++++------
 9 files changed, 395 insertions(+), 144 deletions(-)


base-commit: 806230e4fda7a2fafeb7f1da3d2f17a1bafb25f8
-- 
2.34.1


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

* [PATCH BlueZ 1/8] btio: Use unicast structure for ISO QoS options
  2023-03-20 14:37 [PATCH BlueZ 0/8] Split bt_iso_qos into dedicated structures Iulia Tanasescu
@ 2023-03-20 14:37 ` Iulia Tanasescu
  2023-03-20 15:11   ` Split bt_iso_qos into dedicated structures bluez.test.bot
  2023-03-20 14:37 ` [PATCH BlueZ 2/8] client/player: Use unicast structure for ISO QoS options Iulia Tanasescu
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 14+ messages in thread
From: Iulia Tanasescu @ 2023-03-20 14:37 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Iulia Tanasescu

Convert the generic bt_iso_qos structure into the dedicated unicast
structure for ISO QoS options.

---
 btio/btio.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/btio/btio.c b/btio/btio.c
index 1ad42728d..017b53a54 100644
--- a/btio/btio.c
+++ b/btio/btio.c
@@ -5,6 +5,7 @@
  *
  *  Copyright (C) 2009-2010  Marcel Holtmann <marcel@holtmann.org>
  *  Copyright (C) 2009-2010  Nokia Corporation
+ *  Copyright 2023 NXP
  *
  *
  */
@@ -68,7 +69,7 @@ struct set_opts {
 	int flushable;
 	uint32_t priority;
 	uint16_t voice;
-	struct bt_iso_qos qos;
+	struct bt_iso_unicast_qos qos;
 };
 
 struct connect {
@@ -857,11 +858,11 @@ voice:
 	return TRUE;
 }
 
-static gboolean iso_set(int sock, struct bt_iso_qos *qos, GError **err)
+static gboolean iso_set(int sock, struct bt_iso_unicast_qos *qos, GError **err)
 {
-	if (setsockopt(sock, SOL_BLUETOOTH, BT_ISO_QOS, qos,
+	if (setsockopt(sock, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, qos,
 				sizeof(*qos)) < 0) {
-		ERROR_FAILED(err, "setsockopt(BT_ISO_QOS)", errno);
+		ERROR_FAILED(err, "setsockopt(BT_ISO_UNICAST_QOS)", errno);
 		return FALSE;
 	}
 
@@ -963,7 +964,7 @@ static gboolean parse_set_opts(struct set_opts *opts, GError **err,
 			opts->voice = va_arg(args, int);
 			break;
 		case BT_IO_OPT_QOS:
-			opts->qos = *va_arg(args, struct bt_iso_qos *);
+			opts->qos = *va_arg(args, struct bt_iso_unicast_qos *);
 			break;
 		case BT_IO_OPT_INVALID:
 		case BT_IO_OPT_KEY_SIZE:
@@ -1570,14 +1571,15 @@ static gboolean iso_get(int sock, GError **err, BtIOOption opt1, va_list args)
 {
 	BtIOOption opt = opt1;
 	struct sockaddr_iso src, dst;
-	struct bt_iso_qos qos;
+	struct bt_iso_unicast_qos qos;
 	socklen_t len;
 	uint32_t phy;
 
 	len = sizeof(qos);
 	memset(&qos, 0, len);
-	if (getsockopt(sock, SOL_BLUETOOTH, BT_ISO_QOS, &qos, &len) < 0) {
-		ERROR_FAILED(err, "getsockopt(BT_ISO_QOS)", errno);
+	if (getsockopt(sock, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, &qos,
+							&len) < 0) {
+		ERROR_FAILED(err, "getsockopt(BT_ISO_UNICAST_QOS)", errno);
 		return FALSE;
 	}
 
@@ -1624,7 +1626,7 @@ static gboolean iso_get(int sock, GError **err, BtIOOption opt1, va_list args)
 			*(va_arg(args, uint32_t *)) = phy;
 			break;
 		case BT_IO_OPT_QOS:
-			*(va_arg(args, struct bt_iso_qos *)) = qos;
+			*(va_arg(args, struct bt_iso_unicast_qos *)) = qos;
 			break;
 		case BT_IO_OPT_HANDLE:
 		case BT_IO_OPT_CLASS:
-- 
2.34.1


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

* [PATCH BlueZ 2/8] client/player: Use unicast structure for ISO QoS options
  2023-03-20 14:37 [PATCH BlueZ 0/8] Split bt_iso_qos into dedicated structures Iulia Tanasescu
  2023-03-20 14:37 ` [PATCH BlueZ 1/8] btio: Use unicast structure for ISO QoS options Iulia Tanasescu
@ 2023-03-20 14:37 ` Iulia Tanasescu
  2023-03-20 14:37 ` [PATCH BlueZ 3/8] emulator/bthost: pass unicast QoS structure to bthost_set_cig_params Iulia Tanasescu
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Iulia Tanasescu @ 2023-03-20 14:37 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Iulia Tanasescu

Convert the generic bt_iso_qos structure into the dedicated unicast
structure for ISO QoS options.

---
 client/player.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/client/player.c b/client/player.c
index 63e11db09..83b6092a4 100644
--- a/client/player.c
+++ b/client/player.c
@@ -4,6 +4,7 @@
  *  BlueZ - Bluetooth protocol stack for Linux
  *
  *  Copyright (C) 2020  Intel Corporation. All rights reserved.
+ *  Copyright 2023 NXP
  *
  *
  */
@@ -3506,7 +3507,7 @@ static int transport_send_seq(struct transport *transport, int fd, uint32_t num)
 static bool transport_timer_read(struct io *io, void *user_data)
 {
 	struct transport *transport = user_data;
-	struct bt_iso_qos qos;
+	struct bt_iso_unicast_qos qos;
 	socklen_t len;
 	int ret, fd;
 	uint32_t num;
@@ -3526,9 +3527,10 @@ static bool transport_timer_read(struct io *io, void *user_data)
 	/* Read QoS if available */
 	memset(&qos, 0, sizeof(qos));
 	len = sizeof(qos);
-	if (getsockopt(transport->sk, SOL_BLUETOOTH, BT_ISO_QOS, &qos,
+	if (getsockopt(transport->sk, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, &qos,
 							&len) < 0) {
-		bt_shell_printf("Failed to getsockopt(BT_ISO_QOS): %s (%d)\n",
+		bt_shell_printf("Failed to getsockopt(BT_ISO_UNICAST_QOS):"
+					"%s (%d)\n",
 					strerror(errno), -errno);
 		return false;
 	}
@@ -3552,7 +3554,7 @@ static bool transport_timer_read(struct io *io, void *user_data)
 }
 
 static int transport_send(struct transport *transport, int fd,
-					struct bt_iso_qos *qos)
+					struct bt_iso_unicast_qos *qos)
 {
 	struct itimerspec ts;
 	int timer_fd;
@@ -3591,7 +3593,7 @@ static void cmd_send_transport(int argc, char *argv[])
 	GDBusProxy *proxy;
 	struct transport *transport;
 	int fd = -1, err;
-	struct bt_iso_qos qos;
+	struct bt_iso_unicast_qos qos;
 	socklen_t len;
 	int i;
 
@@ -3626,8 +3628,8 @@ static void cmd_send_transport(int argc, char *argv[])
 		/* Read QoS if available */
 		memset(&qos, 0, sizeof(qos));
 		len = sizeof(qos);
-		if (getsockopt(transport->sk, SOL_BLUETOOTH, BT_ISO_QOS, &qos,
-							&len) < 0)
+		if (getsockopt(transport->sk, SOL_BLUETOOTH,
+				BT_ISO_UNICAST_QOS, &qos, &len) < 0)
 			err = transport_send(transport, fd, NULL);
 		else
 			err = transport_send(transport, fd, &qos);
-- 
2.34.1


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

* [PATCH BlueZ 3/8] emulator/bthost: pass unicast QoS structure to bthost_set_cig_params
  2023-03-20 14:37 [PATCH BlueZ 0/8] Split bt_iso_qos into dedicated structures Iulia Tanasescu
  2023-03-20 14:37 ` [PATCH BlueZ 1/8] btio: Use unicast structure for ISO QoS options Iulia Tanasescu
  2023-03-20 14:37 ` [PATCH BlueZ 2/8] client/player: Use unicast structure for ISO QoS options Iulia Tanasescu
@ 2023-03-20 14:37 ` Iulia Tanasescu
  2023-03-20 14:37 ` [PATCH BlueZ 4/8] lib: split bt_iso_qos into dedicated structures Iulia Tanasescu
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Iulia Tanasescu @ 2023-03-20 14:37 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Iulia Tanasescu

Update bthost_set_cig_params prototype to use the dedicated
unicast QoS structure.

---
 emulator/bthost.c | 3 ++-
 emulator/bthost.h | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/emulator/bthost.c b/emulator/bthost.c
index 4671fe17d..80e4a4963 100644
--- a/emulator/bthost.c
+++ b/emulator/bthost.c
@@ -5,6 +5,7 @@
  *
  *  Copyright (C) 2011-2012  Intel Corporation
  *  Copyright (C) 2004-2010  Marcel Holtmann <marcel@holtmann.org>
+ *  Copyright 2023 NXP
  *
  *
  */
@@ -3171,7 +3172,7 @@ bool bthost_search_ext_adv_addr(struct bthost *bthost, const uint8_t *addr)
 }
 
 void bthost_set_cig_params(struct bthost *bthost, uint8_t cig_id,
-				uint8_t cis_id, const struct bt_iso_qos *qos)
+			uint8_t cis_id, const struct bt_iso_unicast_qos *qos)
 {
 	struct bt_hci_cmd_le_set_cig_params *cp;
 
diff --git a/emulator/bthost.h b/emulator/bthost.h
index 92182687f..68aef62be 100644
--- a/emulator/bthost.h
+++ b/emulator/bthost.h
@@ -5,6 +5,7 @@
  *
  *  Copyright (C) 2011-2012  Intel Corporation
  *  Copyright (C) 2004-2010  Marcel Holtmann <marcel@holtmann.org>
+ *  Copyright 2023 NXP
  *
  *
  */
@@ -106,7 +107,7 @@ void bthost_create_big(struct bthost *bthost, uint8_t num_bis);
 bool bthost_search_ext_adv_addr(struct bthost *bthost, const uint8_t *addr);
 
 void bthost_set_cig_params(struct bthost *bthost, uint8_t cig_id,
-				uint8_t cis_id, const struct bt_iso_qos *qos);
+		uint8_t cis_id, const struct bt_iso_unicast_qos *qos);
 void bthost_create_cis(struct bthost *bthost, uint16_t cis_handle,
 						uint16_t acl_handle);
 
-- 
2.34.1


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

* [PATCH BlueZ 4/8] lib: split bt_iso_qos into dedicated structures
  2023-03-20 14:37 [PATCH BlueZ 0/8] Split bt_iso_qos into dedicated structures Iulia Tanasescu
                   ` (2 preceding siblings ...)
  2023-03-20 14:37 ` [PATCH BlueZ 3/8] emulator/bthost: pass unicast QoS structure to bthost_set_cig_params Iulia Tanasescu
@ 2023-03-20 14:37 ` Iulia Tanasescu
  2023-03-20 14:37 ` [PATCH BlueZ 5/8] profiles/audio/bap: Use unicast structure for ISO QoS options Iulia Tanasescu
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Iulia Tanasescu @ 2023-03-20 14:37 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Iulia Tanasescu

Split bt_iso_qos into dedicated unicast and broadcast structures.

---
 lib/bluetooth.h | 50 +++++++++++++++++++++++++++++++++++--------------
 1 file changed, 36 insertions(+), 14 deletions(-)

diff --git a/lib/bluetooth.h b/lib/bluetooth.h
index af5fbcfbc..d365d681a 100644
--- a/lib/bluetooth.h
+++ b/lib/bluetooth.h
@@ -6,6 +6,7 @@
  *  Copyright (C) 2000-2001  Qualcomm Incorporated
  *  Copyright (C) 2002-2003  Maxim Krasnyansky <maxk@qualcomm.com>
  *  Copyright (C) 2002-2010  Marcel Holtmann <marcel@holtmann.org>
+ *  Copyright 2023 NXP
  *
  *
  */
@@ -141,11 +142,17 @@ struct bt_voice {
 
 #define BT_SCM_PKT_STATUS	0x03
 
-#define BT_ISO_QOS		17
+#define BT_ISO_UNICAST_QOS		17
 
 #define BT_ISO_QOS_CIG_UNSET	0xff
 #define BT_ISO_QOS_CIS_UNSET	0xff
 
+#define BT_ISO_BCAST_SINK_QOS	18
+#define BT_ISO_BCAST_SOURCE_QOS	19
+
+#define BT_ISO_QOS_BIG_UNSET	0xff
+#define BT_ISO_QOS_BIS_UNSET	0xff
+
 struct bt_iso_io_qos {
 	uint32_t interval;
 	uint16_t latency;
@@ -154,25 +161,40 @@ struct bt_iso_io_qos {
 	uint8_t  rtn;
 };
 
-struct bt_iso_qos {
-	union {
-		uint8_t  cig;
-		uint8_t  big;
-	};
-	union {
-		uint8_t  cis;
-		uint8_t  bis;
-	};
-	union {
-		uint8_t  sca;
-		uint8_t  sync_interval;
-	};
+struct bt_iso_unicast_qos {
+	uint8_t  cig;
+	uint8_t  cis;
+	uint8_t  sca;
 	uint8_t  packing;
 	uint8_t  framing;
 	struct bt_iso_io_qos in;
 	struct bt_iso_io_qos out;
 };
 
+struct bt_iso_bcast_sink_qos {
+	uint8_t  options;
+	uint16_t skip;
+	uint16_t sync_timeout;
+	uint8_t  sync_cte_type;
+	uint8_t  big;
+	uint8_t  encryption;
+	uint8_t  bcode[16];
+	uint8_t  mse;
+	uint16_t timeout;
+	struct bt_iso_io_qos in;
+};
+
+struct bt_iso_bcast_source_qos {
+	uint8_t  sync_interval;
+	uint8_t  big;
+	uint8_t  bis;
+	uint8_t  packing;
+	uint8_t  framing;
+	uint8_t  encryption;
+	uint8_t  bcode[16];
+	struct bt_iso_io_qos out;
+};
+
 #define BT_CODEC		19
 struct bt_codec {
 	uint8_t id;
-- 
2.34.1


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

* [PATCH BlueZ 5/8] profiles/audio/bap: Use unicast structure for ISO QoS options
  2023-03-20 14:37 [PATCH BlueZ 0/8] Split bt_iso_qos into dedicated structures Iulia Tanasescu
                   ` (3 preceding siblings ...)
  2023-03-20 14:37 ` [PATCH BlueZ 4/8] lib: split bt_iso_qos into dedicated structures Iulia Tanasescu
@ 2023-03-20 14:37 ` Iulia Tanasescu
  2023-03-20 14:37 ` [PATCH BlueZ 6/8] tools/btiotest: Use unicast QoS structure for ISO io Iulia Tanasescu
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Iulia Tanasescu @ 2023-03-20 14:37 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Iulia Tanasescu

Convert the generic bt_iso_qos structure into the dedicated unicast
structure for ISO QoS options.

---
 profiles/audio/bap.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index dfdf87255..49003d351 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -4,6 +4,7 @@
  *  BlueZ - Bluetooth protocol stack for Linux
  *
  *  Copyright (C) 2022  Intel Corporation. All rights reserved.
+ *  Copyright 2023 NXP
  *
  *
  */
@@ -741,7 +742,7 @@ static void bap_iso_qos(struct bt_bap_qos *qos, struct bt_iso_io_qos *io)
 static bool match_stream_qos(const void *data, const void *user_data)
 {
 	const struct bt_bap_stream *stream = data;
-	const struct bt_iso_qos *iso_qos = user_data;
+	const struct bt_iso_unicast_qos *iso_qos = user_data;
 	struct bt_bap_qos *qos;
 
 	qos = bt_bap_stream_get_qos((void *)stream);
@@ -756,7 +757,7 @@ static void iso_confirm_cb(GIOChannel *io, void *user_data)
 {
 	struct bap_data *data = user_data;
 	struct bt_bap_stream *stream;
-	struct bt_iso_qos qos;
+	struct bt_iso_unicast_qos qos;
 	char address[18];
 	GError *err = NULL;
 
@@ -882,7 +883,7 @@ static void bap_connect_io_cb(GIOChannel *chan, GError *err, gpointer user_data)
 
 static void bap_connect_io(struct bap_data *data, struct bap_ep *ep,
 				struct bt_bap_stream *stream,
-				struct bt_iso_qos *qos, int defer)
+				struct bt_iso_unicast_qos *qos, int defer)
 {
 	struct btd_adapter *adapter = device_get_adapter(data->device);
 	GIOChannel *io;
@@ -939,7 +940,7 @@ static void bap_connect_io(struct bap_data *data, struct bap_ep *ep,
 }
 
 static void bap_listen_io(struct bap_data *data, struct bt_bap_stream *stream,
-						struct bt_iso_qos *qos)
+						struct bt_iso_unicast_qos *qos)
 {
 	struct btd_adapter *adapter = device_get_adapter(data->device);
 	GIOChannel *io;
@@ -974,7 +975,7 @@ static void bap_create_io(struct bap_data *data, struct bap_ep *ep,
 				struct bt_bap_stream *stream, int defer)
 {
 	struct bt_bap_qos *qos[2] = {};
-	struct bt_iso_qos iso_qos;
+	struct bt_iso_unicast_qos iso_qos;
 
 	DBG("ep %p stream %p defer %s", ep, stream, defer ? "true" : "false");
 
@@ -1178,7 +1179,7 @@ static void bap_connecting(struct bt_bap_stream *stream, bool state, int fd,
 	/* Attempt to get CIG/CIS if they have not been set */
 	if (ep->qos.cig_id == BT_ISO_QOS_CIG_UNSET ||
 				ep->qos.cis_id == BT_ISO_QOS_CIS_UNSET) {
-		struct bt_iso_qos qos;
+		struct bt_iso_unicast_qos qos;
 		GError *err = NULL;
 
 		if (!bt_io_get(io, &err, BT_IO_OPT_QOS, &qos,
-- 
2.34.1


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

* [PATCH BlueZ 6/8] tools/btiotest: Use unicast QoS structure for ISO io
  2023-03-20 14:37 [PATCH BlueZ 0/8] Split bt_iso_qos into dedicated structures Iulia Tanasescu
                   ` (4 preceding siblings ...)
  2023-03-20 14:37 ` [PATCH BlueZ 5/8] profiles/audio/bap: Use unicast structure for ISO QoS options Iulia Tanasescu
@ 2023-03-20 14:37 ` Iulia Tanasescu
  2023-03-20 14:37 ` [PATCH BlueZ 7/8] tools/isotest: Use dedicated ISO QoS options for unicast and broadcast Iulia Tanasescu
  2023-03-20 14:37 ` [PATCH BlueZ 8/8] tools/iso-tester: " Iulia Tanasescu
  7 siblings, 0 replies; 14+ messages in thread
From: Iulia Tanasescu @ 2023-03-20 14:37 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Iulia Tanasescu

Convert the generic bt_iso_qos structure into the dedicated unicast
structure for ISO QoS options.

---
 tools/btiotest.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/btiotest.c b/tools/btiotest.c
index 193e1395b..dd2c132ca 100644
--- a/tools/btiotest.c
+++ b/tools/btiotest.c
@@ -5,6 +5,7 @@
  *
  *  Copyright (C) 2009-2010  Marcel Holtmann <marcel@holtmann.org>
  *  Copyright (C) 2009-2010  Nokia Corporation
+ *  Copyright 2023 NXP
  *
  *
  */
@@ -38,7 +39,7 @@ static int opt_update_sec = 0;
 	.rtn = 2, \
 }
 
-struct bt_iso_qos qos = {
+struct bt_iso_unicast_qos qos = {
 	.cig = BT_ISO_QOS_CIG_UNSET,
 	.cis = BT_ISO_QOS_CIG_UNSET,
 	.sca = 0x07,
@@ -55,7 +56,7 @@ struct io_data {
 	int disconn;
 	int accept;
 	int voice;
-	struct bt_iso_qos *qos;
+	struct bt_iso_unicast_qos *qos;
 };
 
 static void io_data_unref(struct io_data *data)
-- 
2.34.1


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

* [PATCH BlueZ 7/8] tools/isotest: Use dedicated ISO QoS options for unicast and broadcast
  2023-03-20 14:37 [PATCH BlueZ 0/8] Split bt_iso_qos into dedicated structures Iulia Tanasescu
                   ` (5 preceding siblings ...)
  2023-03-20 14:37 ` [PATCH BlueZ 6/8] tools/btiotest: Use unicast QoS structure for ISO io Iulia Tanasescu
@ 2023-03-20 14:37 ` Iulia Tanasescu
  2023-03-20 14:37 ` [PATCH BlueZ 8/8] tools/iso-tester: " Iulia Tanasescu
  7 siblings, 0 replies; 14+ messages in thread
From: Iulia Tanasescu @ 2023-03-20 14:37 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Iulia Tanasescu

Convert the generic bt_iso_qos structure into dedicated ISO QoS structures
for unicast or broadcast.

---
 tools/isotest.c | 159 +++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 125 insertions(+), 34 deletions(-)

diff --git a/tools/isotest.c b/tools/isotest.c
index 2b5f164de..f12658812 100644
--- a/tools/isotest.c
+++ b/tools/isotest.c
@@ -4,6 +4,7 @@
  *  BlueZ - Bluetooth protocol stack for Linux
  *
  *  Copyright (C) 2022  Intel Corporation.
+ *  Copyright 2023 NXP
  *
  */
 
@@ -68,7 +69,7 @@ static int sndbuf;
 static struct timeval sndto;
 static bool quiet;
 
-struct bt_iso_qos *iso_qos;
+struct bt_iso_unicast_qos *iso_qos;
 static bool inout;
 
 struct lookup_table {
@@ -239,38 +240,94 @@ fail:
 	return err < 0 ? err : 0;
 }
 
-static void print_qos(int sk, struct sockaddr_iso *addr)
+static void print_unicast_qos(int sk)
 {
-	struct bt_iso_qos qos;
+	struct bt_iso_unicast_qos qos;
 	socklen_t len;
 
 	/* Read Out QOS */
 	memset(&qos, 0, sizeof(qos));
 	len = sizeof(qos);
 
-	if (getsockopt(sk, SOL_BLUETOOTH, BT_ISO_QOS, &qos, &len) < 0) {
+	if (getsockopt(sk, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, &qos, &len) < 0) {
 		syslog(LOG_ERR, "Can't get QoS socket option: %s (%d)",
 				strerror(errno), errno);
 		return;
 	}
 
-	if (!bacmp(&addr->iso_bdaddr, BDADDR_ANY)) {
-		syslog(LOG_INFO, "QoS BIG 0x%02x BIS 0x%02x Packing 0x%02x "
-			"Framing 0x%02x]", qos.big, qos.bis, qos.packing,
-			qos.framing);
-	} else {
-		syslog(LOG_INFO, "QoS CIG 0x%02x CIS 0x%02x Packing 0x%02x "
-			"Framing 0x%02x]", qos.cig, qos.cis, qos.packing,
-			qos.framing);
-		syslog(LOG_INFO, "Input QoS [Interval %u us Latency %u "
-			"ms SDU %u PHY 0x%02x RTN %u]", qos.in.interval,
-			qos.in.latency, qos.in.sdu, qos.in.phy, qos.in.rtn);
+	syslog(LOG_INFO, "QoS CIG 0x%02x CIS 0x%02x Packing 0x%02x "
+		"Framing 0x%02x]", qos.cig, qos.cis, qos.packing,
+		qos.framing);
+	syslog(LOG_INFO, "Input QoS [Interval %u us Latency %u "
+		"ms SDU %u PHY 0x%02x RTN %u]", qos.in.interval,
+		qos.in.latency, qos.in.sdu, qos.in.phy, qos.in.rtn);
+
+	syslog(LOG_INFO, "Output QoS [Interval %u us Latency %u "
+		"ms SDU %u PHY 0x%02x RTN %u]", qos.out.interval,
+		qos.out.latency, qos.out.sdu, qos.out.phy, qos.out.rtn);
+}
+
+static void print_bcast_source_qos(int sk)
+{
+	struct bt_iso_bcast_source_qos qos;
+	socklen_t len;
+
+	/* Read Out QOS */
+	memset(&qos, 0, sizeof(qos));
+	len = sizeof(qos);
+
+	if (getsockopt(sk, SOL_BLUETOOTH, BT_ISO_BCAST_SOURCE_QOS,
+						&qos, &len) < 0) {
+		syslog(LOG_ERR, "Can't get QoS socket option: %s (%d)",
+				strerror(errno), errno);
+		return;
 	}
+
+	syslog(LOG_INFO, "QoS BIG 0x%02x BIS 0x%02x Packing 0x%02x "
+		"Framing 0x%02x]", qos.big, qos.bis, qos.packing,
+		qos.framing);
+
 	syslog(LOG_INFO, "Output QoS [Interval %u us Latency %u "
 		"ms SDU %u PHY 0x%02x RTN %u]", qos.out.interval,
 		qos.out.latency, qos.out.sdu, qos.out.phy, qos.out.rtn);
 }
 
+static void print_bcast_sink_qos(int sk)
+{
+	struct bt_iso_bcast_sink_qos qos;
+	socklen_t len;
+
+	/* Read Out QOS */
+	memset(&qos, 0, sizeof(qos));
+	len = sizeof(qos);
+
+	if (getsockopt(sk, SOL_BLUETOOTH, BT_ISO_BCAST_SINK_QOS,
+						&qos, &len) < 0) {
+		syslog(LOG_ERR, "Can't get QoS socket option: %s (%d)",
+				strerror(errno), errno);
+		return;
+	}
+
+	syslog(LOG_INFO, "QoS BIG 0x%02x", qos.big);
+
+	syslog(LOG_INFO, "Input QoS [Interval %u us Latency %u "
+		"ms SDU %u PHY 0x%02x RTN %u]", qos.in.interval,
+		qos.in.latency, qos.in.sdu, qos.in.phy, qos.in.rtn);
+}
+
+static void unicast_qos_to_bcast_source(struct bt_iso_unicast_qos *unicast_qos,
+				struct bt_iso_bcast_source_qos *source_qos)
+{
+	memset(source_qos, 0, sizeof(*source_qos));
+
+	source_qos->sync_interval = unicast_qos->sca;
+	source_qos->big = unicast_qos->cig;
+	source_qos->bis = unicast_qos->cis;
+	source_qos->packing = unicast_qos->packing;
+	source_qos->framing = unicast_qos->framing;
+	source_qos->out = unicast_qos->out;
+}
+
 static int do_connect(char *peer)
 {
 	struct sockaddr_iso addr;
@@ -306,11 +363,25 @@ static int do_connect(char *peer)
 			iso_qos->in.sdu = 0;
 		}
 
-		if (setsockopt(sk, SOL_BLUETOOTH, BT_ISO_QOS, iso_qos,
-					sizeof(*iso_qos)) < 0) {
-			syslog(LOG_ERR, "Can't set QoS socket option: "
+		if (!strcmp(peer, "00:00:00:00:00:00")) {
+			struct bt_iso_bcast_source_qos source_qos;
+
+			unicast_qos_to_bcast_source(iso_qos, &source_qos);
+
+			if (setsockopt(sk, SOL_BLUETOOTH,
+					BT_ISO_BCAST_SOURCE_QOS, &source_qos,
+					sizeof(source_qos)) < 0) {
+				syslog(LOG_ERR, "Can't set QoS socket option: "
 					"%s (%d)", strerror(errno), errno);
-			goto error;
+				goto error;
+			}
+		} else {
+			if (setsockopt(sk, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS,
+					iso_qos, sizeof(*iso_qos)) < 0) {
+				syslog(LOG_ERR, "Can't set QoS socket option: "
+					"%s (%d)", strerror(errno), errno);
+				goto error;
+			}
 		}
 	}
 
@@ -338,7 +409,10 @@ static int do_connect(char *peer)
 
 	syslog(LOG_INFO, "Connected [%s]", peer);
 
-	print_qos(sk, &addr);
+	if (!strcmp(peer, "00:00:00:00:00:00"))
+		print_bcast_source_qos(sk);
+	else
+		print_unicast_qos(sk);
 
 	return sk;
 
@@ -441,7 +515,10 @@ static void do_listen(char *filename, void (*handler)(int fd, int sk),
 		ba2str(&addr->iso_bdaddr, ba);
 		syslog(LOG_INFO, "Connected [%s]", ba);
 
-		print_qos(nsk, addr);
+		if (peer)
+			print_bcast_sink_qos(nsk);
+		else
+			print_unicast_qos(nsk);
 
 		/* Handle deferred setup */
 		if (defer_setup) {
@@ -648,7 +725,7 @@ static int read_file(int fd, ssize_t count, bool rewind)
 	return len;
 }
 
-static void do_send(int sk, int fd, struct bt_iso_qos *qos, uint32_t num,
+static void do_send(int sk, int fd, struct bt_iso_io_qos *out, uint32_t num,
 		    bool repeat)
 {
 	uint32_t seq;
@@ -662,14 +739,14 @@ static void do_send(int sk, int fd, struct bt_iso_qos *qos, uint32_t num,
 
 	for (seq = 0; ; seq++) {
 		if (fd >= 0) {
-			len = read_file(fd, qos->out.sdu, repeat);
+			len = read_file(fd, out->sdu, repeat);
 			if (len < 0) {
 				syslog(LOG_ERR, "read failed: %s (%d)",
 						strerror(-len), -len);
 				exit(1);
 			}
 		} else
-			len = qos->out.sdu;
+			len = out->sdu;
 
 		len = send(sk, buf, len, 0);
 		if (len <= 0) {
@@ -686,16 +763,22 @@ static void do_send(int sk, int fd, struct bt_iso_qos *qos, uint32_t num,
 				seq, len, used / len, used);
 
 		if (seq && !((seq + 1) % num))
-			send_wait(&t_start, num * qos->out.interval);
+			send_wait(&t_start, num * out->interval);
 	}
 }
 
 static void send_mode(char *filename, char *peer, int i, bool repeat)
 {
-	struct bt_iso_qos qos;
+	struct bt_iso_io_qos *out;
 	socklen_t len;
 	int sk, fd = -1;
 	uint32_t num;
+	int optname;
+
+	union {
+		struct bt_iso_bcast_source_qos source_qos;
+		struct bt_iso_unicast_qos unicast_qos;
+	} qos;
 
 	if (filename) {
 		char altername[PATH_MAX];
@@ -728,16 +811,24 @@ static void send_mode(char *filename, char *peer, int i, bool repeat)
 	syslog(LOG_INFO, "Sending ...");
 
 	/* Read QoS */
+	if (!strcmp(peer, "00:00:00:00:00:00")) {
+		optname = BT_ISO_BCAST_SOURCE_QOS;
+		out = &qos.source_qos.out;
+	} else {
+		optname = BT_ISO_UNICAST_QOS;
+		out = &qos.unicast_qos.out;
+	}
+
 	memset(&qos, 0, sizeof(qos));
 	len = sizeof(qos);
-	if (getsockopt(sk, SOL_BLUETOOTH, BT_ISO_QOS, &qos, &len) < 0) {
+	if (getsockopt(sk, SOL_BLUETOOTH, optname, &qos, &len) < 0) {
 		syslog(LOG_ERR, "Can't get Output QoS socket option: %s (%d)",
 				strerror(errno), errno);
-		qos.out.sdu = ISO_DEFAULT_MTU;
+		out->sdu = ISO_DEFAULT_MTU;
 	}
 
 	/* num of packets = latency (ms) / interval (us) */
-	num = (qos.out.latency * 1000 / qos.out.interval);
+	num = (out->latency * 1000 / out->interval);
 
 	syslog(LOG_INFO, "Number of packets: %d", num);
 
@@ -746,8 +837,8 @@ static void send_mode(char *filename, char *peer, int i, bool repeat)
 		 * latency:
 		 * jitter buffer = 2 * (SDU * subevents)
 		 */
-		sndbuf = 2 * ((qos.out.latency * 1000 / qos.out.interval) *
-							qos.out.sdu);
+		sndbuf = 2 * ((out->latency * 1000 / out->interval) *
+							out->sdu);
 
 	len = sizeof(sndbuf);
 	if (setsockopt(sk, SOL_SOCKET, SO_SNDBUF, &sndbuf, len) < 0) {
@@ -768,10 +859,10 @@ static void send_mode(char *filename, char *peer, int i, bool repeat)
 		}
 	}
 
-	for (i = 6; i < qos.out.sdu; i++)
+	for (i = 6; i < out->sdu; i++)
 		buf[i] = 0x7f;
 
-	do_send(sk, fd, &qos, num, repeat);
+	do_send(sk, fd, out, num, repeat);
 }
 
 static void reconnect_mode(char *peer)
@@ -844,7 +935,7 @@ static void multy_connect_mode(char *peer)
 static struct qos_preset {
 	const char *name;
 	bool inout;
-	struct bt_iso_qos qos;
+	struct bt_iso_unicast_qos qos;
 } presets[] = {
 	/* QoS Configuration settings for low latency audio data */
 	QOS_PRESET("8_1_1", true, 7500, 8, 26, 0x02, 2),
-- 
2.34.1


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

* [PATCH BlueZ 8/8] tools/iso-tester: Use dedicated ISO QoS options for unicast and broadcast
  2023-03-20 14:37 [PATCH BlueZ 0/8] Split bt_iso_qos into dedicated structures Iulia Tanasescu
                   ` (6 preceding siblings ...)
  2023-03-20 14:37 ` [PATCH BlueZ 7/8] tools/isotest: Use dedicated ISO QoS options for unicast and broadcast Iulia Tanasescu
@ 2023-03-20 14:37 ` Iulia Tanasescu
  7 siblings, 0 replies; 14+ messages in thread
From: Iulia Tanasescu @ 2023-03-20 14:37 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Iulia Tanasescu

Convert the generic bt_iso_qos structure into dedicated ISO QoS structures
for unicast or broadcast.

---
 tools/iso-tester.c | 270 +++++++++++++++++++++++++++++++++------------
 1 file changed, 200 insertions(+), 70 deletions(-)

diff --git a/tools/iso-tester.c b/tools/iso-tester.c
index e4582573a..a763c6a09 100644
--- a/tools/iso-tester.c
+++ b/tools/iso-tester.c
@@ -4,6 +4,7 @@
  *  BlueZ - Bluetooth protocol stack for Linux
  *
  *  Copyright (C) 2022  Intel Corporation.
+ *  Copyright 2023 NXP
  *
  */
 
@@ -119,10 +120,52 @@
 #define QOS_48_5_2 QOS_OUT(7500, 75, 117, 0x02, 13)
 #define QOS_48_6_2 QOS_OUT(10000, 100, 155, 0x02, 13)
 
-#define QOS_OUT_16_2_1 QOS_OUT(10000, 10, 40, 0x02, 2)
-#define QOS_OUT_1_16_2_1 QOS_OUT_1(10000, 10, 40, 0x02, 2)
-#define QOS_OUT_1_1_16_2_1 QOS_OUT_1_1(10000, 10, 40, 0x02, 2)
-#define QOS_IN_16_2_1 QOS_IN(10000, 10, 40, 0x02, 2)
+#define QOS_SINK_FULL(_big, _in) \
+{ \
+	.options = 0x00, \
+	.skip = 0x0000, \
+	.sync_timeout = 0x4000, \
+	.sync_cte_type = 0x00, \
+	.big = _big, \
+	.encryption = 0x00, \
+	.bcode = {0}, \
+	.mse = 0x00, \
+	.timeout = 0x4000, \
+	.in = _in, \
+}
+
+#define QOS_SOURCE_FULL(_big, _bis, _out) \
+{ \
+	.sync_interval = 0x07, \
+	.big = _big, \
+	.bis = _bis, \
+	.packing = 0x00, \
+	.framing = 0x00, \
+	.encryption = 0x00, \
+	.bcode = {0}, \
+	.out = _out, \
+}
+
+#define BCAST_QOS_OUT(_interval, _latency, _sdu, _phy, _rtn) \
+	QOS_SOURCE_FULL(BT_ISO_QOS_BIG_UNSET, BT_ISO_QOS_BIS_UNSET, \
+		QOS_IO(_interval, _latency, _sdu, _phy, _rtn))
+
+#define BCAST_QOS_OUT_1(_interval, _latency, _sdu, _phy, _rtn) \
+	QOS_SOURCE_FULL(0x01, BT_ISO_QOS_BIS_UNSET, \
+		QOS_IO(_interval, _latency, _sdu, _phy, _rtn))
+
+#define BCAST_QOS_OUT_1_1(_interval, _latency, _sdu, _phy, _rtn) \
+	QOS_SOURCE_FULL(0x01, 0x01, \
+		QOS_IO(_interval, _latency, _sdu, _phy, _rtn))
+
+#define BCAST_QOS_IN(_interval, _latency, _sdu, _phy, _rtn) \
+	QOS_SINK_FULL(BT_ISO_QOS_BIG_UNSET, \
+		QOS_IO(_interval, _latency, _sdu, _phy, _rtn))
+
+#define QOS_OUT_16_2_1 BCAST_QOS_OUT(10000, 10, 40, 0x02, 2)
+#define QOS_OUT_1_16_2_1 BCAST_QOS_OUT_1(10000, 10, 40, 0x02, 2)
+#define QOS_OUT_1_1_16_2_1 BCAST_QOS_OUT_1_1(10000, 10, 40, 0x02, 2)
+#define QOS_IN_16_2_1 BCAST_QOS_IN(10000, 10, 40, 0x02, 2)
 
 struct test_data {
 	const void *test_data;
@@ -141,7 +184,9 @@ struct test_data {
 };
 
 struct iso_client_data {
-	struct bt_iso_qos qos;
+	struct bt_iso_unicast_qos unicast_qos;
+	struct bt_iso_bcast_sink_qos sink_qos;
+	struct bt_iso_bcast_source_qos source_qos;
 	int expect_err;
 	const struct iovec *send;
 	const struct iovec *recv;
@@ -369,182 +414,182 @@ static void test_data_free(void *test_data)
 	test_iso_full(name, data, setup, func, 1, reason)
 
 static const struct iso_client_data connect_8_1_1 = {
-	.qos = QOS_8_1_1,
+	.unicast_qos = QOS_8_1_1,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_8_2_1 = {
-	.qos = QOS_8_2_1,
+	.unicast_qos = QOS_8_2_1,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_16_1_1 = {
-	.qos = QOS_16_1_1,
+	.unicast_qos = QOS_16_1_1,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_16_2_1 = {
-	.qos = QOS_16_2_1,
+	.unicast_qos = QOS_16_2_1,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_1_16_2_1 = {
-	.qos = QOS_1_16_2_1,
+	.unicast_qos = QOS_1_16_2_1,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_1_1_16_2_1 = {
-	.qos = QOS_1_1_16_2_1,
+	.unicast_qos = QOS_1_1_16_2_1,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_24_1_1 = {
-	.qos = QOS_24_1_1,
+	.unicast_qos = QOS_24_1_1,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_24_2_1 = {
-	.qos = QOS_24_2_1,
+	.unicast_qos = QOS_24_2_1,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_32_1_1 = {
-	.qos = QOS_32_1_1,
+	.unicast_qos = QOS_32_1_1,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_32_2_1 = {
-	.qos = QOS_32_2_1,
+	.unicast_qos = QOS_32_2_1,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_44_1_1 = {
-	.qos = QOS_44_1_1,
+	.unicast_qos = QOS_44_1_1,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_44_2_1 = {
-	.qos = QOS_44_2_1,
+	.unicast_qos = QOS_44_2_1,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_48_1_1 = {
-	.qos = QOS_48_1_1,
+	.unicast_qos = QOS_48_1_1,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_48_2_1 = {
-	.qos = QOS_48_2_1,
+	.unicast_qos = QOS_48_2_1,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_48_3_1 = {
-	.qos = QOS_48_3_1,
+	.unicast_qos = QOS_48_3_1,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_48_4_1 = {
-	.qos = QOS_48_4_1,
+	.unicast_qos = QOS_48_4_1,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_48_5_1 = {
-	.qos = QOS_48_5_1,
+	.unicast_qos = QOS_48_5_1,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_48_6_1 = {
-	.qos = QOS_48_6_1,
+	.unicast_qos = QOS_48_6_1,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_8_1_2 = {
-	.qos = QOS_8_1_2,
+	.unicast_qos = QOS_8_1_2,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_8_2_2 = {
-	.qos = QOS_8_2_2,
+	.unicast_qos = QOS_8_2_2,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_16_1_2 = {
-	.qos = QOS_16_1_2,
+	.unicast_qos = QOS_16_1_2,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_16_2_2 = {
-	.qos = QOS_16_2_2,
+	.unicast_qos = QOS_16_2_2,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_24_1_2 = {
-	.qos = QOS_24_1_2,
+	.unicast_qos = QOS_24_1_2,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_24_2_2 = {
-	.qos = QOS_24_2_2,
+	.unicast_qos = QOS_24_2_2,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_32_1_2 = {
-	.qos = QOS_32_1_2,
+	.unicast_qos = QOS_32_1_2,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_32_2_2 = {
-	.qos = QOS_32_2_2,
+	.unicast_qos = QOS_32_2_2,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_44_1_2 = {
-	.qos = QOS_44_1_2,
+	.unicast_qos = QOS_44_1_2,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_44_2_2 = {
-	.qos = QOS_44_2_2,
+	.unicast_qos = QOS_44_2_2,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_48_1_2 = {
-	.qos = QOS_48_1_2,
+	.unicast_qos = QOS_48_1_2,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_48_2_2 = {
-	.qos = QOS_48_2_2,
+	.unicast_qos = QOS_48_2_2,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_48_3_2 = {
-	.qos = QOS_48_3_2,
+	.unicast_qos = QOS_48_3_2,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_48_4_2 = {
-	.qos = QOS_48_4_2,
+	.unicast_qos = QOS_48_4_2,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_48_5_2 = {
-	.qos = QOS_48_5_2,
+	.unicast_qos = QOS_48_5_2,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_48_6_2 = {
-	.qos = QOS_48_6_2,
+	.unicast_qos = QOS_48_6_2,
 	.expect_err = 0
 };
 
 static const struct iso_client_data connect_invalid = {
-	.qos = QOS(0, 0, 0, 0, 0),
+	.unicast_qos = QOS(0, 0, 0, 0, 0),
 	.expect_err = -EINVAL
 };
 
 static const struct iso_client_data connect_reject = {
-	.qos = QOS_16_1_2,
+	.unicast_qos = QOS_16_1_2,
 	.expect_err = -ENOSYS
 };
 
@@ -561,20 +606,20 @@ static const struct iovec send_48_2_1 = {
 };
 
 static const struct iso_client_data connect_16_2_1_send = {
-	.qos = QOS_16_2_1,
+	.unicast_qos = QOS_16_2_1,
 	.expect_err = 0,
 	.send = &send_16_2_1,
 };
 
 static const struct iso_client_data listen_16_2_1_recv = {
-	.qos = QOS_16_2_1,
+	.unicast_qos = QOS_16_2_1,
 	.expect_err = 0,
 	.recv = &send_16_2_1,
 	.server = true,
 };
 
 static const struct iso_client_data listen_16_2_1_recv_ts = {
-	.qos = QOS_16_2_1,
+	.unicast_qos = QOS_16_2_1,
 	.expect_err = 0,
 	.recv = &send_16_2_1,
 	.server = true,
@@ -582,27 +627,27 @@ static const struct iso_client_data listen_16_2_1_recv_ts = {
 };
 
 static const struct iso_client_data defer_16_2_1 = {
-	.qos = QOS_16_2_1,
+	.unicast_qos = QOS_16_2_1,
 	.expect_err = 0,
 	.defer = true,
 };
 
 static const struct iso_client_data connect_16_2_1_defer_send = {
-	.qos = QOS_16_2_1,
+	.unicast_qos = QOS_16_2_1,
 	.expect_err = 0,
 	.send = &send_16_2_1,
 	.defer = true,
 };
 
 static const struct iso_client_data connect_48_2_1_defer_send = {
-	.qos = QOS_48_2_1,
+	.unicast_qos = QOS_48_2_1,
 	.expect_err = 0,
 	.send = &send_16_2_1,
 	.defer = true,
 };
 
 static const struct iso_client_data listen_16_2_1_defer_recv = {
-	.qos = QOS_16_2_1,
+	.unicast_qos = QOS_16_2_1,
 	.expect_err = 0,
 	.recv = &send_16_2_1,
 	.server = true,
@@ -610,7 +655,7 @@ static const struct iso_client_data listen_16_2_1_defer_recv = {
 };
 
 static const struct iso_client_data listen_48_2_1_defer_recv = {
-	.qos = QOS_48_2_1,
+	.unicast_qos = QOS_48_2_1,
 	.expect_err = 0,
 	.recv = &send_48_2_1,
 	.server = true,
@@ -618,7 +663,7 @@ static const struct iso_client_data listen_48_2_1_defer_recv = {
 };
 
 static const struct iso_client_data listen_16_2_1_defer_reject = {
-	.qos = QOS_16_2_1,
+	.unicast_qos = QOS_16_2_1,
 	.expect_err = -1,
 	.recv = &send_16_2_1,
 	.server = true,
@@ -626,50 +671,51 @@ static const struct iso_client_data listen_16_2_1_defer_reject = {
 };
 
 static const struct iso_client_data connect_16_2_1_send_recv = {
-	.qos = QOS_16_2_1,
+	.unicast_qos = QOS_16_2_1,
 	.expect_err = 0,
 	.send = &send_16_2_1,
 	.recv = &send_16_2_1,
 };
 
 static const struct iso_client_data disconnect_16_2_1 = {
-	.qos = QOS_16_2_1,
+	.unicast_qos = QOS_16_2_1,
 	.expect_err = 0,
 	.disconnect = true,
 };
 
 static const struct iso_client_data reconnect_16_2_1 = {
-	.qos = QOS_16_2_1,
+	.unicast_qos = QOS_16_2_1,
 	.expect_err = 0,
 	.disconnect = true,
 };
 
 static const struct iso_client_data bcast_16_2_1_send = {
-	.qos = QOS_OUT_16_2_1,
+	.source_qos = QOS_OUT_16_2_1,
 	.expect_err = 0,
 	.send = &send_16_2_1,
 	.bcast = true,
 };
 
 static const struct iso_client_data bcast_1_16_2_1_send = {
-	.qos = QOS_OUT_1_16_2_1,
+	.source_qos = QOS_OUT_1_16_2_1,
 	.expect_err = 0,
 	.send = &send_16_2_1,
 	.bcast = true,
 };
 
 static const struct iso_client_data bcast_1_1_16_2_1_send = {
-	.qos = QOS_OUT_1_1_16_2_1,
+	.source_qos = QOS_OUT_1_1_16_2_1,
 	.expect_err = 0,
 	.send = &send_16_2_1,
 	.bcast = true,
 };
 
 static const struct iso_client_data bcast_16_2_1_recv = {
-	.qos = QOS_IN_16_2_1,
+	.sink_qos = QOS_IN_16_2_1,
 	.expect_err = 0,
 	.recv = &send_16_2_1,
 	.bcast = true,
+	.server = true,
 };
 
 static void client_connectable_complete(uint16_t opcode, uint8_t status,
@@ -854,7 +900,7 @@ static void test_getsockopt(const void *test_data)
 {
 	int sk, err;
 	socklen_t len;
-	struct bt_iso_qos qos;
+	struct bt_iso_unicast_qos qos;
 
 	sk = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_ISO);
 	if (sk < 0) {
@@ -867,7 +913,7 @@ static void test_getsockopt(const void *test_data)
 	len = sizeof(qos);
 	memset(&qos, 0, len);
 
-	err = getsockopt(sk, SOL_BLUETOOTH, BT_ISO_QOS, &qos, &len);
+	err = getsockopt(sk, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, &qos, &len);
 	if (err < 0) {
 		tester_warn("Can't get socket option : %s (%d)",
 							strerror(errno), errno);
@@ -885,7 +931,7 @@ static void test_setsockopt(const void *test_data)
 {
 	int sk, err;
 	socklen_t len;
-	struct bt_iso_qos qos = QOS_16_1_2;
+	struct bt_iso_unicast_qos qos = QOS_16_1_2;
 
 	sk = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_ISO);
 	if (sk < 0) {
@@ -895,7 +941,8 @@ static void test_setsockopt(const void *test_data)
 		goto end;
 	}
 
-	err = setsockopt(sk, SOL_BLUETOOTH, BT_ISO_QOS, &qos, sizeof(qos));
+	err = setsockopt(sk, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS,
+						&qos, sizeof(qos));
 	if (err < 0) {
 		tester_warn("Can't set socket option : %s (%d)",
 							strerror(errno), errno);
@@ -906,7 +953,7 @@ static void test_setsockopt(const void *test_data)
 	len = sizeof(qos);
 	memset(&qos, 0, len);
 
-	err = getsockopt(sk, SOL_BLUETOOTH, BT_ISO_QOS, &qos, &len);
+	err = getsockopt(sk, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, &qos, &len);
 	if (err < 0) {
 		tester_warn("Can't get socket option : %s (%d)",
 							strerror(errno), errno);
@@ -1004,8 +1051,14 @@ static int connect_iso_sock(struct test_data *data, uint8_t num, int sk)
 		}
 	}
 
-	err = setsockopt(sk, SOL_BLUETOOTH, BT_ISO_QOS, &isodata->qos,
-						sizeof(isodata->qos));
+	if (!isodata->bcast)
+		err = setsockopt(sk, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS,
+			&isodata->unicast_qos, sizeof(isodata->unicast_qos));
+	else {
+		err = setsockopt(sk, SOL_BLUETOOTH, BT_ISO_BCAST_SOURCE_QOS,
+			&isodata->source_qos, sizeof(isodata->source_qos));
+	}
+
 	if (err < 0) {
 		tester_warn("Can't set socket BT_ISO_QOS option : %s (%d)",
 							strerror(errno), errno);
@@ -1080,8 +1133,8 @@ static bool check_io_qos(const struct bt_iso_io_qos *io1,
 	return true;
 }
 
-static bool check_qos(const struct bt_iso_qos *qos1,
-				const struct bt_iso_qos *qos2)
+static bool check_unicast_qos(const struct bt_iso_unicast_qos *qos1,
+				const struct bt_iso_unicast_qos *qos2)
 {
 	if (qos1->cig != BT_ISO_QOS_CIG_UNSET &&
 			qos2->cig != BT_ISO_QOS_CIG_UNSET &&
@@ -1124,6 +1177,62 @@ static bool check_qos(const struct bt_iso_qos *qos1,
 	return true;
 }
 
+static bool check_bcast_source_qos(const struct bt_iso_bcast_source_qos *qos1,
+				const struct bt_iso_bcast_source_qos *qos2)
+{
+	if (qos1->sync_interval != qos2->sync_interval) {
+		tester_warn("Unexpected QoS sync interval: 0x%02x != 0x%02x",
+				qos1->sync_interval, qos2->sync_interval);
+		return false;
+	}
+
+	if (qos1->big != BT_ISO_QOS_BIG_UNSET &&
+			qos2->big != BT_ISO_QOS_BIG_UNSET &&
+			qos1->big != qos2->big) {
+		tester_warn("Unexpected BIG ID: 0x%02x != 0x%02x",
+				qos1->big, qos2->big);
+		return false;
+	}
+
+	if (qos1->bis != BT_ISO_QOS_BIS_UNSET &&
+			qos2->bis != BT_ISO_QOS_BIS_UNSET &&
+			qos1->bis != qos2->bis) {
+		tester_warn("Unexpected BIS ID: 0x%02x != 0x%02x",
+				qos1->bis, qos2->bis);
+		return false;
+	}
+
+	if (qos1->packing != qos2->packing) {
+		tester_warn("Unexpected QoS packing: 0x%02x != 0x%02x",
+				qos1->packing, qos2->packing);
+		return false;
+	}
+
+	if (qos1->framing != qos2->framing) {
+		tester_warn("Unexpected QoS framing: 0x%02x != 0x%02x",
+				qos1->framing, qos2->framing);
+		return false;
+	}
+
+	if (qos1->encryption != qos2->encryption) {
+		tester_warn("Unexpected QoS encryption: 0x%02x != 0x%02x",
+				qos1->encryption, qos2->encryption);
+		return false;
+	}
+
+	if (memcmp(qos1->bcode, qos2->bcode, sizeof(qos1->bcode))) {
+		tester_warn("Unexpected QoS Broadcast Code");
+		return false;
+	}
+
+	if (!check_io_qos(&qos1->out, &qos2->out)) {
+		tester_warn("Unexpected Output QoS");
+		return false;
+	}
+
+	return true;
+}
+
 static gboolean iso_recv_data(GIOChannel *io, GIOCondition cond,
 							gpointer user_data)
 {
@@ -1249,14 +1358,28 @@ static gboolean iso_connect(GIOChannel *io, GIOCondition cond,
 	const struct iso_client_data *isodata = data->test_data;
 	int err, sk_err, sk;
 	socklen_t len;
-	struct bt_iso_qos qos;
+	int optname;
+	bool ret = true;
+
+	union {
+		struct bt_iso_unicast_qos unicast_qos;
+		struct bt_iso_bcast_sink_qos sink_qos;
+		struct bt_iso_bcast_source_qos source_qos;
+	} qos;
 
 	sk = g_io_channel_unix_get_fd(io);
 
+	if (!isodata->bcast)
+		optname = BT_ISO_UNICAST_QOS;
+	else if (isodata->server)
+		optname = BT_ISO_BCAST_SINK_QOS;
+	else
+		optname = BT_ISO_BCAST_SOURCE_QOS;
+
 	len = sizeof(qos);
 	memset(&qos, 0, len);
 
-	err = getsockopt(sk, SOL_BLUETOOTH, BT_ISO_QOS, &qos, &len);
+	err = getsockopt(sk, SOL_BLUETOOTH, optname, &qos, &len);
 	if (err < 0) {
 		tester_warn("Can't get socket option : %s (%d)",
 							strerror(errno), errno);
@@ -1264,7 +1387,14 @@ static gboolean iso_connect(GIOChannel *io, GIOCondition cond,
 		return FALSE;
 	}
 
-	if (!check_qos(&qos, &isodata->qos)) {
+	if (!isodata->bcast)
+		ret = check_unicast_qos(&qos.unicast_qos,
+					&isodata->unicast_qos);
+	else if (!isodata->server)
+		ret = check_bcast_source_qos(&qos.source_qos,
+					&isodata->source_qos);
+
+	if (!ret) {
 		tester_warn("Unexpected QoS parameter");
 		tester_test_failed();
 		return FALSE;
@@ -1579,7 +1709,7 @@ static void setup_listen(struct test_data *data, uint8_t num, GIOFunc func)
 		client = hciemu_get_client(data->hciemu, 0);
 		host = hciemu_client_host(client);
 
-		bthost_set_cig_params(host, 0x01, 0x01, &isodata->qos);
+		bthost_set_cig_params(host, 0x01, 0x01, &isodata->unicast_qos);
 		bthost_create_cis(host, 257, data->acl_handle);
 	}
 }
-- 
2.34.1


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

* RE: Split bt_iso_qos into dedicated structures
  2023-03-20 14:36 [PATCH 1/1] Bluetooth: " Iulia Tanasescu
@ 2023-03-20 15:03 ` bluez.test.bot
  0 siblings, 0 replies; 14+ messages in thread
From: bluez.test.bot @ 2023-03-20 15:03 UTC (permalink / raw)
  To: linux-bluetooth, iulia.tanasescu

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

---Test result---

Test Summary:
CheckPatch                    PASS      2.07 seconds
GitLint                       PASS      0.27 seconds
SubjectPrefix                 PASS      0.07 seconds
BuildKernel                   FAIL      44.02 seconds
CheckAllWarning               FAIL      48.17 seconds
CheckSparse                   FAIL      53.05 seconds
CheckSmatch                   FAIL      141.54 seconds
BuildKernel32                 FAIL      42.20 seconds
TestRunnerSetup               FAIL      619.41 seconds
TestRunner_l2cap-tester       FAIL      0.10 seconds
TestRunner_iso-tester         FAIL      0.10 seconds
TestRunner_bnep-tester        FAIL      0.10 seconds
TestRunner_mgmt-tester        FAIL      0.11 seconds
TestRunner_rfcomm-tester      FAIL      0.10 seconds
TestRunner_sco-tester         FAIL      0.11 seconds
TestRunner_ioctl-tester       FAIL      0.11 seconds
TestRunner_mesh-tester        FAIL      0.10 seconds
TestRunner_smp-tester         FAIL      0.10 seconds
TestRunner_userchan-tester    FAIL      0.10 seconds
IncrementalBuild              FAIL      38.91 seconds

Details
##############################
Test: BuildKernel - FAIL
Desc: Build Kernel for Bluetooth
Output:

net/bluetooth/iso.c: In function ‘iso_sock_setsockopt’:
net/bluetooth/iso.c:1306:3: error: a label can only be part of a statement and a declaration is not a statement
 1306 |   struct bt_iso_unicast_qos unicast_qos;
      |   ^~~~~~
net/bluetooth/iso.c:1337:3: error: a label can only be part of a statement and a declaration is not a statement
 1337 |   struct bt_iso_bcast_sink_qos sink_qos;
      |   ^~~~~~
net/bluetooth/iso.c:1368:3: error: a label can only be part of a statement and a declaration is not a statement
 1368 |   struct bt_iso_bcast_source_qos source_qos;
      |   ^~~~~~
net/bluetooth/iso.c: In function ‘iso_sock_getsockopt’:
net/bluetooth/iso.c:1459:3: error: a label can only be part of a statement and a declaration is not a statement
 1459 |   struct bt_iso_unicast_qos *unicast_qos = iso_sock_get_unicast_qos(sk);
      |   ^~~~~~
net/bluetooth/iso.c:1468:3: error: a label can only be part of a statement and a declaration is not a statement
 1468 |   struct bt_iso_bcast_sink_qos *sink_qos = iso_sock_get_bcast_sink_qos(sk);
      |   ^~~~~~
net/bluetooth/iso.c:1477:3: error: a label can only be part of a statement and a declaration is not a statement
 1477 |   struct bt_iso_bcast_source_qos *source_qos = iso_sock_get_bcast_source_qos(sk);
      |   ^~~~~~
make[3]: *** [scripts/Makefile.build:252: net/bluetooth/iso.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:504: net/bluetooth] Error 2
make[1]: *** [scripts/Makefile.build:504: net] Error 2
make: *** [Makefile:2021: .] Error 2
##############################
Test: CheckAllWarning - FAIL
Desc: Run linux kernel with all warning enabled
Output:

net/bluetooth/iso.c: In function ‘iso_sock_setsockopt’:
net/bluetooth/iso.c:1306:3: error: a label can only be part of a statement and a declaration is not a statement
 1306 |   struct bt_iso_unicast_qos unicast_qos;
      |   ^~~~~~
net/bluetooth/iso.c:1337:3: error: a label can only be part of a statement and a declaration is not a statement
 1337 |   struct bt_iso_bcast_sink_qos sink_qos;
      |   ^~~~~~
net/bluetooth/iso.c:1368:3: error: a label can only be part of a statement and a declaration is not a statement
 1368 |   struct bt_iso_bcast_source_qos source_qos;
      |   ^~~~~~
net/bluetooth/iso.c: In function ‘iso_sock_getsockopt’:
net/bluetooth/iso.c:1459:3: error: a label can only be part of a statement and a declaration is not a statement
 1459 |   struct bt_iso_unicast_qos *unicast_qos = iso_sock_get_unicast_qos(sk);
      |   ^~~~~~
net/bluetooth/iso.c:1468:3: error: a label can only be part of a statement and a declaration is not a statement
 1468 |   struct bt_iso_bcast_sink_qos *sink_qos = iso_sock_get_bcast_sink_qos(sk);
      |   ^~~~~~
net/bluetooth/iso.c:1477:3: error: a label can only be part of a statement and a declaration is not a statement
 1477 |   struct bt_iso_bcast_source_qos *source_qos = iso_sock_get_bcast_source_qos(sk);
      |   ^~~~~~
make[3]: *** [scripts/Makefile.build:252: net/bluetooth/iso.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:504: net/bluetooth] Error 2
make[1]: *** [scripts/Makefile.build:504: net] Error 2
make: *** [Makefile:2021: .] Error 2
##############################
Test: CheckSparse - FAIL
Desc: Run sparse tool with linux kernel
Output:

net/bluetooth/af_bluetooth.c:178:25: warning: context imbalance in 'bt_accept_enqueue' - different lock contexts for basic block
drivers/bluetooth/hci_ag6xx.c:257:24: warning: restricted __le32 degrades to integer
net/bluetooth/hci_conn.c:2095:18: warning: incorrect type in assignment (different base types)
net/bluetooth/hci_conn.c:2095:18:    expected restricted __le16 [usertype] skip
net/bluetooth/hci_conn.c:2095:18:    got unsigned short [usertype] skip
net/bluetooth/hci_conn.c:2096:26: warning: incorrect type in assignment (different base types)
net/bluetooth/hci_conn.c:2096:26:    expected restricted __le16 [usertype] sync_timeout
net/bluetooth/hci_conn.c:2096:26:    got unsigned short [usertype] sync_timeout
net/bluetooth/hci_conn.c:2126:24: warning: incorrect type in assignment (different base types)
net/bluetooth/hci_conn.c:2126:24:    expected restricted __le16 [addressable] [assigned] [usertype] timeout
net/bluetooth/hci_conn.c:2126:24:    got unsigned short [usertype] timeout
drivers/bluetooth/hci_mrvl.c:170:23: warning: restricted __le16 degrades to integer
drivers/bluetooth/hci_mrvl.c:203:23: warning: restricted __le16 degrades to integer
net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h):
./include/net/bluetooth/hci.h:2638:47: warning: array of flexible structures
./include/net/bluetooth/hci.h:2724:43: warning: array of flexible structures
drivers/bluetooth/btmtksdio.c:557:63: warning: Using plain integer as NULL pointer
drivers/bluetooth/btmtksdio.c:579:55: warning: Using plain integer as NULL pointer
drivers/bluetooth/btmtksdio.c:611:63: warning: Using plain integer as NULL pointer
drivers/bluetooth/btmtksdio.c:624:63: warning: Using plain integer as NULL pointer
drivers/bluetooth/btrtl.c: note: in included file:
drivers/bluetooth/btrtl.h:52:45: warning: array of flexible structures
drivers/bluetooth/btqca.c:637:24: warning: restricted __le32 degrades to integer
drivers/bluetooth/hci_nokia.c:284:23: warning: incorrect type in assignment (different base types)
drivers/bluetooth/hci_nokia.c:284:23:    expected unsigned short [usertype] baud
drivers/bluetooth/hci_nokia.c:284:23:    got restricted __le16 [usertype]
drivers/bluetooth/hci_nokia.c:287:26: warning: incorrect type in assignment (different base types)
drivers/bluetooth/hci_nokia.c:287:26:    expected unsigned short [usertype] sys_clk
drivers/bluetooth/hci_nokia.c:287:26:    got restricted __le16 [usertype]
net/bluetooth/hci_codec.c: note: in included file:
./include/net/bluetooth/hci_core.h:149:35: warning: array of flexible structures
net/bluetooth/sco.c: note: in included file:
./include/net/bluetooth/hci_core.h:149:35: warning: array of flexible structures
net/bluetooth/iso.c: In function ‘iso_sock_setsockopt’:
net/bluetooth/iso.c:1306:3: error: a label can only be part of a statement and a declaration is not a statement
 1306 |   struct bt_iso_unicast_qos unicast_qos;
      |   ^~~~~~
net/bluetooth/iso.c:1337:3: error: a label can only be part of a statement and a declaration is not a statement
 1337 |   struct bt_iso_bcast_sink_qos sink_qos;
      |   ^~~~~~
net/bluetooth/iso.c:1368:3: error: a label can only be part of a statement and a declaration is not a statement
 1368 |   struct bt_iso_bcast_source_qos source_qos;
      |   ^~~~~~
net/bluetooth/iso.c: In function ‘iso_sock_getsockopt’:
net/bluetooth/iso.c:1459:3: error: a label can only be part of a statement and a declaration is not a statement
 1459 |   struct bt_iso_unicast_qos *unicast_qos = iso_sock_get_unicast_qos(sk);
      |   ^~~~~~
net/bluetooth/iso.c:1468:3: error: a label can only be part of a statement and a declaration is not a statement
 1468 |   struct bt_iso_bcast_sink_qos *sink_qos = iso_sock_get_bcast_sink_qos(sk);
      |   ^~~~~~
net/bluetooth/iso.c:1477:3: error: a label can only be part of a statement and a declaration is not a statement
 1477 |   struct bt_iso_bcast_source_qos *source_qos = iso_sock_get_bcast_source_qos(sk);
      |   ^~~~~~
make[3]: *** [scripts/Makefile.build:252: net/bluetooth/iso.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:504: net/bluetooth] Error 2
make[1]: *** [scripts/Makefile.build:504: net] Error 2
make: *** [Makefile:2021: .] Error 2
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:

net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h):
./include/net/bluetooth/hci.h:2638:47: warning: array of flexible structures
./include/net/bluetooth/hci.h:2724:43: warning: array of flexible structures
drivers/bluetooth/btrtl.c: note: in included file:
drivers/bluetooth/btrtl.h:52:45: warning: array of flexible structures
net/bluetooth/hci_codec.c: note: in included file:
./include/net/bluetooth/hci_core.h:149:35: warning: array of flexible structures
net/bluetooth/sco.c: note: in included file:
./include/net/bluetooth/hci_core.h:149:35: warning: array of flexible structures
net/bluetooth/iso.c: In function ‘iso_sock_setsockopt’:
net/bluetooth/iso.c:1306:3: error: a label can only be part of a statement and a declaration is not a statement
 1306 |   struct bt_iso_unicast_qos unicast_qos;
      |   ^~~~~~
net/bluetooth/iso.c:1337:3: error: a label can only be part of a statement and a declaration is not a statement
 1337 |   struct bt_iso_bcast_sink_qos sink_qos;
      |   ^~~~~~
net/bluetooth/iso.c:1368:3: error: a label can only be part of a statement and a declaration is not a statement
 1368 |   struct bt_iso_bcast_source_qos source_qos;
      |   ^~~~~~
net/bluetooth/iso.c: In function ‘iso_sock_getsockopt’:
net/bluetooth/iso.c:1459:3: error: a label can only be part of a statement and a declaration is not a statement
 1459 |   struct bt_iso_unicast_qos *unicast_qos = iso_sock_get_unicast_qos(sk);
      |   ^~~~~~
net/bluetooth/iso.c:1468:3: error: a label can only be part of a statement and a declaration is not a statement
 1468 |   struct bt_iso_bcast_sink_qos *sink_qos = iso_sock_get_bcast_sink_qos(sk);
      |   ^~~~~~
net/bluetooth/iso.c:1477:3: error: a label can only be part of a statement and a declaration is not a statement
 1477 |   struct bt_iso_bcast_source_qos *source_qos = iso_sock_get_bcast_source_qos(sk);
      |   ^~~~~~
make[3]: *** [scripts/Makefile.build:252: net/bluetooth/iso.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:504: net/bluetooth] Error 2
make[1]: *** [scripts/Makefile.build:504: net] Error 2
make: *** [Makefile:2021: .] Error 2
##############################
Test: BuildKernel32 - FAIL
Desc: Build 32bit Kernel for Bluetooth
Output:

net/bluetooth/iso.c: In function ‘iso_sock_setsockopt’:
net/bluetooth/iso.c:1306:3: error: a label can only be part of a statement and a declaration is not a statement
 1306 |   struct bt_iso_unicast_qos unicast_qos;
      |   ^~~~~~
net/bluetooth/iso.c:1337:3: error: a label can only be part of a statement and a declaration is not a statement
 1337 |   struct bt_iso_bcast_sink_qos sink_qos;
      |   ^~~~~~
net/bluetooth/iso.c:1368:3: error: a label can only be part of a statement and a declaration is not a statement
 1368 |   struct bt_iso_bcast_source_qos source_qos;
      |   ^~~~~~
net/bluetooth/iso.c: In function ‘iso_sock_getsockopt’:
net/bluetooth/iso.c:1459:3: error: a label can only be part of a statement and a declaration is not a statement
 1459 |   struct bt_iso_unicast_qos *unicast_qos = iso_sock_get_unicast_qos(sk);
      |   ^~~~~~
net/bluetooth/iso.c:1468:3: error: a label can only be part of a statement and a declaration is not a statement
 1468 |   struct bt_iso_bcast_sink_qos *sink_qos = iso_sock_get_bcast_sink_qos(sk);
      |   ^~~~~~
net/bluetooth/iso.c:1477:3: error: a label can only be part of a statement and a declaration is not a statement
 1477 |   struct bt_iso_bcast_source_qos *source_qos = iso_sock_get_bcast_source_qos(sk);
      |   ^~~~~~
make[3]: *** [scripts/Makefile.build:252: net/bluetooth/iso.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:504: net/bluetooth] Error 2
make[1]: *** [scripts/Makefile.build:504: net] Error 2
make: *** [Makefile:2021: .] Error 2
##############################
Test: TestRunnerSetup - FAIL
Desc: Setup kernel and bluez for test-runner
Output:
Kernel: 
net/bluetooth/iso.c: In function ‘iso_sock_setsockopt’:
net/bluetooth/iso.c:1306:3: error: a label can only be part of a statement and a declaration is not a statement
 1306 |   struct bt_iso_unicast_qos unicast_qos;
      |   ^~~~~~
net/bluetooth/iso.c:1337:3: error: a label can only be part of a statement and a declaration is not a statement
 1337 |   struct bt_iso_bcast_sink_qos sink_qos;
      |   ^~~~~~
net/bluetooth/iso.c:1368:3: error: a label can only be part of a statement and a declaration is not a statement
 1368 |   struct bt_iso_bcast_source_qos source_qos;
      |   ^~~~~~
net/bluetooth/iso.c: In function ‘iso_sock_getsockopt’:
net/bluetooth/iso.c:1459:3: error: a label can only be part of a statement and a declaration is not a statement
 1459 |   struct bt_iso_unicast_qos *unicast_qos = iso_sock_get_unicast_qos(sk);
      |   ^~~~~~
net/bluetooth/iso.c:1468:3: error: a label can only be part of a statement and a declaration is not a statement
 1468 |   struct bt_iso_bcast_sink_qos *sink_qos = iso_sock_get_bcast_sink_qos(sk);
      |   ^~~~~~
net/bluetooth/iso.c:1477:3: error: a label can only be part of a statement and a declaration is not a statement
 1477 |   struct bt_iso_bcast_source_qos *source_qos = iso_sock_get_bcast_source_qos(sk);
      |   ^~~~~~
make[3]: *** [scripts/Makefile.build:252: net/bluetooth/iso.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:504: net/bluetooth] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [scripts/Makefile.build:504: net] Error 2
make: *** [Makefile:2021: .] Error 2
##############################
Test: TestRunner_l2cap-tester - FAIL
Desc: Run l2cap-tester with test-runner
Output:

Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
qemu-system-x86_64: Back to tcg accelerator
qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory
##############################
Test: TestRunner_iso-tester - FAIL
Desc: Run iso-tester with test-runner
Output:

Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
qemu-system-x86_64: Back to tcg accelerator
qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory
##############################
Test: TestRunner_bnep-tester - FAIL
Desc: Run bnep-tester with test-runner
Output:

Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
qemu-system-x86_64: Back to tcg accelerator
qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:

Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
qemu-system-x86_64: Back to tcg accelerator
qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory
##############################
Test: TestRunner_rfcomm-tester - FAIL
Desc: Run rfcomm-tester with test-runner
Output:

Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
qemu-system-x86_64: Back to tcg accelerator
qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory
##############################
Test: TestRunner_sco-tester - FAIL
Desc: Run sco-tester with test-runner
Output:

Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
qemu-system-x86_64: Back to tcg accelerator
qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory
##############################
Test: TestRunner_ioctl-tester - FAIL
Desc: Run ioctl-tester with test-runner
Output:

Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
qemu-system-x86_64: Back to tcg accelerator
qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner
Output:

Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
qemu-system-x86_64: Back to tcg accelerator
qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory
##############################
Test: TestRunner_smp-tester - FAIL
Desc: Run smp-tester with test-runner
Output:

Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
qemu-system-x86_64: Back to tcg accelerator
qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory
##############################
Test: TestRunner_userchan-tester - FAIL
Desc: Run userchan-tester with test-runner
Output:

Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
qemu-system-x86_64: Back to tcg accelerator
qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory
##############################
Test: IncrementalBuild - FAIL
Desc: Incremental build with the patches in the series
Output:
[1/1] Bluetooth: Split bt_iso_qos into dedicated structures

net/bluetooth/iso.c: In function ‘iso_sock_setsockopt’:
net/bluetooth/iso.c:1306:3: error: a label can only be part of a statement and a declaration is not a statement
 1306 |   struct bt_iso_unicast_qos unicast_qos;
      |   ^~~~~~
net/bluetooth/iso.c:1337:3: error: a label can only be part of a statement and a declaration is not a statement
 1337 |   struct bt_iso_bcast_sink_qos sink_qos;
      |   ^~~~~~
net/bluetooth/iso.c:1368:3: error: a label can only be part of a statement and a declaration is not a statement
 1368 |   struct bt_iso_bcast_source_qos source_qos;
      |   ^~~~~~
net/bluetooth/iso.c: In function ‘iso_sock_getsockopt’:
net/bluetooth/iso.c:1459:3: error: a label can only be part of a statement and a declaration is not a statement
 1459 |   struct bt_iso_unicast_qos *unicast_qos = iso_sock_get_unicast_qos(sk);
      |   ^~~~~~
net/bluetooth/iso.c:1468:3: error: a label can only be part of a statement and a declaration is not a statement
 1468 |   struct bt_iso_bcast_sink_qos *sink_qos = iso_sock_get_bcast_sink_qos(sk);
      |   ^~~~~~
net/bluetooth/iso.c:1477:3: error: a label can only be part of a statement and a declaration is not a statement
 1477 |   struct bt_iso_bcast_source_qos *source_qos = iso_sock_get_bcast_source_qos(sk);
      |   ^~~~~~
make[3]: *** [scripts/Makefile.build:252: net/bluetooth/iso.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:504: net/bluetooth] Error 2
make[1]: *** [scripts/Makefile.build:504: net] Error 2
make: *** [Makefile:2021: .] Error 2


---
Regards,
Linux Bluetooth


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

* RE: Split bt_iso_qos into dedicated structures
  2023-03-20 14:37 ` [PATCH BlueZ 1/8] btio: Use unicast structure for ISO QoS options Iulia Tanasescu
@ 2023-03-20 15:11   ` bluez.test.bot
  0 siblings, 0 replies; 14+ messages in thread
From: bluez.test.bot @ 2023-03-20 15:11 UTC (permalink / raw)
  To: linux-bluetooth, iulia.tanasescu

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

---Test result---

Test Summary:
CheckPatch                    PASS      0.75 seconds
GitLint                       PASS      0.46 seconds
BuildEll                      PASS      28.31 seconds
BluezMake                     FAIL      77.31 seconds
MakeCheck                     FAIL      5.39 seconds
MakeDistcheck                 FAIL      51.41 seconds
CheckValgrind                 FAIL      59.55 seconds
CheckSmatch                   FAIL      158.92 seconds
bluezmakeextell               FAIL      44.20 seconds
IncrementalBuild              FAIL      688.93 seconds
ScanBuild                     FAIL      680.61 seconds

Details
##############################
Test: BluezMake - FAIL
Desc: Build BlueZ
Output:

tools/mgmt-tester.c: In function ‘main’:
tools/mgmt-tester.c:12514:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
12514 | int main(int argc, char *argv[])
      |     ^~~~
btio/btio.c:72:28: error: field ‘qos’ has incomplete type
   72 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
btio/btio.c: In function ‘iso_set’:
btio/btio.c:863:38: error: ‘BT_ISO_UNICAST_QOS’ undeclared (first use in this function)
  863 |  if (setsockopt(sock, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, qos,
      |                                      ^~~~~~~~~~~~~~~~~~
btio/btio.c:863:38: note: each undeclared identifier is reported only once for each function it appears in
btio/btio.c:864:12: error: dereferencing pointer to incomplete type ‘struct bt_iso_unicast_qos’
  864 |     sizeof(*qos)) < 0) {
      |            ^~~~
btio/btio.c: In function ‘iso_get’:
btio/btio.c:1574:28: error: storage size of ‘qos’ isn’t known
 1574 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
btio/btio.c:1580:38: error: ‘BT_ISO_UNICAST_QOS’ undeclared (first use in this function)
 1580 |  if (getsockopt(sock, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, &qos,
      |                                      ^~~~~~~~~~~~~~~~~~
btio/btio.c:1574:28: error: unused variable ‘qos’ [-Werror=unused-variable]
 1574 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:8630: btio/android_avdtptest-btio.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4506: all] Error 2
##############################
Test: MakeCheck - FAIL
Desc: Run Bluez Make Check
Output:

client/player.c: In function ‘transport_timer_read’:
client/player.c:3510:28: error: storage size of ‘qos’ isn’t known
 3510 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
client/player.c:3530:47: error: ‘BT_ISO_UNICAST_QOS’ undeclared (first use in this function)
 3530 |  if (getsockopt(transport->sk, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, &qos,
      |                                               ^~~~~~~~~~~~~~~~~~
client/player.c:3530:47: note: each undeclared identifier is reported only once for each function it appears in
client/player.c:3510:28: error: unused variable ‘qos’ [-Werror=unused-variable]
 3510 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
client/player.c: At top level:
client/player.c:3557:13: error: ‘struct bt_iso_unicast_qos’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
 3557 |      struct bt_iso_unicast_qos *qos)
      |             ^~~~~~~~~~~~~~~~~~
client/player.c: In function ‘transport_send’:
client/player.c:3575:27: error: dereferencing pointer to incomplete type ‘struct bt_iso_unicast_qos’
 3575 |  ts.it_value.tv_nsec = qos->out.latency * 1000000;
      |                           ^~
client/player.c: In function ‘cmd_send_transport’:
client/player.c:3596:28: error: storage size of ‘qos’ isn’t known
 3596 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
client/player.c:3632:5: error: ‘BT_ISO_UNICAST_QOS’ undeclared (first use in this function)
 3632 |     BT_ISO_UNICAST_QOS, &qos, &len) < 0)
      |     ^~~~~~~~~~~~~~~~~~
client/player.c:3596:28: error: unused variable ‘qos’ [-Werror=unused-variable]
 3596 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:7591: client/player.o] Error 1
make: *** [Makefile:11779: check] Error 2
##############################
Test: MakeDistcheck - FAIL
Desc: Run Bluez Make Distcheck
Output:

../../btio/btio.c:72:28: error: field ‘qos’ has incomplete type
   72 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
../../btio/btio.c: In function ‘iso_set’:
../../btio/btio.c:863:38: error: ‘BT_ISO_UNICAST_QOS’ undeclared (first use in this function)
  863 |  if (setsockopt(sock, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, qos,
      |                                      ^~~~~~~~~~~~~~~~~~
../../btio/btio.c:863:38: note: each undeclared identifier is reported only once for each function it appears in
../../btio/btio.c:864:12: error: dereferencing pointer to incomplete type ‘struct bt_iso_unicast_qos’
  864 |     sizeof(*qos)) < 0) {
      |            ^~~~
../../btio/btio.c: In function ‘iso_get’:
../../btio/btio.c:1574:28: error: storage size of ‘qos’ isn’t known
 1574 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
../../btio/btio.c:1580:38: error: ‘BT_ISO_UNICAST_QOS’ undeclared (first use in this function)
 1580 |  if (getsockopt(sock, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, &qos,
      |                                      ^~~~~~~~~~~~~~~~~~
make[2]: *** [Makefile:8630: btio/android_avdtptest-btio.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:4506: all] Error 2
make: *** [Makefile:11700: distcheck] Error 1
##############################
Test: CheckValgrind - FAIL
Desc: Run Bluez Make Check with Valgrind
Output:

tools/mgmt-tester.c: In function ‘main’:
tools/mgmt-tester.c:12514:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
12514 | int main(int argc, char *argv[])
      |     ^~~~
btio/btio.c:72:28: error: field ‘qos’ has incomplete type
   72 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
btio/btio.c: In function ‘iso_set’:
btio/btio.c:863:38: error: ‘BT_ISO_UNICAST_QOS’ undeclared (first use in this function)
  863 |  if (setsockopt(sock, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, qos,
      |                                      ^~~~~~~~~~~~~~~~~~
btio/btio.c:863:38: note: each undeclared identifier is reported only once for each function it appears in
btio/btio.c:864:12: error: dereferencing pointer to incomplete type ‘struct bt_iso_unicast_qos’
  864 |     sizeof(*qos)) < 0) {
      |            ^~~~
btio/btio.c: In function ‘iso_get’:
btio/btio.c:1574:28: error: storage size of ‘qos’ isn’t known
 1574 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
btio/btio.c:1580:38: error: ‘BT_ISO_UNICAST_QOS’ undeclared (first use in this function)
 1580 |  if (getsockopt(sock, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, &qos,
      |                                      ^~~~~~~~~~~~~~~~~~
btio/btio.c:1574:28: error: unused variable ‘qos’ [-Werror=unused-variable]
 1574 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:8630: btio/android_avdtptest-btio.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:11779: check] Error 2
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:

src/shared/crypto.c:271:21: warning: Variable length array is used.
src/shared/crypto.c:272:23: warning: Variable length array is used.
src/shared/gatt-helpers.c:768:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:830:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:1323:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:1354:23: warning: Variable length array is used.
src/shared/gatt-server.c:275:25: warning: Variable length array is used.
src/shared/gatt-server.c:618:25: warning: Variable length array is used.
src/shared/gatt-server.c:717:25: warning: Variable length array is used.
src/shared/shell.c: note: in included file (through /usr/include/readline/readline.h):
/usr/include/readline/rltypedefs.h:35:23: warning: non-ANSI function declaration of function 'Function'
/usr/include/readline/rltypedefs.h:36:25: warning: non-ANSI function declaration of function 'VFunction'
/usr/include/readline/rltypedefs.h:37:27: warning: non-ANSI function declaration of function 'CPFunction'
/usr/include/readline/rltypedefs.h:38:29: warning: non-ANSI function declaration of function 'CPPFunction'
src/shared/shell.c:609:21: warning: non-ANSI function declaration of function 'bt_shell_usage'
src/shared/crypto.c:271:21: warning: Variable length array is used.
src/shared/crypto.c:272:23: warning: Variable length array is used.
src/shared/gatt-helpers.c:768:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:830:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:1323:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:1354:23: warning: Variable length array is used.
src/shared/gatt-server.c:275:25: warning: Variable length array is used.
src/shared/gatt-server.c:618:25: warning: Variable length array is used.
src/shared/gatt-server.c:717:25: warning: Variable length array is used.
src/shared/shell.c: note: in included file (through /usr/include/readline/readline.h):
/usr/include/readline/rltypedefs.h:35:23: warning: non-ANSI function declaration of function 'Function'
/usr/include/readline/rltypedefs.h:36:25: warning: non-ANSI function declaration of function 'VFunction'
/usr/include/readline/rltypedefs.h:37:27: warning: non-ANSI function declaration of function 'CPFunction'
/usr/include/readline/rltypedefs.h:38:29: warning: non-ANSI function declaration of function 'CPPFunction'
src/shared/shell.c:609:21: warning: non-ANSI function declaration of function 'bt_shell_usage'
tools/mesh-cfgtest.c:1453:17: warning: unknown escape sequence: '\%'
tools/sco-tester.c: note: in included file:
./lib/bluetooth.h:186:15: warning: array of flexible structures
./lib/bluetooth.h:191:31: warning: array of flexible structures
tools/bneptest.c:634:39: warning: unknown escape sequence: '\%'
tools/seq2bseq.c:57:26: warning: Variable length array is used.
tools/obex-client-tool.c: note: in included file (through /usr/include/readline/readline.h):
/usr/include/readline/rltypedefs.h:35:23: warning: non-ANSI function declaration of function 'Function'
/usr/include/readline/rltypedefs.h:36:25: warning: non-ANSI function declaration of function 'VFunction'
/usr/include/readline/rltypedefs.h:37:27: warning: non-ANSI function declaration of function 'CPFunction'
/usr/include/readline/rltypedefs.h:38:29: warning: non-ANSI function declaration of function 'CPPFunction'
android/avctp.c:505:34: warning: Variable length array is used.
android/avctp.c:556:34: warning: Variable length array is used.
unit/test-avrcp.c:373:26: warning: Variable length array is used.
unit/test-avrcp.c:398:26: warning: Variable length array is used.
unit/test-avrcp.c:414:24: warning: Variable length array is used.
android/avrcp-lib.c:1085:34: warning: Variable length array is used.
android/avrcp-lib.c:1583:34: warning: Variable length array is used.
android/avrcp-lib.c:1612:34: warning: Variable length array is used.
android/avrcp-lib.c:1638:34: warning: Variable length array is used.
profiles/input/device.c:165:26: warning: Variable length array is used.
btio/btio.c:72:28: error: field ‘qos’ has incomplete type
   72 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
btio/btio.c: In function ‘iso_set’:
btio/btio.c:863:38: error: ‘BT_ISO_UNICAST_QOS’ undeclared (first use in this function)
  863 |  if (setsockopt(sock, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, qos,
      |                                      ^~~~~~~~~~~~~~~~~~
btio/btio.c:863:38: note: each undeclared identifier is reported only once for each function it appears in
btio/btio.c:864:12: error: dereferencing pointer to incomplete type ‘struct bt_iso_unicast_qos’
  864 |     sizeof(*qos)) < 0) {
      |            ^~~~
btio/btio.c: In function ‘iso_get’:
btio/btio.c:1574:28: error: storage size of ‘qos’ isn’t known
 1574 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
btio/btio.c:1580:38: error: ‘BT_ISO_UNICAST_QOS’ undeclared (first use in this function)
 1580 |  if (getsockopt(sock, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, &qos,
      |                                      ^~~~~~~~~~~~~~~~~~
btio/btio.c:1574:28: error: unused variable ‘qos’ [-Werror=unused-variable]
 1574 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:10380: btio/bluetoothd-btio.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4506: all] Error 2
##############################
Test: bluezmakeextell - FAIL
Desc: Build Bluez with External ELL
Output:

btio/btio.c:72:28: error: field ‘qos’ has incomplete type
   72 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
btio/btio.c: In function ‘iso_set’:
btio/btio.c:863:38: error: ‘BT_ISO_UNICAST_QOS’ undeclared (first use in this function)
  863 |  if (setsockopt(sock, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, qos,
      |                                      ^~~~~~~~~~~~~~~~~~
btio/btio.c:863:38: note: each undeclared identifier is reported only once for each function it appears in
btio/btio.c:864:12: error: dereferencing pointer to incomplete type ‘struct bt_iso_unicast_qos’
  864 |     sizeof(*qos)) < 0) {
      |            ^~~~
btio/btio.c: In function ‘iso_get’:
btio/btio.c:1574:28: error: storage size of ‘qos’ isn’t known
 1574 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
btio/btio.c:1580:38: error: ‘BT_ISO_UNICAST_QOS’ undeclared (first use in this function)
 1580 |  if (getsockopt(sock, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, &qos,
      |                                      ^~~~~~~~~~~~~~~~~~
btio/btio.c:1574:28: error: unused variable ‘qos’ [-Werror=unused-variable]
 1574 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:10380: btio/bluetoothd-btio.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4506: all] Error 2
##############################
Test: IncrementalBuild - FAIL
Desc: Incremental build with the patches in the series
Output:
[BlueZ,1/8] btio: Use unicast structure for ISO QoS options

tools/mgmt-tester.c: In function ‘main’:
tools/mgmt-tester.c:12514:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
12514 | int main(int argc, char *argv[])
      |     ^~~~
unit/test-avdtp.c: In function ‘main’:
unit/test-avdtp.c:766:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
  766 | int main(int argc, char *argv[])
      |     ^~~~
unit/test-avrcp.c: In function ‘main’:
unit/test-avrcp.c:989:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
  989 | int main(int argc, char *argv[])
      |     ^~~~
btio/btio.c:72:28: error: field ‘qos’ has incomplete type
   72 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
btio/btio.c: In function ‘iso_set’:
btio/btio.c:863:38: error: ‘BT_ISO_UNICAST_QOS’ undeclared (first use in this function)
  863 |  if (setsockopt(sock, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, qos,
      |                                      ^~~~~~~~~~~~~~~~~~
btio/btio.c:863:38: note: each undeclared identifier is reported only once for each function it appears in
btio/btio.c:864:12: error: dereferencing pointer to incomplete type ‘struct bt_iso_unicast_qos’
  864 |     sizeof(*qos)) < 0) {
      |            ^~~~
btio/btio.c: In function ‘iso_get’:
btio/btio.c:1574:28: error: storage size of ‘qos’ isn’t known
 1574 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
btio/btio.c:1580:38: error: ‘BT_ISO_UNICAST_QOS’ undeclared (first use in this function)
 1580 |  if (getsockopt(sock, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, &qos,
      |                                      ^~~~~~~~~~~~~~~~~~
btio/btio.c:1574:28: error: unused variable ‘qos’ [-Werror=unused-variable]
 1574 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:10380: btio/bluetoothd-btio.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4506: all] Error 2
##############################
Test: ScanBuild - FAIL
Desc: Run Scan Build
Output:

src/shared/ad.c:369:19: warning: Use of zero-allocated memory
                                buf[(*pos)++] = ad_type;
                                              ^
1 warning generated.
src/shared/gatt-client.c:451:21: warning: Use of memory after it is freed
        gatt_db_unregister(op->client->db, op->db_id);
                           ^~~~~~~~~~
src/shared/gatt-client.c:696:2: warning: Use of memory after it is freed
        discovery_op_complete(op, false, att_ecode);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:993:2: warning: Use of memory after it is freed
        discovery_op_complete(op, success, att_ecode);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1099:2: warning: Use of memory after it is freed
        discovery_op_complete(op, success, att_ecode);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1291:2: warning: Use of memory after it is freed
        discovery_op_complete(op, success, att_ecode);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1356:2: warning: Use of memory after it is freed
        discovery_op_complete(op, success, att_ecode);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1631:6: warning: Use of memory after it is freed
        if (read_db_hash(op)) {
            ^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1636:2: warning: Use of memory after it is freed
        discover_all(op);
        ^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:2140:6: warning: Use of memory after it is freed
        if (read_db_hash(op)) {
            ^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:2148:8: warning: Use of memory after it is freed
                                                        discovery_op_ref(op),
                                                        ^~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3236:2: warning: Use of memory after it is freed
        complete_write_long_op(req, success, 0, false);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3258:2: warning: Use of memory after it is freed
        request_unref(req);
        ^~~~~~~~~~~~~~~~~~
12 warnings generated.
src/shared/shell.c:1180:13: warning: Access to field 'options' results in a dereference of a null pointer (loaded from variable 'opt')
                        if (c != opt->options[index - offset].val) {
                                 ^~~~~~~~~~~~
1 warning generated.
src/shared/ad.c:369:19: warning: Use of zero-allocated memory
                                buf[(*pos)++] = ad_type;
                                              ^
1 warning generated.
src/shared/gatt-client.c:451:21: warning: Use of memory after it is freed
        gatt_db_unregister(op->client->db, op->db_id);
                           ^~~~~~~~~~
src/shared/gatt-client.c:696:2: warning: Use of memory after it is freed
        discovery_op_complete(op, false, att_ecode);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:993:2: warning: Use of memory after it is freed
        discovery_op_complete(op, success, att_ecode);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1099:2: warning: Use of memory after it is freed
        discovery_op_complete(op, success, att_ecode);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1291:2: warning: Use of memory after it is freed
        discovery_op_complete(op, success, att_ecode);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1356:2: warning: Use of memory after it is freed
        discovery_op_complete(op, success, att_ecode);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1631:6: warning: Use of memory after it is freed
        if (read_db_hash(op)) {
            ^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1636:2: warning: Use of memory after it is freed
        discover_all(op);
        ^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:2140:6: warning: Use of memory after it is freed
        if (read_db_hash(op)) {
            ^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:2148:8: warning: Use of memory after it is freed
                                                        discovery_op_ref(op),
                                                        ^~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3236:2: warning: Use of memory after it is freed
        complete_write_long_op(req, success, 0, false);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3258:2: warning: Use of memory after it is freed
        request_unref(req);
        ^~~~~~~~~~~~~~~~~~
12 warnings generated.
src/shared/shell.c:1180:13: warning: Access to field 'options' results in a dereference of a null pointer (loaded from variable 'opt')
                        if (c != opt->options[index - offset].val) {
                                 ^~~~~~~~~~~~
1 warning generated.
tools/hciattach.c:816:7: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
        if ((n = read_hci_event(fd, resp, 10)) < 0) {
             ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/hciattach.c:864:7: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
        if ((n = read_hci_event(fd, resp, 4)) < 0) {
             ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/hciattach.c:886:8: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
                if ((n = read_hci_event(fd, resp, 10)) < 0) {
                     ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/hciattach.c:908:7: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
        if ((n = read_hci_event(fd, resp, 4)) < 0) {
             ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/hciattach.c:929:7: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
        if ((n = read_hci_event(fd, resp, 4)) < 0) {
             ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/hciattach.c:973:7: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
        if ((n = read_hci_event(fd, resp, 6)) < 0) {
             ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 warnings generated.
src/oui.c:50:2: warning: Value stored to 'hwdb' is never read
        hwdb = udev_hwdb_unref(hwdb);
        ^      ~~~~~~~~~~~~~~~~~~~~~
src/oui.c:53:2: warning: Value stored to 'udev' is never read
        udev = udev_unref(udev);
        ^      ~~~~~~~~~~~~~~~~
2 warnings generated.
tools/hcidump.c:180:9: warning: Potential leak of memory pointed to by 'dp'
                                if (fds[i].fd == sock)
                                    ^~~
tools/hcidump.c:248:17: warning: Assigned value is garbage or undefined
                                dh->ts_sec  = htobl(frm.ts.tv_sec);
                                            ^ ~~~~~~~~~~~~~~~~~~~~
tools/hcidump.c:326:9: warning: 1st function call argument is an uninitialized value
                                if (be32toh(dp.flags) & 0x02) {
                                    ^~~~~~~~~~~~~~~~~
/usr/include/endian.h:46:22: note: expanded from macro 'be32toh'
#  define be32toh(x) __bswap_32 (x)
                     ^~~~~~~~~~~~~~
tools/hcidump.c:341:20: warning: 1st function call argument is an uninitialized value
                                frm.data_len = be32toh(dp.len);
                                               ^~~~~~~~~~~~~~~
/usr/include/endian.h:46:22: note: expanded from macro 'be32toh'
#  define be32toh(x) __bswap_32 (x)
                     ^~~~~~~~~~~~~~
tools/hcidump.c:346:14: warning: 1st function call argument is an uninitialized value
                                opcode = be32toh(dp.flags) & 0xffff;
                                         ^~~~~~~~~~~~~~~~~
/usr/include/endian.h:46:22: note: expanded from macro 'be32toh'
#  define be32toh(x) __bswap_32 (x)
                     ^~~~~~~~~~~~~~
tools/hcidump.c:384:17: warning: Assigned value is garbage or undefined
                        frm.data_len = btohs(dh.len);
                                     ^ ~~~~~~~~~~~~~
tools/hcidump.c:394:11: warning: Assigned value is garbage or undefined
                frm.len = frm.data_len;
                        ^ ~~~~~~~~~~~~
tools/hcidump.c:398:9: warning: 1st function call argument is an uninitialized value
                        ts = be64toh(ph.ts);
                             ^~~~~~~~~~~~~~
/usr/include/endian.h:51:22: note: expanded from macro 'be64toh'
#  define be64toh(x) __bswap_64 (x)
                     ^~~~~~~~~~~~~~
tools/hcidump.c:403:13: warning: 1st function call argument is an uninitialized value
                        frm.in = be32toh(dp.flags) & 0x01;
                                 ^~~~~~~~~~~~~~~~~
/usr/include/endian.h:46:22: note: expanded from macro 'be32toh'
#  define be32toh(x) __bswap_32 (x)
                     ^~~~~~~~~~~~~~
tools/hcidump.c:408:11: warning: Assigned value is garbage or undefined
                        frm.in = dh.in;
                               ^ ~~~~~
tools/hcidump.c:437:7: warning: Null pointer passed to 1st parameter expecting 'nonnull'
        fd = open(file, open_flags, 0644);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
11 warnings generated.
tools/rfcomm.c:228:3: warning: Value stored to 'i' is never read
                i = execvp(cmdargv[0], cmdargv);
                ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/rfcomm.c:228:7: warning: Null pointer passed to 1st parameter expecting 'nonnull'
                i = execvp(cmdargv[0], cmdargv);
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/rfcomm.c:348:8: warning: Although the value stored to 'fd' is used in the enclosing expression, the value is never actually read from 'fd'
                if ((fd = open(devname, O_RDONLY | O_NOCTTY)) < 0) {
                     ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/rfcomm.c:491:14: warning: Assigned value is garbage or undefined
        req.channel = raddr.rc_channel;
                    ^ ~~~~~~~~~~~~~~~~
tools/rfcomm.c:509:8: warning: Although the value stored to 'fd' is used in the enclosing expression, the value is never actually read from 'fd'
                if ((fd = open(devname, O_RDONLY | O_NOCTTY)) < 0) {
                     ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 warnings generated.
src/sdp-xml.c:126:10: warning: Assigned value is garbage or undefined
                buf[1] = data[i + 1];
                       ^ ~~~~~~~~~~~
src/sdp-xml.c:300:11: warning: Assigned value is garbage or undefined
                        buf[1] = data[i + 1];
                               ^ ~~~~~~~~~~~
src/sdp-xml.c:338:11: warning: Assigned value is garbage or undefined
                        buf[1] = data[i + 1];
                               ^ ~~~~~~~~~~~
3 warnings generated.
tools/ciptool.c:350:7: warning: 5th function call argument is an uninitialized value
        sk = do_connect(ctl, dev_id, &src, &dst, psm, (1 << CMTP_LOOPBACK));
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
tools/sdptool.c:941:26: warning: Result of 'malloc' is converted to a pointer of type 'uint32_t', which is incompatible with sizeof operand type 'int'
                        uint32_t *value_int = malloc(sizeof(int));
                        ~~~~~~~~~~            ^~~~~~ ~~~~~~~~~~~
tools/sdptool.c:980:4: warning: 1st function call argument is an uninitialized value
                        free(allocArray[i]);
                        ^~~~~~~~~~~~~~~~~~~
tools/sdptool.c:3777:2: warning: Potential leak of memory pointed to by 'si.name'
        return add_service(0, &si);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~
tools/sdptool.c:4112:4: warning: Potential leak of memory pointed to by 'context.svc'
                        return -1;
                        ^~~~~~~~~
4 warnings generated.
tools/avtest.c:224:5: warning: Value stored to 'len' is never read
                                len = write(sk, buf, 3);
                                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:234:5: warning: Value stored to 'len' is never read
                                len = write(sk, buf, 4);
                                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:243:5: warning: Value stored to 'len' is never read
                                len = write(sk, buf, 3);
                                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:257:5: warning: Value stored to 'len' is never read
                                len = write(sk, buf,
                                ^     ~~~~~~~~~~~~~~
tools/avtest.c:264:5: warning: Value stored to 'len' is never read
                                len = write(sk, buf,
                                ^     ~~~~~~~~~~~~~~
tools/avtest.c:271:5: warning: Value stored to 'len' is never read
                                len = write(sk, buf,
                                ^     ~~~~~~~~~~~~~~
tools/avtest.c:278:5: warning: Value stored to 'len' is never read
                                len = write(sk, buf,
                                ^     ~~~~~~~~~~~~~~
tools/avtest.c:289:5: warning: Value stored to 'len' is never read
                                len = write(sk, buf, 4);
                                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:293:5: warning: Value stored to 'len' is never read
                                len = write(sk, buf, 2);
                                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:302:5: warning: Value stored to 'len' is never read
                                len = write(sk, buf, 3);
                                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:306:5: warning: Value stored to 'len' is never read
                                len = write(sk, buf, 2);
                                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:315:5: warning: Value stored to 'len' is never read
                                len = write(sk, buf, 3);
                                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:322:5: warning: Value stored to 'len' is never read
                                len = write(sk, buf, 2);
                                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:344:5: warning: Value stored to 'len' is never read
                                len = write(sk, buf, 4);
                                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:348:5: warning: Value stored to 'len' is never read
                                len = write(sk, buf, 2);
                                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:357:5: warning: Value stored to 'len' is never read
                                len = write(sk, buf, 3);
                                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:361:5: warning: Value stored to 'len' is never read
                                len = write(sk, buf, 2);
                                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:374:5: warning: Value stored to 'len' is never read
                                len = write(sk, buf, 4);
                                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:378:5: warning: Value stored to 'len' is never read
                                len = write(sk, buf, 2);
                                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:385:4: warning: Value stored to 'len' is never read
                        len = write(sk, buf, 2);
                        ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:395:4: warning: Value stored to 'len' is never read
                        len = write(sk, buf, 2);
                        ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:559:3: warning: Value stored to 'len' is never read
                len = write(sk, buf, 2);
                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:567:3: warning: Value stored to 'len' is never read
                len = write(sk, buf, invalid ? 2 : 3);
                ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/avtest.c:581:3: warning: Value stored to 'len' is never read
                len = write(sk, buf, 4 + sizeof(media_transport));
                ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/avtest.c:594:3: warning: Value stored to 'len' is never read
                len = write(sk, buf, 3);
                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:604:3: warning: Value stored to 'len' is never read
                len = write(sk, buf, 3);
                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:616:3: warning: Value stored to 'len' is never read
                len = write(sk, buf, 3);
                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:631:3: warning: Value stored to 'len' is never read
                len = write(sk, buf, 3);
                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:643:3: warning: Value stored to 'len' is never read
                len = write(sk, buf, 3);
                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:652:3: warning: Value stored to 'len' is never read
                len = write(sk, buf, 3);
                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:659:3: warning: Value stored to 'len' is never read
                len = write(sk, buf, 2);
                ^     ~~~~~~~~~~~~~~~~~
tools/avtest.c:695:2: warning: Value stored to 'len' is never read
        len = write(sk, buf, AVCTP_HEADER_LENGTH + sizeof(play_pressed));
        ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 warnings generated.
tools/btproxy.c:836:15: warning: Null pointer passed to 1st parameter expecting 'nonnull'
                        tcp_port = atoi(optarg);
                                   ^~~~~~~~~~~~
tools/btproxy.c:839:8: warning: Null pointer passed to 1st parameter expecting 'nonnull'
                        if (strlen(optarg) > 3 && !strncmp(optarg, "hci", 3))
                            ^~~~~~~~~~~~~~
2 warnings generated.
tools/create-image.c:76:3: warning: Value stored to 'fd' is never read
                fd = -1;
                ^    ~~
tools/create-image.c:84:3: warning: Value stored to 'fd' is never read
                fd = -1;
                ^    ~~
tools/create-image.c:92:3: warning: Value stored to 'fd' is never read
                fd = -1;
                ^    ~~
tools/create-image.c:105:2: warning: Value stored to 'fd' is never read
        fd = -1;
        ^    ~~
4 warnings generated.
tools/btgatt-client.c:1597:2: warning: Value stored to 'argv' is never read
        argv += optind;
        ^       ~~~~~~
1 warning generated.
tools/btgatt-server.c:1212:2: warning: Value stored to 'argv' is never read
        argv -= optind;
        ^       ~~~~~~
1 warning generated.
tools/check-selftest.c:42:3: warning: Value stored to 'ptr' is never read
                ptr = fgets(result, sizeof(result), fp);
                ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
tools/gatt-service.c:294:2: warning: 2nd function call argument is an uninitialized value
        chr_write(chr, value, len);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
tools/obex-server-tool.c:133:13: warning: Null pointer passed to 1st parameter expecting 'nonnull'
        data->fd = open(name, O_WRONLY | O_CREAT | O_NOCTTY, 0600);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/obex-server-tool.c:192:13: warning: Null pointer passed to 1st parameter expecting 'nonnull'
        data->fd = open(name, O_RDONLY | O_NOCTTY, 0);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
tools/btpclientctl.c:402:3: warning: Value stored to 'bit' is never read
                bit = 0;
                ^     ~
tools/btpclientctl.c:1655:2: warning: Null pointer passed to 2nd parameter expecting 'nonnull'
        memcpy(cp->data, ad_data, ad_len);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
src/sdpd-request.c:211:13: warning: Result of 'malloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'uint16_t'
                                pElem = malloc(sizeof(uint16_t));
                                        ^~~~~~ ~~~~~~~~~~~~~~~~
src/sdpd-request.c:239:13: warning: Result of 'malloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'uint32_t'
                                pElem = malloc(sizeof(uint32_t));
                                        ^~~~~~ ~~~~~~~~~~~~~~~~
2 warnings generated.
android/avrcp-lib.c:1968:3: warning: 1st function call argument is an uninitialized value
                g_free(text[i]);
                ^~~~~~~~~~~~~~~
1 warning generated.
unit/test-midi.c:541:82: error: function definition is not allowed here
        void compare_events_cb(const struct midi_write_parser *parser, void *user_data) {
                                                                                        ^
unit/test-midi.c:587:17: error: use of undeclared identifier 'compare_events_cb'; did you mean 'compare_events'?
                                     compare_events_cb, &midi_data);
                                     ^~~~~~~~~~~~~~~~~
                                     compare_events
unit/test-midi.c:237:13: note: 'compare_events' declared here
static void compare_events(const snd_seq_event_t *ev1,
            ^
2 errors generated.
profiles/health/hdp.c:644:3: warning: Use of memory after it is freed
                hdp_tmp_dc_data_unref(dc_data);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
profiles/health/hdp.c:800:19: warning: Use of memory after it is freed
                path = g_strdup(chan->path);
                                ^~~~~~~~~~
profiles/health/hdp.c:1779:6: warning: Use of memory after it is freed
                                        hdp_tmp_dc_data_ref(hdp_conn),
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
profiles/health/hdp.c:1836:30: warning: Use of memory after it is freed
        reply = g_dbus_create_error(data->msg, ERROR_INTERFACE ".HealthError",
                                    ^~~~~~~~~
4 warnings generated.
profiles/health/hdp_util.c:1053:2: warning: Use of memory after it is freed
        conn_data->func(conn_data->data, gerr);
        ^~~~~~~~~~~~~~~
1 warning generated.
profiles/midi/midi.c:61:75: error: function definition is not allowed here
        void foreach_cb(const struct midi_write_parser *parser, void *user_data) {
                                                                                 ^
profiles/midi/midi.c:78:40: error: use of undeclared identifier 'foreach_cb'
                midi_read_ev(&midi->midi_out, event, foreach_cb, midi);
                                                     ^
2 errors generated.
btio/btio.c:72:28: error: field ‘qos’ has incomplete type
   72 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
btio/btio.c: In function ‘iso_set’:
btio/btio.c:863:38: error: ‘BT_ISO_UNICAST_QOS’ undeclared (first use in this function)
  863 |  if (setsockopt(sock, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, qos,
      |                                      ^~~~~~~~~~~~~~~~~~
btio/btio.c:863:38: note: each undeclared identifier is reported only once for each function it appears in
btio/btio.c:864:12: error: dereferencing pointer to incomplete type ‘struct bt_iso_unicast_qos’
  864 |     sizeof(*qos)) < 0) {
      |            ^~~~
btio/btio.c: In function ‘iso_get’:
btio/btio.c:1574:28: error: storage size of ‘qos’ isn’t known
 1574 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
btio/btio.c:1580:38: error: ‘BT_ISO_UNICAST_QOS’ undeclared (first use in this function)
 1580 |  if (getsockopt(sock, SOL_BLUETOOTH, BT_ISO_UNICAST_QOS, &qos,
      |                                      ^~~~~~~~~~~~~~~~~~
btio/btio.c:1574:28: error: unused variable ‘qos’ [-Werror=unused-variable]
 1574 |  struct bt_iso_unicast_qos qos;
      |                            ^~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:10380: btio/bluetoothd-btio.o] Error 1
make[1]: *** Waiting for unfinished jobs....
attrib/gatt.c:970:2: warning: Potential leak of memory pointed to by 'long_write'
        return prepare_write(long_write);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
make: *** [Makefile:4506: all] Error 2


---
Regards,
Linux Bluetooth


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

* RE: Split bt_iso_qos into dedicated structures
  2023-03-27 13:46 [PATCH BlueZ 1/1] " Iulia Tanasescu
@ 2023-03-27 15:19 ` bluez.test.bot
  0 siblings, 0 replies; 14+ messages in thread
From: bluez.test.bot @ 2023-03-27 15:19 UTC (permalink / raw)
  To: linux-bluetooth, iulia.tanasescu

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

---Test result---

Test Summary:
CheckPatch                    PASS      0.86 seconds
GitLint                       PASS      0.31 seconds
BuildEll                      PASS      32.25 seconds
BluezMake                     PASS      986.91 seconds
MakeCheck                     PASS      12.11 seconds
MakeDistcheck                 PASS      178.58 seconds
CheckValgrind                 PASS      289.54 seconds
CheckSmatch                   WARNING   384.64 seconds
bluezmakeextell               PASS      117.29 seconds
IncrementalBuild              PASS      821.51 seconds
ScanBuild                     PASS      1166.00 seconds

Details
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
emulator/bthost.c:584:28: warning: Variable length array is used.emulator/bthost.c:741:28: warning: Variable length array is used.


---
Regards,
Linux Bluetooth


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

* RE: Split bt_iso_qos into dedicated structures
  2023-03-28  7:26 [PATCH BlueZ v2 1/1] " Iulia Tanasescu
@ 2023-03-28  8:46 ` bluez.test.bot
  0 siblings, 0 replies; 14+ messages in thread
From: bluez.test.bot @ 2023-03-28  8:46 UTC (permalink / raw)
  To: linux-bluetooth, iulia.tanasescu

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

---Test result---

Test Summary:
CheckPatch                    PASS      0.81 seconds
GitLint                       PASS      0.26 seconds
BuildEll                      PASS      32.97 seconds
BluezMake                     PASS      1004.38 seconds
MakeCheck                     PASS      12.64 seconds
MakeDistcheck                 PASS      182.43 seconds
CheckValgrind                 PASS      296.33 seconds
CheckSmatch                   WARNING   392.58 seconds
bluezmakeextell               PASS      118.78 seconds
IncrementalBuild              PASS      815.07 seconds
ScanBuild                     PASS      1224.98 seconds

Details
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
emulator/bthost.c:584:28: warning: Variable length array is used.emulator/bthost.c:741:28: warning: Variable length array is used.


---
Regards,
Linux Bluetooth


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

* RE: Split bt_iso_qos into dedicated structures
  2023-03-31 15:39 [PATCH BlueZ v3 1/1] Split bt_iso_qos into dedicated structures Iulia Tanasescu
@ 2023-03-31 17:10 ` bluez.test.bot
  0 siblings, 0 replies; 14+ messages in thread
From: bluez.test.bot @ 2023-03-31 17:10 UTC (permalink / raw)
  To: linux-bluetooth, iulia.tanasescu

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

---Test result---

Test Summary:
CheckPatch                    PASS      0.87 seconds
GitLint                       PASS      0.33 seconds
BuildEll                      PASS      26.26 seconds
BluezMake                     PASS      761.90 seconds
MakeCheck                     PASS      10.89 seconds
MakeDistcheck                 PASS      150.00 seconds
CheckValgrind                 PASS      240.87 seconds
CheckSmatch                   WARNING   323.20 seconds
bluezmakeextell               PASS      97.50 seconds
IncrementalBuild              PASS      609.39 seconds
ScanBuild                     PASS      964.60 seconds

Details
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
emulator/bthost.c:584:28: warning: Variable length array is used.emulator/bthost.c:741:28: warning: Variable length array is used.


---
Regards,
Linux Bluetooth


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

end of thread, other threads:[~2023-03-31 17:10 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-20 14:37 [PATCH BlueZ 0/8] Split bt_iso_qos into dedicated structures Iulia Tanasescu
2023-03-20 14:37 ` [PATCH BlueZ 1/8] btio: Use unicast structure for ISO QoS options Iulia Tanasescu
2023-03-20 15:11   ` Split bt_iso_qos into dedicated structures bluez.test.bot
2023-03-20 14:37 ` [PATCH BlueZ 2/8] client/player: Use unicast structure for ISO QoS options Iulia Tanasescu
2023-03-20 14:37 ` [PATCH BlueZ 3/8] emulator/bthost: pass unicast QoS structure to bthost_set_cig_params Iulia Tanasescu
2023-03-20 14:37 ` [PATCH BlueZ 4/8] lib: split bt_iso_qos into dedicated structures Iulia Tanasescu
2023-03-20 14:37 ` [PATCH BlueZ 5/8] profiles/audio/bap: Use unicast structure for ISO QoS options Iulia Tanasescu
2023-03-20 14:37 ` [PATCH BlueZ 6/8] tools/btiotest: Use unicast QoS structure for ISO io Iulia Tanasescu
2023-03-20 14:37 ` [PATCH BlueZ 7/8] tools/isotest: Use dedicated ISO QoS options for unicast and broadcast Iulia Tanasescu
2023-03-20 14:37 ` [PATCH BlueZ 8/8] tools/iso-tester: " Iulia Tanasescu
  -- strict thread matches above, loose matches on Subject: below --
2023-03-31 15:39 [PATCH BlueZ v3 1/1] Split bt_iso_qos into dedicated structures Iulia Tanasescu
2023-03-31 17:10 ` bluez.test.bot
2023-03-28  7:26 [PATCH BlueZ v2 1/1] " Iulia Tanasescu
2023-03-28  8:46 ` bluez.test.bot
2023-03-27 13:46 [PATCH BlueZ 1/1] " Iulia Tanasescu
2023-03-27 15:19 ` bluez.test.bot
2023-03-20 14:36 [PATCH 1/1] Bluetooth: " Iulia Tanasescu
2023-03-20 15:03 ` bluez.test.bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.