linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: iso-tester: Add test for bcast AC 13 reconnect
  2023-10-30 15:49 [PATCH BlueZ 1/1] " Iulia Tanasescu
@ 2023-10-30 17:26 ` bluez.test.bot
  0 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2023-10-30 17:26 UTC (permalink / raw)
  To: linux-bluetooth, iulia.tanasescu

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

---Test result---

Test Summary:
CheckPatch                    PASS      0.60 seconds
GitLint                       PASS      0.35 seconds
BuildEll                      PASS      32.28 seconds
BluezMake                     PASS      972.17 seconds
MakeCheck                     PASS      12.97 seconds
MakeDistcheck                 PASS      198.74 seconds
CheckValgrind                 PASS      311.27 seconds
CheckSmatch                   PASS      409.65 seconds
bluezmakeextell               PASS      134.66 seconds
IncrementalBuild              PASS      819.26 seconds
ScanBuild                     PASS      1230.74 seconds



---
Regards,
Linux Bluetooth


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

* [PATCH BlueZ 0/1] iso-tester: Add test for bcast AC 13 reconnect
@ 2023-11-01 15:31 Iulia Tanasescu
  2023-11-01 15:31 ` [PATCH BlueZ 1/1] " Iulia Tanasescu
  0 siblings, 1 reply; 5+ messages in thread
From: Iulia Tanasescu @ 2023-11-01 15:31 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: claudia.rosu, mihai-octavian.urzica, silviu.barbulescu,
	vlad.pruteanu, andrei.istodorescu, luiz.dentz, Iulia Tanasescu

This adds a test for the Broadcast AC 13 reconnect scenario: 2 BIS
sockets are connected, one of them is closed and then reopened, and
it is reassociated with the free BIS hcon inside the kernel space.

This depends on the kernel support added by patch
Bluetooth: ISO: Reassociate a socket with an active BIS.

Iulia Tanasescu (1):
  iso-tester: Add test for bcast AC 13 reconnect

 tools/iso-tester.c | 60 +++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 54 insertions(+), 6 deletions(-)


base-commit: 00fdb61d56161f523e975b4c044030f4b40abb6d
-- 
2.39.2


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

* [PATCH BlueZ 1/1] iso-tester: Add test for bcast AC 13 reconnect
  2023-11-01 15:31 [PATCH BlueZ 0/1] iso-tester: Add test for bcast AC 13 reconnect Iulia Tanasescu
@ 2023-11-01 15:31 ` Iulia Tanasescu
  2023-11-01 16:37   ` bluez.test.bot
  0 siblings, 1 reply; 5+ messages in thread
From: Iulia Tanasescu @ 2023-11-01 15:31 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: claudia.rosu, mihai-octavian.urzica, silviu.barbulescu,
	vlad.pruteanu, andrei.istodorescu, luiz.dentz, Iulia Tanasescu

This adds a test for Broadcast AC 13 reconnect:

ISO Broadcaster AC 13 Reconnect - Success

---
 tools/iso-tester.c | 60 +++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 54 insertions(+), 6 deletions(-)

diff --git a/tools/iso-tester.c b/tools/iso-tester.c
index ae98af775..9fccbaa80 100644
--- a/tools/iso-tester.c
+++ b/tools/iso-tester.c
@@ -32,6 +32,7 @@
 #include "src/shared/tester.h"
 #include "src/shared/mgmt.h"
 #include "src/shared/util.h"
