Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3434350rwd; Mon, 22 May 2023 13:48:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5fC/LI+4OC/GQ+7DBCWE6jvtld7UV7ZLMPpCqwujVA4ZCACal3bAC1fUJbr2jkyhD42izk X-Received: by 2002:a17:902:e541:b0:1ac:86b5:70d9 with SMTP id n1-20020a170902e54100b001ac86b570d9mr15904901plf.32.1684788525196; Mon, 22 May 2023 13:48:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684788525; cv=none; d=google.com; s=arc-20160816; b=c9187LALru/5XUGsyjOt1Vgg+Tfx1T5VFykqqSE64ZIu38eQdP+Oh58mPxHISzLgeU loDvA50fA4r5nzjMdsW4Y0b0EZTZRTh396oLt1N+LKs296c9pDXSV6MD1LSN3uMyF0g4 y3XxV53bS305UIngtoKrqJlWTU4JKq4Xa46LCuA8eZBvGi0qEOrtchWELdKNPENID1an z2TsXMuGRSR6BnhL0ONeqE8DN17pg7qDCOo2Jw+q7NBIBb7TvxVQ23gEMJyAqqw/ocQF 3Gk7G7h4cHs4YjZ7g8pbteRVp3K0bCAfJTjwwjmxxrJx/IAhtrdb6PIEaS/gfa3HBU/y fWew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=4R1vI0bKngj4E35D2IPZ5dzEevjy4Ba5R+FSrcY/6kE=; b=imYt77uIRtvuEjBl4F1geA8Zbz2ZwaefruL52ECBJNauOM9edFDdDO6ux02XWpMrWX 5/y+NiQEZiRP8G2zSW4MqPTxnCVi6gmPTvPS+k8S7YgZ40hP8fKArsm/ioxEn509uA2M lsx7i8JGMnTu2xNMZB7p1KPbAzaWr2G6Kc4PQyTo1qGipVZMlQGaHCv6lgbFng+SEQtB 1ReYdeHjp5nX5BmzaWlVYDHY/+8kADWdCgFZUaZaRi/0S0AR36Sjovgyx4+nW/d2KKhw Acs/byqQABhKLSX7cToxRJiVxDBYbGem1h+lNqc6Niz15KK209vskR5tAtdmusWq19C6 a5Zg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l15-20020a63be0f000000b0053478158fd3si5121095pgf.827.2023.05.22.13.48.12; Mon, 22 May 2023 13:48:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234811AbjEVUio convert rfc822-to-8bit (ORCPT + 99 others); Mon, 22 May 2023 16:38:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234361AbjEVUin (ORCPT ); Mon, 22 May 2023 16:38:43 -0400 Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D780BB for ; Mon, 22 May 2023 13:38:31 -0700 (PDT) Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 55462240101 for ; Mon, 22 May 2023 22:38:29 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QQ8RS5VrRz6tx9; Mon, 22 May 2023 22:38:28 +0200 (CEST) Message-ID: <5f42d35bf0183db243f7cd577dc81a5322e61980.camel@iki.fi> Subject: Re: [PATCH BlueZ 5/5] iso-tester: add tests for multiple simultaneous CIG From: Pauli Virtanen To: Luiz Augusto von Dentz Cc: linux-bluetooth@vger.kernel.org Date: Mon, 22 May 2023 20:38:28 +0000 In-Reply-To: References: <024df2d86c14fc811701ba27bfa576476bc9c0d6.1684682575.git.pav@iki.fi> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NEUTRAL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Luiz, ma, 2023-05-22 kello 11:28 -0700, Luiz Augusto von Dentz kirjoitti: > Hi Pauli, > > On Sun, May 21, 2023 at 8:32 AM Pauli Virtanen wrote: > > > > Add tests connecting two CIS using different CIG_ID, with fixed and > > auto-allocated IDs. > > > > ISO Connect2 CIG 0x01/0x02 Seq - Success > > ISO Connect2 CIG auto/auto Seq - Success > > > > The CIS are connected sequentially so that the first is closed after the > > second is connected. In the auto/auto case the kernel shall pick a new > > CIG_ID since the first CIG_ID is no longer in a configurable state. > > Is this somewhat similar to AC 7(i) but using different CIGs? I > suspect this is not covered on BAP, although it is a valid audio > configuration, perhaps we could use AC 7(i)-alt or something. Yes, AC 6(ii) but with the CIS in separate CIGs. I'll change the name then. I think BAP only specifies audio configurations with a single CIG. This seems to be valid configuration according to Core spec though, although does not appear to be required. > > > --- > > > > Notes: > > The second tests hits a bug in kernel CIG auto-allocation, which always > > picks CIG_ID 0 even if it is not in a configurable state. > > > > ISO Connect2 CIG auto/auto Seq - Success - setup complete > > ISO Connect2 CIG auto/auto Seq - Success - run > > Connecting to 00:AA:01:01:00:00... > > Connect 0 in progress > > Connecting to 00:AA:01:02:00:01... > > Connect 1 in progress > > Successfully connected > > Step 1 > > Connect failed: Device or resource busy (16) > > Expect error: Success (0) != Device or resource busy (16) > > > > tools/iso-tester.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 48 insertions(+) > > > > diff --git a/tools/iso-tester.c b/tools/iso-tester.c > > index 164cb465f..fc2a84215 100644 > > --- a/tools/iso-tester.c > > +++ b/tools/iso-tester.c > > @@ -64,6 +64,11 @@ > > QOS_IO(_interval, _latency, _sdu, _phy, _rtn), \ > > QOS_IO(_interval, _latency, _sdu, _phy, _rtn)) > > > > +#define QOS_2(_interval, _latency, _sdu, _phy, _rtn) \ > > + QOS_FULL(0x02, BT_ISO_QOS_CIS_UNSET, \ > > + QOS_IO(_interval, _latency, _sdu, _phy, _rtn), \ > > + QOS_IO(_interval, _latency, _sdu, _phy, _rtn)) > > + > > #define QOS_1_1(_interval, _latency, _sdu, _phy, _rtn) \ > > QOS_FULL(0x01, 0x01, \ > > QOS_IO(_interval, _latency, _sdu, _phy, _rtn), \ > > @@ -109,6 +114,7 @@ > > #define QOS_16_1_1 QOS(7500, 8, 30, 0x02, 2) > > #define QOS_16_2_1 QOS(10000, 10, 40, 0x02, 2) > > #define QOS_1_16_2_1 QOS_1(10000, 10, 40, 0x02, 2) > > +#define QOS_2_16_2_1 QOS_2(10000, 10, 40, 0x02, 2) > > #define QOS_1_1_16_2_1 QOS_1_1(10000, 10, 40, 0x02, 2) > > #define QOS_24_1_1 QOS(7500, 8, 45, 0x02, 2) > > #define QOS_24_2_1 QOS(10000, 10, 60, 0x02, 2) > > @@ -546,6 +552,20 @@ static const struct iso_client_data connect_1_16_2_1 = { > > .expect_err = 0 > > }; > > > > +static const struct iso_client_data connect_2_16_2_1 = { > > + .qos = QOS_1_16_2_1, > > + .qos_2 = QOS_2_16_2_1, > > + .expect_err = 0, > > + .mcis = true, > > +}; > > + > > +static const struct iso_client_data connect_2a_16_2_1 = { > > + .qos = QOS_16_2_1, > > + .qos_2 = QOS_16_2_1, > > + .expect_err = 0, > > + .mcis = true, > > +}; > > + > > static const struct iso_client_data connect_1_1_16_2_1 = { > > .qos = QOS_1_1_16_2_1, > > .expect_err = 0 > > @@ -2126,6 +2146,25 @@ static void test_connect2(const void *test_data) > > setup_connect_many(data, 2, num, funcs); > > } > > > > +static gboolean iso_connect2_seq_cb(GIOChannel *io, GIOCondition cond, > > + gpointer user_data) > > +{ > > + struct test_data *data = tester_get_data(); > > + > > + data->io_id[0] = 0; > > + > > + setup_connect(data, 1, iso_connect2_cb); > > + > > + return iso_connect(io, cond, user_data); > > +} > > + > > +static void test_connect2_seq(const void *test_data) > > +{ > > + struct test_data *data = tester_get_data(); > > + > > + setup_connect(data, 0, iso_connect2_seq_cb); > > +} > > + > > static void test_bcast(const void *test_data) > > { > > struct test_data *data = tester_get_data(); > > @@ -2264,6 +2303,15 @@ int main(int argc, char *argv[]) > > test_iso("ISO QoS - Invalid", &connect_invalid, setup_powered, > > test_connect); > > > > + test_iso2("ISO Connect2 CIG 0x01/0x02 Seq - Success", &connect_2_16_2_1, > > + setup_powered, > > + test_connect2_seq); > > + > > + test_iso2("ISO Connect2 CIG auto/auto Seq - Success", > > + &connect_2a_16_2_1, > > + setup_powered, > > + test_connect2_seq); > > + > > test_iso_rej("ISO Connect - Reject", &connect_reject, setup_powered, > > test_connect, BT_HCI_ERR_CONN_FAILED_TO_ESTABLISH); > > > > -- > > 2.40.1 > > > > -- Pauli Virtanen