Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp441274rwb; Fri, 4 Aug 2023 15:42:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEaINXcVT0OJKgXtPvyrFwMp4RK7TEwvNktnH++sekx7DBrzufKrbQYSTxJm5Nz4hIw37+Y X-Received: by 2002:a17:906:18c:b0:994:542c:8718 with SMTP id 12-20020a170906018c00b00994542c8718mr2774856ejb.76.1691188978936; Fri, 04 Aug 2023 15:42:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691188978; cv=none; d=google.com; s=arc-20160816; b=QbcuwMv00MDXD/5rRF/os7ScWuW8ifowu95If4OxM628umkn71AlzX0KDMzBy5HFmR aKEw8T6JhBr7+e+20ViY6htrtLvlq2Sesi4CWnu1xlBcAbm4RjPBgFFcHaNSdIABOjFW t6tD1uFCdTQQgHsD3Jet84n3bSZ4gdpfPKigJyaKOGAx7jwSUZ5bgZB1kMeeB3NmcKr1 SDisQM1Yqza+nKl+T/8yv8wcsAvd0iCgkzruI6CH6QK63Q3oxjgK41NRA+1SGa4jB4W2 8/hXz4BDyCAxCVYqZY0pdj9QzFG/jsENORaEcUJkvfq2jipcI0bJu6MX6Whsw8OFxP65 zxrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=wcPD8Y1vhTS4cLo5TwWcMcUQdnD7VR1S6yJwpJxEoxw=; fh=V2LL5OuZUBGeSu6TXDWykcThOoazTGUpkln19rrO2KM=; b=cfvtyqVKeifGg3/NNjjpf+98Is0lez8et7AZmB180JfCemD5ZQc9xT8RupdXZwsaR7 H1IWhjpbsdBIZs3DguVNWnThkqKGxkcPZs4c6xtcsK6EvT4iVkuCW+Ae+LMFv8eIRZDj CfmIia0HfHEPqQZ3j8NXcVNyhTA5YccT+SmoD/T6izFzt4QSHda5luL5d98ZexqCreL1 H+kM2a5/VZcoxCrks1vfZ54P/01dpp5CaKW48OzUXKpoVW3B7I0GnqPG4To224h/7RLW d4XsfD1XfUco2A8OJbI++w2STsze8YyLTl7yQZ8zm1BKisZpy6fNTUGlHjhQ6u+RNnDJ MoOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=mvhBp9Bm; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h16-20020a170906261000b0098e444cba76si820209ejc.91.2023.08.04.15.42.15; Fri, 04 Aug 2023 15:42:58 -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; dkim=pass header.i=@gmail.com header.s=20221208 header.b=mvhBp9Bm; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229731AbjHDV5i (ORCPT + 99 others); Fri, 4 Aug 2023 17:57:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229557AbjHDV5h (ORCPT ); Fri, 4 Aug 2023 17:57:37 -0400 Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D929B106 for ; Fri, 4 Aug 2023 14:57:36 -0700 (PDT) Received: by mail-io1-xd2b.google.com with SMTP id ca18e2360f4ac-790aeee9928so91359039f.2 for ; Fri, 04 Aug 2023 14:57:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691186255; x=1691791055; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=wcPD8Y1vhTS4cLo5TwWcMcUQdnD7VR1S6yJwpJxEoxw=; b=mvhBp9BmT+h4WBMP34avgU8buGjoUn7wdJYSYs5KHgKw55sB8K1rc9QGHcQPzu/HX6 O7wMfuRdVku5/7IF9jJ5qWv/d6XBl6xPa40GKHMIoHvblfGL1/1ec3uAyWOw58Lrfr+9 jDqGEw2Fpv6f8KBFfeW15ZaYDn1hzVO+Tx/wb04oXtsk45M8ay1jH36UQhtPcfl1nVct f0iRvWU3lc+Am3/ruLVcTJcl4IF4h8XGdqUHqlJTs5hlQeDa+Ts0UyMDMZyojKed9XLV k9omXscp2OpALEC+wSs8OGy24IpG+bE1XF6eCq1AeUaeipTlW8LIOY1KwhRtnbpGLpgf DqKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691186255; x=1691791055; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wcPD8Y1vhTS4cLo5TwWcMcUQdnD7VR1S6yJwpJxEoxw=; b=e5AqJ1cojYZFFAyqqbB7munOG4AEvEtSgl437X/s2XZmL6dxHjBT21a3O6WActPjAP l498cBnN3hCz+JjvNZua9SL5WoGM+KfipvxUGIllkPQzp3puhAA8ijS0qK9J7xD+1EVF 2VYTOu21aIr38ZZR0iSb1VrK90dnIynS1v7cFksHeW8aSIbm8fX8382xFkliO34iA2JR BKOAlQ2y8uX/hK3IRgzEyd6sHODO3UJS9HYp4OdxeLbO6TRA3pfz7V3gxzYuby2mSzZ9 8uWc1lZHxkrcyM2B3fdT0evciBVajJVBtzozfms8hLucCgEhr7cebwXahlJiDhFrt7pv M6/Q== X-Gm-Message-State: AOJu0Yxc5IdmG3WRzs5ZFJAoZOAuFEs+Q5dbFxr5P4eooRtXK1+tReM1 n0v2Z6d+zXp0p29tDwCReIdcfjXfr8k= X-Received: by 2002:a5d:960d:0:b0:783:5209:c01 with SMTP id w13-20020a5d960d000000b0078352090c01mr3769980iol.17.1691186255419; Fri, 04 Aug 2023 14:57:35 -0700 (PDT) Received: from lvondent-mobl4.. (c-71-236-201-58.hsd1.or.comcast.net. [71.236.201.58]) by smtp.gmail.com with ESMTPSA id ft25-20020a056638661900b0042b1cd4c096sm794256jab.74.2023.08.04.14.57.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 14:57:34 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ] iso-tester: Fix test ISO Connect2 CIG 0x01 - Success/Invalid Date: Fri, 4 Aug 2023 14:57:33 -0700 Message-ID: <20230804215733.1049271-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 From: Luiz Augusto von Dentz This test shall succeed rather than fail as this appears to be a bug in the kernel code preventing Set CIG Parameters to work properly when there are concurrent tasks only one CIS is being programmed. --- tools/iso-tester.c | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/tools/iso-tester.c b/tools/iso-tester.c index bbf959420488..9b9716e06bdb 100644 --- a/tools/iso-tester.c +++ b/tools/iso-tester.c @@ -2402,29 +2402,6 @@ static void test_connect2_seq(const void *test_data) setup_connect(data, 0, iso_connect2_seq_cb); } -static void test_connect2_nodefer(const void *test_data) -{ - struct test_data *data = tester_get_data(); - int sk, err; - - /* Second connect() shall fail, because CIG is then busy, - * but the first connect() shall succeed. - */ - setup_connect(data, 0, iso_connect_cb); - - sk = create_iso_sock(data); - if (sk < 0) { - tester_test_failed(); - return; - } - - err = connect_iso_sock(data, 1, sk); - if (err != -EINVAL) - tester_test_failed(); - - close(sk); -} - static gboolean iso_connect_close_cb(GIOChannel *io, GIOCondition cond, gpointer user_data) { @@ -2697,13 +2674,13 @@ int main(int argc, char *argv[]) test_iso("ISO Connect Wait Close - Success", &connect_16_2_1, setup_powered, test_connect_wait_close); - test_iso2("ISO Defer Connect2 CIG 0x01 - Success", &defer_1_16_2_1, + test_iso2("ISO Connect2 CIG 0x01 - Success", &connect_1_16_2_1, setup_powered, test_connect2); - test_iso2("ISO Connect2 CIG 0x01 - Success/Invalid", &connect_1_16_2_1, + test_iso2("ISO Defer Connect2 CIG 0x01 - Success", &defer_1_16_2_1, setup_powered, - test_connect2_nodefer); + test_connect2); test_iso("ISO Defer Send - Success", &connect_16_2_1_defer_send, setup_powered, -- 2.41.0