+#include "src/shared/queue.h"
 
 #define QOS_IO(_interval, _latency, _sdu, _phy, _rtn) \
 { \
@@ -388,7 +389,7 @@ struct test_data {
 	uint8_t accept_reason;
 	uint16_t handle;
 	uint16_t acl_handle;
-	GIOChannel *io;
+	struct queue *io_queue;
 	unsigned int io_id[2];
 	uint8_t client_num;
 	int step;
@@ -592,12 +593,19 @@ static void test_post_teardown(const void *test_data)
 	data->hciemu = NULL;
 }
 
+static void io_free(void *data)
+{
+	GIOChannel *io = data;
+
+	g_io_channel_unref(io);
+}
+
 static void test_data_free(void *test_data)
 {
 	struct test_data *data = test_data;
 
-	if (data->io)
-		g_io_channel_unref(data->io);
+	if (data->io_queue)
+		queue_destroy(data->io_queue, io_free);
 
 	if (data->io_id[0] > 0)
 		g_source_remove(data->io_id[0]);
@@ -1181,6 +1189,16 @@ static const struct iso_client_data bcast_ac_13_1_1 = {
 	.base_len = sizeof(base_lc3_ac_13),
 };
 
+static const struct iso_client_data bcast_ac_13_1_1_reconn = {
+	.qos = BCAST_AC_13_1_1,
+	.expect_err = 0,
+	.bcast = true,
+	.mconn = true,
+	.base = base_lc3_ac_13,
+	.base_len = sizeof(base_lc3_ac_13),
+	.disconnect = true,
+};
+
 static const struct iso_client_data bcast_ac_13_1 = {
 	.qos = BCAST_AC_13_1,
 	.expect_err = 0,
@@ -1911,10 +1929,14 @@ static gboolean iso_disconnected(GIOChannel *io, GIOCondition cond,
 							gpointer user_data)
 {
 	struct test_data *data = user_data;
+	const struct iso_client_data *isodata = data->test_data;
 
 	data->io_id[0] = 0;
 
-	if ((cond & G_IO_HUP) && !data->handle) {
+	if (cond & G_IO_HUP) {
+		if (!isodata->bcast && data->handle)
+			tester_test_failed();
+
 		tester_print("Successfully disconnected");
 
 		if (data->reconnect) {
@@ -2177,7 +2199,15 @@ static void setup_connect_many(struct test_data *data, uint8_t n, uint8_t *num,
 		data->io_id[num[i]] = g_io_add_watch(io, G_IO_OUT, func[i],
 									NULL);
 
-		g_io_channel_unref(io);
+		if (!isodata->bcast || !data->reconnect)
+			g_io_channel_unref(io);
+		else if (data->io_queue)
+			/* For the broadcast reconnect scenario, do not
+			 * unref channel here, to avoid closing the
+			 * socket. All queued channels will be closed
+			 * by test_data_free.
+			 */
+			queue_push_tail(data->io_queue, io);
 
 		tester_print("Connect %d in progress", num[i]);
 
@@ -2434,7 +2464,9 @@ static bool iso_defer_accept(struct test_data *data, GIOChannel *io)
 
 	tester_print("Accept deferred setup");
 
-	data->io = io;
+	data->io_queue = queue_new();
+	if (data->io_queue)
+		queue_push_tail(data->io_queue, io);
 
 	if (isodata->bcast)
 		data->io_id[0] = g_io_add_watch(io, G_IO_IN,
@@ -2758,6 +2790,18 @@ static void test_bcast2(const void *test_data)
 	setup_connect_many(data, 2, num, funcs);
 }
 
+static void test_bcast2_reconn(const void *test_data)
+{
+	struct test_data *data = tester_get_data();
+	uint8_t num[2] = {0, 1};
+	GIOFunc funcs[2] = {iso_connect_cb, iso_connect2_cb};
+
+	data->io_queue = queue_new();
+
+	data->reconnect = true;
+	setup_connect_many(data, 2, num, funcs);
+}
+
 static void test_bcast_recv(const void *test_data)
 {
 	struct test_data *data = tester_get_data();
@@ -3114,6 +3158,10 @@ int main(int argc, char *argv[])
 	test_iso("ISO Broadcaster AC 13 BIG 0x01 - Success", &bcast_ac_13_1,
 						setup_powered, test_bcast2);
 
+	test_iso("ISO Broadcaster AC 13 Reconnect - Success",
+					&bcast_ac_13_1_1_reconn, setup_powered,
+					test_bcast2_reconn);
+
 	test_iso("ISO Broadcaster AC 14 - Success", &bcast_ac_14, setup_powered,
 							test_bcast);
 
-- 
2.39.2


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

* RE: iso-tester: Add test for bcast AC 13 reconnect
  2023-11-01 15:31 ` [PATCH BlueZ 1/1] " Iulia Tanasescu
@ 2023-11-01 16:37   ` bluez.test.bot
  0 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2023-11-01 16:37 UTC (permalink / raw)
  To: linux-bluetooth, iulia.tanasescu

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

---Test result---

Test Summary:
CheckPatch                    PASS      0.45 seconds
GitLint                       PASS      0.26 seconds
BuildEll                      PASS      27.61 seconds
BluezMake                     PASS      825.75 seconds
MakeCheck                     PASS      12.35 seconds
MakeDistcheck                 PASS      175.30 seconds
CheckValgrind                 PASS      268.33 seconds
CheckSmatch                   PASS      361.86 seconds
bluezmakeextell               PASS      116.24 seconds
IncrementalBuild              PASS      709.40 seconds
ScanBuild                     PASS      1070.42 seconds



---
Regards,
Linux Bluetooth


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

* RE: iso-tester: Add test for bcast AC 13 reconnect
  2023-11-13 15:39 [PATCH BlueZ 1/1] " Iulia Tanasescu
@ 2023-11-13 17:04 ` bluez.test.bot
  0 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2023-11-13 17:04 UTC (permalink / raw)
  To: linux-bluetooth, iulia.tanasescu

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

---Test result---

Test Summary:
CheckPatch                    PASS      0.42 seconds
GitLint                       PASS      0.26 seconds
BuildEll                      PASS      23.98 seconds
BluezMake                     PASS      560.84 seconds
MakeCheck                     PASS      10.55 seconds
MakeDistcheck                 PASS      149.57 seconds
CheckValgrind                 PASS      210.28 seconds
CheckSmatch                   PASS      314.14 seconds
bluezmakeextell               PASS      95.84 seconds
IncrementalBuild              PASS      507.65 seconds
ScanBuild                     PASS      898.84 seconds



---
Regards,
Linux Bluetooth


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

end of thread, other threads:[~2023-11-13 17:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-01 15:31 [PATCH BlueZ 0/1] iso-tester: Add test for bcast AC 13 reconnect Iulia Tanasescu
2023-11-01 15:31 ` [PATCH BlueZ 1/1] " Iulia Tanasescu
2023-11-01 16:37   ` bluez.test.bot
  -- strict thread matches above, loose matches on Subject: below --
2023-11-13 15:39 [PATCH BlueZ 1/1] " Iulia Tanasescu
2023-11-13 17:04 ` bluez.test.bot
2023-10-30 15:49 [PATCH BlueZ 1/1] " Iulia Tanasescu
2023-10-30 17:26 ` bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).