Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp32520005rwd; Fri, 7 Jul 2023 15:45:16 -0700 (PDT) X-Google-Smtp-Source: APBJJlHEIZv8alGPU8KPYhAAHF0YG3Bb6OdsHgfIolFuZd/QWZjkEnjtiGGmJAhYuvDqs51Et85R X-Received: by 2002:a05:6830:1287:b0:6b9:2189:9301 with SMTP id z7-20020a056830128700b006b921899301mr2018434otp.16.1688769916013; Fri, 07 Jul 2023 15:45:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688769915; cv=none; d=google.com; s=arc-20160816; b=fDeb7Px/rAcfye0/Q7nsEQ21q1A8JS8wyEAPCK+BdPkgyJa33UlYkemM2Lbe8JD9QD QNNGIpnfxXUsbkRM1D7jvm3WAB2PZo+pBwnjW68XW2B1lDvRvL0M250ShRfDt40CIHwj Y8H+udekm/oiBUKxvC4ci9M88tgA8AfAAQmlp04mVYFMIhBZeHpfwLNJhp2vdnPcbFMT HwtueN/+Ws6uJOe+oMmxRYl6aQrMFO8n6sB1x1eAnPVYuyBz/yjrm4IPYFD7BFtjh+Vn /MnNFGEtzENp49Ccy4qwVqs6S1H24l7un7oa57np5iwiXE0yv7NK4YzmcWpvLk7f9s5U 05iA== 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=X9w9UJ+qBqEaJm9FE++i1BQ1SA/D9TEIP9yW0WOBcmo=; fh=V2LL5OuZUBGeSu6TXDWykcThOoazTGUpkln19rrO2KM=; b=AuPzpdhk8rjlwPtKv8ugIoTIEM1jStgI8J0P+vfJCv/SMjRJ20F5VbnL/ZCyUtm6+A YpfLMnDJGjwcEfHy/+zuP4io1VB9wvWzrLUvSMvn7Z6pY663KGhlwKy/OXzzG45gNiBI rhBCDd1P2YJSJ7phVtRfEHRVggKQkG2/vRO1GkFk7vtI1YEYRe76ZRVKrbQEK8A/k3MS zJcCAyJfOMTcNYDd1HZHdeEyncw2B/3hUPrn4pdcFKqr6J2WwZ6mTQFIzMbNUvm9oNr/ 7uPWRvGK3/o9Tbp3WBSmiE+G2fL6uyKr2iMN6KrW7Ve9oYsyY0SfnB3Y0XqT7ZR2NCDJ maYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=jWJyURyy; 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 t4-20020a63f344000000b0055355a29740si4782287pgj.718.2023.07.07.15.44.51; Fri, 07 Jul 2023 15:45:15 -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=jWJyURyy; 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 S229573AbjGGWok (ORCPT + 99 others); Fri, 7 Jul 2023 18:44:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbjGGWoj (ORCPT ); Fri, 7 Jul 2023 18:44:39 -0400 Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C44310C for ; Fri, 7 Jul 2023 15:44:38 -0700 (PDT) Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-635eb3a1d93so16935506d6.1 for ; Fri, 07 Jul 2023 15:44:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688769876; x=1691361876; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=X9w9UJ+qBqEaJm9FE++i1BQ1SA/D9TEIP9yW0WOBcmo=; b=jWJyURyyU4BmURbLNXVLKYTUBkDoAHaxfkyXRyCWBcAsYbACFdIRJ0LPGLs+jAdKYp E6yDXqcrL3/4rrYvBL0egz/Jg4H5wsQIP00mXSTwBi4+2Do5Hv5xsdAhumESOVJ+hUsU ILKiU/9eo/GDy2bZLcHrZUxD0A97b3TQJnVCaDRQjUpl+0GwZJow23D901FbSeZA8MbW /h7jplJNLBc1GLRCASe4yEHehpZeuO+mZvrRmdsme45LjA0DQ5O5VHgpnKEWitArI3vV qv2aYc8/K7PVxmDG/Afe9UQSc+vg1oN2mxZqDPC1PyzTTltk6oeYBXH10L3ER0BMm/gD gCqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688769876; x=1691361876; 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=X9w9UJ+qBqEaJm9FE++i1BQ1SA/D9TEIP9yW0WOBcmo=; b=AwUI6S+foW5eJaeBDXaxe2U6HsH+aIHQoFCFigS6lECrPVUWIEIA+sD+D60HCkChP4 rWbXa7vt9t+U9aOKMsz7QkPucFQr1zvicE+SOxuE10nUkPva/sPTE6ITiX5vndIG3wRK cE+6Sh8hDsYyFHxg6JxZDYaAkodvYTnd2MF28YfaQqUCqh+Oiz0G1Ctgmyw4eT1P05t0 i4f1HE29dNWY/T7PHeY851NFeEh0TsrS7r2VPsqBK1WVcBzw6B4ELtfxu6TWaQ0Gqo7j G07A5JCPJihSFRi1+SV/PSu+kJTmvyPvyTokHRx5DG1O92D/MH+OwEfk4m8mJdIIdfwv Qz3Q== X-Gm-Message-State: ABy/qLbKwkicBqk+aVhdXDB8drVFYZL2gg5520I8UDcTras4AIHcS5Xi 9JMpSdFzXfYhD6VFxI7RlEx6MeDGG/8= X-Received: by 2002:a0c:cb8e:0:b0:636:14d4:4450 with SMTP id p14-20020a0ccb8e000000b0063614d44450mr5549427qvk.3.1688769876462; Fri, 07 Jul 2023 15:44:36 -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 z28-20020a05620a101c00b0076730d0b0b9sm2274482qkj.14.2023.07.07.15.44.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jul 2023 15:44:35 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH v2 1/4] mgmt-tester: Fix tests that consider 31 bytes the max adv lenght Date: Fri, 7 Jul 2023 15:44:31 -0700 Message-Id: <20230707224434.677627-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.40.1 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_NONE,SPF_HELO_NONE,SPF_PASS,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 From: Luiz Augusto von Dentz This fixes a couple of tests that consider 31 bytes the max advertising length since in case of extended advertising that number is actually 251. --- tools/mgmt-tester.c | 71 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 67 insertions(+), 4 deletions(-) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index aec91fb41d3b..7dfd1b0c747d 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -5904,8 +5904,8 @@ static const char ext_adv_hci_params_valid[] = { static const char ext_adv_params_mgmt_rsp_valid_50[] = { 0x01, /* instance */ 0x00, /* tx_power defaults to 0 on BT5 platform*/ - 0x1f, /* max_adv_data_len */ - 0x1f, /* max_scan_rsp_len */ + 0xfb, /* max_adv_data_len */ + 0xfb, /* max_scan_rsp_len */ }; static const char ext_adv_params_mgmt_rsp_valid[] = { @@ -7725,6 +7725,23 @@ static const uint8_t add_advertising_param_scrsp_data_only_too_long[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; @@ -7778,6 +7795,29 @@ static const uint8_t add_advertising_param_scrsp_appear_data_too_long[] = { /* scan rsp data: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; @@ -7991,6 +8031,29 @@ static const uint8_t add_advertising_param_name_data_inv[] = { /* adv data: */ /* scan rsp data: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; @@ -8084,8 +8147,8 @@ static const struct generic_data set_appearance_success = { static const uint8_t read_adv_features_rsp_3[] = { 0xff, 0xff, 0x01, 0x00, /* supported flags */ - 0x1f, /* max_adv_data_len */ - 0x1f, /* max_scan_rsp_len */ + 0xfb, /* max_adv_data_len */ + 0xfb, /* max_scan_rsp_len */ 0x03, /* max_instances */ 0x00, /* num_instances */ }; -- 2.40.1