Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30943015rwd; Thu, 6 Jul 2023 13:05:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlHPvevXReBtED8oTi+Sv7dkYrSirratStRfrR2++vaLAzWe9T1htALk5SNMhPXBvefIEzAv X-Received: by 2002:a17:902:7405:b0:1b8:4baa:52ff with SMTP id g5-20020a170902740500b001b84baa52ffmr2738766pll.47.1688673936045; Thu, 06 Jul 2023 13:05:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688673936; cv=none; d=google.com; s=arc-20160816; b=L6MlBCL48r4fkvpcKuR0Que5BxO0/0UzmQ9I6gA4vKQ30cEekPj4BGNhrUSJxSm+q+ QsJKkVHH8sQMP1gQmxpzDJpW/XbW0r+A7UUtbR5KuV3OEoT9j0Zf5LJeJzDhb3bYej8V dQs0DfCMpD+F7NSKWFpCP2sT2rsnXRdz/1Ms44aqkFC01v0mSBGbzA9d+4ObVGYfItGE k0NWPUFNkedxJRv0LOZKVnmYeNIR9LdwAl+OUFsJihwEKByMY0AzsYzvTHZj+wfTEg5G AZd6/UAaTVozRsepn5WgWWvSjm+4WuOZm8dzjBTBWlmq1n23ttEycYDgSmpsCDEfvL8U C/qg== 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=XzfhIFMrD8dtz8f/TCgkzzmF5KOZixAEb/7KbZg6ixpxGoFBUf2eZMmNrOU7I488Pk D5+I+3II73oszH3lRtDhF48aHsiWyVUBRyZz1SBMDoHEChf0a/MLIo+TY2nUj6NWtgbD M03s5h/F7RBK3MPWYrzuIPrlESCbMqPMGXGJsAD7SW+9Lqjunro5TSc1inSgnIKpy4ar rn4sm7wIwArm3ImGjkjGqEIlZCubxLrWJ3hUrkPDzSTQyrTk0Bm7J9PP2yZjBIhCd1e3 jP0B6zKbcs5o3g32bDyKlFFQzuWlOPc3a7P67/ZlM/Z6ARhvMOwqqXMesjaGRJWWi2t3 Y7rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=H8DAIESZ; 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 f13-20020a170902684d00b001b8970a2b15si1931834pln.86.2023.07.06.13.05.10; Thu, 06 Jul 2023 13:05:36 -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=H8DAIESZ; 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 S230040AbjGFTsH (ORCPT + 99 others); Thu, 6 Jul 2023 15:48:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229609AbjGFTsG (ORCPT ); Thu, 6 Jul 2023 15:48:06 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 484171BEE for ; Thu, 6 Jul 2023 12:48:05 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1b8bd586086so7035815ad.2 for ; Thu, 06 Jul 2023 12:48:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688672884; x=1691264884; 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=H8DAIESZ8l6brIdFrPWbbGZgkcTT4hZXAnAWUGJice7dxp8ePaD5cCxr0C+Oem0XXw 37ZVmzHQYGiQzM9ZM+KDpWlBLEx/espTSbFE4385KeFcAXMtu+JIdpvnUCKZOi5MwXeT gCiPfYG6ChuQGXbXpZoXQOSmgNued4yMjp7HNTy0PiYDnYP9EVzDvAEj+TftQzki1Egx m53CZZL5bks7RhKZSEJNuedm3Ba0HfUYBVwsBw1FD4NEwQZ1iCx2ZN/fQccuuy7QNlFl 7XEHN9MIj0qks57vem/+OepYr+bw+Gyr9ngxJ3zkJ7cMQeAzr/rbwAsJ9XQsXHzvySxU NcMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688672884; x=1691264884; 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=gsMNcMR8Iy64DcBDzHg7EZBueUD6GqnvUK/YhaAyY5Twyhk9jFobP3aHVnmr+8atuV OtNJRToCv7xd7OezoDDWoZE3785dFiBnF6a6CZOKOWvNC/6KPcy8BDJ8Nt6vwHsWWFKI tqSZ8RwxnfM8yN3u3fmLQWlr60+/TqJC3XOXzaqcq02H8VdGN6GI6DAneQ97t+YSrN68 7baj9zcEa1t5sc10Lf6IAnULd4I5LaxWd93gMNa0XmQbT1YOmaihBpH2FKOdi8Kcn4KI t/7WaefjD+UsNVgUIV3GZOsl8KaHcdGu612yWCrijtuM7lthfNnO/e9smsWUaUgCE3F7 yL3A== X-Gm-Message-State: ABy/qLZPzKIUpwaGyhd8DmjslSTOvmnyA9TobYvZVdRE2RA2fXirWo9r LoDI41EP9D1JX8ygydvoSYiu4FXebbg= X-Received: by 2002:a17:902:ec87:b0:1ac:8717:d436 with SMTP id x7-20020a170902ec8700b001ac8717d436mr3270512plg.60.1688672883918; Thu, 06 Jul 2023 12:48:03 -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 jc5-20020a17090325c500b001ac5896e96esm1766651plb.207.2023.07.06.12.48.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 12:48:02 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ] mgmt-tester: Fix tests that consider 31 bytes the max adv lenght Date: Thu, 6 Jul 2023 12:48:01 -0700 Message-Id: <20230706194801.391764-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