From patchwork Wed Nov 4 23:42:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Augusto von Dentz X-Patchwork-Id: 11882371 X-Patchwork-Delegate: luiz.dentz@gmail.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,UPPERCASE_50_75,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E31C1C2D0A3 for ; Wed, 4 Nov 2020 23:42:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 921052075E for ; Wed, 4 Nov 2020 23:42:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KL7oTEut" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732916AbgKDXmp (ORCPT ); Wed, 4 Nov 2020 18:42:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732679AbgKDXmc (ORCPT ); Wed, 4 Nov 2020 18:42:32 -0500 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A108C0613CF for ; Wed, 4 Nov 2020 15:42:32 -0800 (PST) Received: by mail-pg1-x536.google.com with SMTP id x13so188716pgp.7 for ; Wed, 04 Nov 2020 15:42:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=keox1HEiUoj/RxUdrmJZB4KSQqLdljvvXfph5b9xClc=; b=KL7oTEutdBAmQSFspMK+43DssP9YRs2tNlVpu6IfsBTUmQt6HFXxbR4x1CRlD3DkG8 Pb2T6XflWXynCl252YVidx8cHf4ZE7ZLgxkkmiL5BZglNpJCpblY9J0utFfelis176Ma YEZb4igSH2DvFkXDd1COMf5tYCq4PbkPeAJ2uGS9oB9DvcEl9gZ8MsNx7RNC1+fxBy8M zwFA3xRwR5dkF2GsbAdY3AcMrNREkVTkJrHwJgoeSD6I+amXUYM9jmVK1nueRRS/BIg5 f79vCgpRoSrqh6lyu4Sd1Mqkdio/JVC2cEuQoPpVmRKdw1kAqeVBq/DU5Mms6ik/EyC9 JY7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=keox1HEiUoj/RxUdrmJZB4KSQqLdljvvXfph5b9xClc=; b=qAQ0L3ckLMStT+vg/bqqSy3KnSx/DgzRiJGI0ZF30iDPXShQ1ltH+m9EdJBy/bqrG/ WCbteIbZEmIqr8noLfHKDf8ZwGObPQC9x9Zb7r+wBDb4Vr+lckiqPAhuGtOP2PxjLHKQ RLD5/qOZ5jzCLgFH90HcowU3Z37KyopdZyKmys/sJotfKJrBasNCplxdQuDI7665q8gn DwzcXg2Dbqnz39bu0yhSyZVTW8jMvdV/6uznR3IpYfh7A2d5SrgF2MKt/pY+xC4VJEmd CNjQC8u0vUXHeNGc4SFayN3tLi1Bnck3odBuMVFjqlFK44Pi5m8lUh/odsTq9vJmkjUa kIEQ== X-Gm-Message-State: AOAM5327AK/S126a7BXHQkJfCzHhFxNmaNsZNiqKYm5zhZr7fajwYzua CNspP/w1nsDxoOsO3Y6jszKq0NQnaoXD3g== X-Google-Smtp-Source: ABdhPJwNT778/FKTEqF0bBs/X0dLj45S07xMXrWir9kKc4PoIgpm72u+aDMMa47HVU1USUFY2yaKEQ== X-Received: by 2002:a17:90a:8c89:: with SMTP id b9mr354705pjo.34.1604533351271; Wed, 04 Nov 2020 15:42:31 -0800 (PST) Received: from localhost.localdomain (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id 30sm3361513pgl.45.2020.11.04.15.42.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 15:42:30 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH v2 1/8] doc: Add tester.config Date: Wed, 4 Nov 2020 15:42:21 -0800 Message-Id: <20201104234228.2257427-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz This adds tester.config which can be used as a reference to create kernel images to be run with test-runner. --- doc/tester.config | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 doc/tester.config diff --git a/doc/tester.config b/doc/tester.config new file mode 100644 index 000000000..e90899714 --- /dev/null +++ b/doc/tester.config @@ -0,0 +1,48 @@ +CONFIG_VIRTIO=y +CONFIG_VIRTIO_PCI=y + +CONFIG_NET=y +CONFIG_INET=y + +CONFIG_NET_9P=y +CONFIG_NET_9P_VIRTIO=y + +CONFIG_9P_FS=y +CONFIG_9P_FS_POSIX_ACL=y + +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_PCI=y +CONFIG_SERIAL_8250_NR_UARTS=4 + +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_TMPFS_XATTR=y + +CONFIG_DEVTMPFS=y +CONFIG_DEBUG_FS=y + +CONFIG_BT=y +CONFIG_BT_BREDR=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_BNEP=y +CONFIG_BT_HIDP=y +CONFIG_BT_LE=y + +CONFIG_BT_HCIVHCI=y + +CONFIG_CRYPTO_CMAC=y +CONFIG_CRYPTO_USER_API=y +CONFIG_CRYPTO_USER_API_HASH=y +CONFIG_CRYPTO_USER_API_SKCIPHER=y + +CONFIG_UNIX=y + +CONFIG_UHID=y + +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_DEBUG_SPINLOCK=y +CONFIG_DEBUG_LOCK_ALLOC=y +CONFIG_PROVE_LOCKING=y +CONFIG_LOCKDEP=y +CONFIG_DEBUG_MUTEXES=y From patchwork Wed Nov 4 23:42:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Augusto von Dentz X-Patchwork-Id: 11882375 X-Patchwork-Delegate: luiz.dentz@gmail.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82A59C56202 for ; Wed, 4 Nov 2020 23:42:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2ADAD22203 for ; Wed, 4 Nov 2020 23:42:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fFbhY/7i" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732911AbgKDXmo (ORCPT ); Wed, 4 Nov 2020 18:42:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732826AbgKDXmd (ORCPT ); Wed, 4 Nov 2020 18:42:33 -0500 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1706FC0613CF for ; Wed, 4 Nov 2020 15:42:33 -0800 (PST) Received: by mail-pg1-x52f.google.com with SMTP id i7so192610pgh.6 for ; Wed, 04 Nov 2020 15:42:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Yytsr00+6Kp33M5vY3Jf40tOEkQR8081Jx2QjpPNKpM=; b=fFbhY/7iEzmKzuKMgNTCpl6re4tZf7KqZ4u2Xr1i6YnJB747eG0/jBjOTzEVM6tSsx Ws5DSYURK/gYtyz2A3ZepaA84JkBvSo7Fu48zXdyw6rWYdc2N8xOrZJpcUcLvEHNfTZ1 I3jyLtQHdGhUj+1aA5Lh/n5QE3NbtKNwVgmehCQS0znVZWldyH6tZXr+liea0oZSiRNG Y+CowgTxSKz2z4sy0IwoQaQkdo0+jD/BtJHpQah3UZR2cyHQxdndCLyBUfgnYjnsl6Fu whOq0ZlHAWfIrZQamiDn5/+kQVnkQ53m/Fefjf2efYJhk4vKnBPH20dkJ4zKJ9V8f4G7 XooA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Yytsr00+6Kp33M5vY3Jf40tOEkQR8081Jx2QjpPNKpM=; b=MQ+jOuwehYK4xngxNXqfLP/cQgqkJrS9Ox6Wys+n2fiQ9yCLkO/sxphfU3RHWmA11l gjXtHH/ONj9RihOXJBY2MWP0KLrrupQqLPoM5ZCBixTipVzKhZ3vciiTWLWd5W2gqvr1 uRnqL80jucWZ+HIIArG1yft3tado71lb1LThDUTACsMFmVP2Fwv7Vlrbsns9e9WBi4Ex 8DakZfeOCj/weRElbjsGfaECB2J2dYoRncvvssRaj/nI+hC5ghoJgFVPCwQj8hDH4xLK jh8cBEg2Z+vfL0NKUxN1hYoVvXEBxM8xjJ+vMZjif8zvSQJOX669QokQL+SUAe5MFpBQ hIrw== X-Gm-Message-State: AOAM530ur0OJ2hrCd1rKLTHxL6GstVwwIfO0MAkv5yqnX+J8dh+0mVrj NtJn1qpw0Z8dcdraMUUmTqJuRc5if8Q7AQ== X-Google-Smtp-Source: ABdhPJz9xzNI0H4mykZOMY9w2F2XIDwuUhWztyblolJgsNNm+REGHPKeg/kuNn+FAjQ0HMPJoPgqHw== X-Received: by 2002:a17:90a:540e:: with SMTP id z14mr274258pjh.187.1604533352343; Wed, 04 Nov 2020 15:42:32 -0800 (PST) Received: from localhost.localdomain (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id 30sm3361513pgl.45.2020.11.04.15.42.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 15:42:31 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH v2 2/8] test-runner: Fix using removed options Date: Wed, 4 Nov 2020 15:42:22 -0800 Message-Id: <20201104234228.2257427-2-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201104234228.2257427-1-luiz.dentz@gmail.com> References: <20201104234228.2257427-1-luiz.dentz@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz This removes -nodefconfig and -balloon which are not longer valid options: qemu-system-x86_64: -nodefconfig: invalid option qemu-system-x86_64: -balloon: invalid option --- tools/test-runner.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/test-runner.c b/tools/test-runner.c index 6b7c33734..5d2dbb992 100644 --- a/tools/test-runner.c +++ b/tools/test-runner.c @@ -181,7 +181,6 @@ static void prepare_sandbox(void) static char *const qemu_argv[] = { "", "-nodefaults", - "-nodefconfig", "-no-user-config", "-monitor", "none", "-display", "none", @@ -190,7 +189,6 @@ static char *const qemu_argv[] = { "-nographic", "-vga", "none", "-net", "none", - "-balloon", "none", "-no-acpi", "-no-hpet", "-no-reboot", From patchwork Wed Nov 4 23:42:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Augusto von Dentz X-Patchwork-Id: 11882367 X-Patchwork-Delegate: luiz.dentz@gmail.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8ADE3C56201 for ; Wed, 4 Nov 2020 23:42:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 26B1B21734 for ; Wed, 4 Nov 2020 23:42:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rBRhtl/w" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732914AbgKDXmo (ORCPT ); Wed, 4 Nov 2020 18:42:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732846AbgKDXmf (ORCPT ); Wed, 4 Nov 2020 18:42:35 -0500 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2615C0613CF for ; Wed, 4 Nov 2020 15:42:33 -0800 (PST) Received: by mail-pg1-x542.google.com with SMTP id f38so207041pgm.2 for ; Wed, 04 Nov 2020 15:42:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=TDGhHpoe/eWfJsY+oKVEuX03napklo56SUJ6Lc7Lye0=; b=rBRhtl/wC/GWgwvcvEI4X8u0nJSTue+xwkyXVUdUb+bhR1vFN/fbttf1qEug50V8kl Un3oIUxnFmWJd2SFpnzRidOsg1KdazGeW5ZFwG1Kf68uMEX01SNU78EJZrP0FwHnmg1f Cm/x8dqPSEnaC9PKTurdjXbsMkn7AAAPN3tqGeonXhm+uibS125Rz/zYNsaT9g0OhO0P U0CWTxuB7N3iTuw6WtVNuCX1FD1RavhnWJfrMCMWqIT8O9THfL4b1VP37uILc7XVEza1 AjxdQELq8uGOFv1jzAUW2g92b44Iud1YCRZquGU3dVheeM+75bFxuE3luZ0DvLmfKQHW EozQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TDGhHpoe/eWfJsY+oKVEuX03napklo56SUJ6Lc7Lye0=; b=HZumO2vdk6UokxF8M4/F990acI1N/RmBAtyJydfnS/+ORE7s/A7bsitll/H5Anol7F uE7JGYgZenauCkMsWUhyZn9i8jL8GEHmBUUhBsb3826CeJCZCYI0OrEDx7yZM/dGBWT+ +OTXyKwQWIhVkExetPj94SyTyQejliz/8CkZOPGlpoNsnZcrgKxEpJh7hkUw9yCA4RvO BKJ4ZZNxR0UGwzvL7LUZXTWJElS0JCUDtQIPo5qLc+mtAWoP+RZlaIRSvoD2rHHBfkCZ G3p1fjBmEPdsTbdQaTSG9tmeWZmoCzbxNH0NyI5pPy4akGSdUc54F8hLeCrvpkmLWTm0 HApQ== X-Gm-Message-State: AOAM530/s3/bkMrqgDF4sOq9pPbr2rbGeglOtyDlJ9p4OnSGPLmFaNa+ Dx+VuhkkJmAu+tJHeiiZ39mH7q82a5+Ipg== X-Google-Smtp-Source: ABdhPJzxGDHeIaUN782tj1aNcCfvp3LGpPFhHEyoinZjwlO9a28IXnyUP87fjQu6m1EtFHaSRR1STQ== X-Received: by 2002:a17:90a:6288:: with SMTP id d8mr336120pjj.210.1604533353393; Wed, 04 Nov 2020 15:42:33 -0800 (PST) Received: from localhost.localdomain (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id 30sm3361513pgl.45.2020.11.04.15.42.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 15:42:32 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH v2 3/8] mgmt-tester: Print out the HCI received and expected cmd value Date: Wed, 4 Nov 2020 15:42:23 -0800 Message-Id: <20201104234228.2257427-3-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201104234228.2257427-1-luiz.dentz@gmail.com> References: <20201104234228.2257427-1-luiz.dentz@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz This make it simpler to debug when the kernel has been updated and parameters no longer match: --- tools/mgmt-tester.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index 27a5f0bab..4775fb18a 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -6381,7 +6381,9 @@ static void command_hci_callback(uint16_t opcode, const void *param, } if (memcmp(param, expect_hci_param, length) != 0) { - tester_warn("Unexpected HCI command parameter value"); + tester_warn("Unexpected HCI command parameter value:"); + util_hexdump('>', param, length, print_debug, ""); + util_hexdump('!', expect_hci_param, length, print_debug, ""); tester_test_failed(); return; } From patchwork Wed Nov 4 23:42:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Augusto von Dentz X-Patchwork-Id: 11882373 X-Patchwork-Delegate: luiz.dentz@gmail.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 395D4C388F7 for ; Wed, 4 Nov 2020 23:42:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D3F9620786 for ; Wed, 4 Nov 2020 23:42:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qSj75rtK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732892AbgKDXmn (ORCPT ); Wed, 4 Nov 2020 18:42:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732852AbgKDXmg (ORCPT ); Wed, 4 Nov 2020 18:42:36 -0500 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D18CEC0613D2 for ; Wed, 4 Nov 2020 15:42:34 -0800 (PST) Received: by mail-pl1-x644.google.com with SMTP id t6so72640plq.11 for ; Wed, 04 Nov 2020 15:42:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=6NChTZTWnrvWHkaUljYKkJ1mGz7635riVFxovhAsZBY=; b=qSj75rtKdvs5RsFohOV4J/dJbx49tZafKZVSj/Sq29uTeK1p9q0Ufzq7wxw3ECcift b/gAqYNPFypjEvF1lyomaTsJdJvbIsaUMgWmHYC2eNXh9L28efGHftDX3hrS4ljcZc8C JXzx/CVnr48VHPOxfR5uPqnZSlZZ53xilb+1sk85w7eJzFnXokiT96f1rL81XqeQd7d3 9JsoXFuxIy959qojzUOShC9gL4ZdeTEYelfJK8I0lLWk49G5ITyjOAzBGlpoRN4IK7Vm xZCtukT4Up5VpSDkrAzIYtfabudhBELOcnRF3eLQ7EgjSLQwdPbBFEsJIQjbmcwZIWUP 9n0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6NChTZTWnrvWHkaUljYKkJ1mGz7635riVFxovhAsZBY=; b=NM2pDZRvfGGbuJ9+XaBdoxKUW7pq29eww3oCAcjV8KI2o+JfhST/unXmW0WCP+qTEj CZe3JmBZyF0DdlQ0Hidz64s2SAoXvVPM/z8/oH8NvpY7oxlyi1zsF+fogfjKRLsyClCv hIrjkk2ejkldElNN/2kBqPxmEl5m/1/EEm/zwnUTlqo7cJrL0J5FhVJsjuStiDCk69sA uYIlghEUxPppCjzZMaV/KzyB66kCl0OG6UMDspHA4jhgM7RB1kmko/gO1CYoSr50ML6X 762wB0J5oHgdEfSHn4VhLngxZcxosXBmzzqViiHzO0mQXgLkJagJUssvZjFRzlauGW+i lWWg== X-Gm-Message-State: AOAM531XgQrRVj86gUZA2aty8mJy6u+tSRrKpmKsnXdTdXaPSTxz5ve3 mJjoLMNFZld1nJP+1BEcVGTjGJL/DXc+Hw== X-Google-Smtp-Source: ABdhPJw6Sd7rJm9xmVR+oVEQQ9LKzCKlYKAuUU/PHHV6Eb4fdd5q5RmwIx0uMq0c5Xxb077GmfEwow== X-Received: by 2002:a17:902:778d:b029:d6:489c:67ee with SMTP id o13-20020a170902778db02900d6489c67eemr362047pll.52.1604533354192; Wed, 04 Nov 2020 15:42:34 -0800 (PST) Received: from localhost.localdomain (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id 30sm3361513pgl.45.2020.11.04.15.42.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 15:42:33 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH v2 4/8] mgmt-tester: Update set_connectable_off_adv_param Date: Wed, 4 Nov 2020 15:42:24 -0800 Message-Id: <20201104234228.2257427-4-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201104234228.2257427-1-luiz.dentz@gmail.com> References: <20201104234228.2257427-1-luiz.dentz@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz Parameters have been changed in the kernel which now uses the following: < HCI Command: LE Set Advertising Parameters (0x08|0x0006) plen 15 Min advertising interval: 62.500 msec (0x0064) Max advertising interval: 93.750 msec (0x0096) Type: Scannable undirected - ADV_SCAN_IND (0x02) Own address type: Random (0x01) Direct address type: Public (0x00) Direct address: 00:00:00:00:00:00 (OUI 00-00-00) Channel map: 37, 38, 39 (0x07) Filter policy: Allow Scan Request from Any, Allow Connect Request from Any (0x00) --- tools/mgmt-tester.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index 4775fb18a..55df2953c 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -898,10 +898,10 @@ static uint16_t settings_powered_le_connectable_advertising[] = { MGMT_OP_SET_ADVERTISING, MGMT_OP_SET_POWERED, 0 }; -static uint8_t set_connectable_off_adv_param[] = { - 0x00, 0x08, /* min_interval */ - 0x00, 0x08, /* max_interval */ - 0x03, /* type */ +static uint8_t set_connectable_off_scan_adv_param[] = { + 0x64, 0x00, /* min_interval */ + 0x96, 0x00, /* max_interval */ + 0x02, /* type */ 0x01, /* own_addr_type */ 0x00, /* direct_addr_type */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* direct_addr */ @@ -919,8 +919,8 @@ static const struct generic_data set_connectable_off_le_test_2 = { .expect_len = sizeof(set_connectable_off_le_settings_2), .expect_settings_unset = MGMT_SETTING_CONNECTABLE, .expect_hci_command = BT_HCI_CMD_LE_SET_ADV_PARAMETERS, - .expect_hci_param = set_connectable_off_adv_param, - .expect_hci_len = sizeof(set_connectable_off_adv_param), + .expect_hci_param = set_connectable_off_scan_adv_param, + .expect_hci_len = sizeof(set_connectable_off_scan_adv_param), }; static uint16_t settings_powered_le_discoverable[] = { @@ -946,8 +946,8 @@ static const struct generic_data set_connectable_off_le_test_3 = { .expect_len = sizeof(set_connectable_off_le_settings_2), .expect_settings_unset = MGMT_SETTING_CONNECTABLE, .expect_hci_command = BT_HCI_CMD_LE_SET_ADV_PARAMETERS, - .expect_hci_param = set_connectable_off_adv_param, - .expect_hci_len = sizeof(set_connectable_off_adv_param), + .expect_hci_param = set_connectable_off_scan_adv_param, + .expect_hci_len = sizeof(set_connectable_off_scan_adv_param), }; static const struct generic_data set_connectable_off_le_test_4 = { @@ -961,8 +961,8 @@ static const struct generic_data set_connectable_off_le_test_4 = { .expect_len = sizeof(set_connectable_off_le_settings_2), .expect_settings_unset = MGMT_SETTING_CONNECTABLE, .expect_hci_command = BT_HCI_CMD_LE_SET_ADV_PARAMETERS, - .expect_hci_param = set_connectable_off_adv_param, - .expect_hci_len = sizeof(set_connectable_off_adv_param), + .expect_hci_param = set_connectable_off_scan_adv_param, + .expect_hci_len = sizeof(set_connectable_off_scan_adv_param), }; static const char set_fast_conn_on_param[] = { 0x01 }; @@ -4738,17 +4738,6 @@ static uint16_t settings_powered_le_connectable[] = { MGMT_OP_SET_LE, MGMT_OP_SET_CONNECTABLE, 0 }; -static uint8_t set_connectable_off_scan_adv_param[] = { - 0x00, 0x08, /* min_interval */ - 0x00, 0x08, /* max_interval */ - 0x02, /* type */ - 0x01, /* own_addr_type */ - 0x00, /* direct_addr_type */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* direct_addr */ - 0x07, /* channel_map */ - 0x00, /* filter_policy */ -}; - static const struct generic_data add_advertising_success_13 = { .setup_settings = settings_powered_le, .send_opcode = MGMT_OP_ADD_ADVERTISING, @@ -4762,6 +4751,17 @@ static const struct generic_data add_advertising_success_13 = { .expect_hci_len = sizeof(set_connectable_off_scan_adv_param), }; +static uint8_t set_connectable_off_adv_param[] = { + 0x64, 0x00, /* min_interval */ + 0x96, 0x00, /* max_interval */ + 0x03, /* type */ + 0x01, /* own_addr_type */ + 0x00, /* direct_addr_type */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* direct_addr */ + 0x07, /* channel_map */ + 0x00, /* filter_policy */ +}; + static const struct generic_data add_advertising_success_14 = { .setup_settings = settings_powered_le, .send_opcode = MGMT_OP_ADD_ADVERTISING, From patchwork Wed Nov 4 23:42:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Augusto von Dentz X-Patchwork-Id: 11882363 X-Patchwork-Delegate: luiz.dentz@gmail.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E7B1C5517A for ; Wed, 4 Nov 2020 23:42:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 38D8C21734 for ; Wed, 4 Nov 2020 23:42:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EdhjP6w7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732898AbgKDXmn (ORCPT ); Wed, 4 Nov 2020 18:42:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732851AbgKDXmg (ORCPT ); Wed, 4 Nov 2020 18:42:36 -0500 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EFAEC0613CF for ; Wed, 4 Nov 2020 15:42:36 -0800 (PST) Received: by mail-pl1-x629.google.com with SMTP id f21so87259plr.5 for ; Wed, 04 Nov 2020 15:42:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=/0EA0EvYK58tHqSxuRqoq1ojR/wZ+6JbkYIyKTr4ST8=; b=EdhjP6w7+ca0rCDgPww72oKSDNyRBNjiFRPC04DUr9G/ONVnoyvEDORKyAev670N8T dYZgZz66JnD+9QQlp12UkldxLvWyRQyIocYs5qa381ZN2gGOxFyqH7PZH7q7cqDgO9Zc nUgWwUhrquJ/e9yRzjf/H8d81BvN+6LaAWOLYCRX+TOaAP19mdPGKPJNjdQC9uB3L4r5 zLf9HyqlYiEj2Jg9eSlv/LKaS4HakDmQpTBzz6D7fldFUL+6zYuO5fDDSnsIn+Q48eHp VvApUgFlOkuBMAUyzv0EopsR5WB3HGojhnZmWODoyj5HHiCjNwafMtnG9CQ4XbtZ7Jda TeMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/0EA0EvYK58tHqSxuRqoq1ojR/wZ+6JbkYIyKTr4ST8=; b=tUFbESqs2XScvQBQ5VJR+IZs+iaEF3yNrqXw04K5qguwoV1Ia7HPFLvJBu//951aZe XP6FMYgNjNeTK0xeJHviFXy4z4vClWNEGKVFBwpCQz7fykX8nhrLS6KOmpbCISzto+Si AUeT57iZi5VHzyD2yX1k69H5j7dqoqyJYuaiKX42+BHLdcL8LrHyRiO7K1uo1oZn1vyX qJ6OIgnJoQihxc9vB+99njmV7KufGt5DSQPEZtPi6eI0cKo3H2Vb97ksDwb5AvDSHVda 34APlO3qO7Bg02AUw0HfpIxYRw+C/tzFEeX6aIBOKTUhU5HJYTzXkHJ0wB8Drv4G2Nfd nfuw== X-Gm-Message-State: AOAM532wgV8pfz9R9gLCCLqoCNnHghGNIdDfaQIWiFLKxnS498XxznLE O/ZlGYpwqINpLs/tBFeMYa1u0ghnmsVvKA== X-Google-Smtp-Source: ABdhPJw+3OK4RF7klErVjC2ybqDv64jw8zFzmu7CY0ccTx/h6cSO/+kOzSYfwhcx5ULFRE1K2hGyUA== X-Received: by 2002:a17:902:fe0f:b029:d6:cf9d:3260 with SMTP id g15-20020a170902fe0fb02900d6cf9d3260mr186437plj.3.1604533355307; Wed, 04 Nov 2020 15:42:35 -0800 (PST) Received: from localhost.localdomain (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id 30sm3361513pgl.45.2020.11.04.15.42.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 15:42:34 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH v2 5/8] mgmt-tester: Fix ext advertisement handle Date: Wed, 4 Nov 2020 15:42:25 -0800 Message-Id: <20201104234228.2257427-5-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201104234228.2257427-1-luiz.dentz@gmail.com> References: <20201104234228.2257427-1-luiz.dentz@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz Handle has been change to 0x01 not 0x00: < HCI Command: LE Set Extended Advertising Enable (0x08|0x0039) plen 6 Extended advertising: Enabled (0x01) Number of sets: 1 (0x01) Entry 0 Handle: 0x01 Duration: 0 ms (0x00) Max ext adv events: 0 --- tools/mgmt-tester.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index 55df2953c..a67860da4 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -6950,7 +6950,7 @@ static const struct generic_data add_ext_advertising_fail_4 = { static const uint8_t set_ext_adv_data_uuid[] = { /* handle */ - 0x00, + 0x01, /* complete data */ 0x03, /* controller should not fragment */ @@ -6982,7 +6982,7 @@ static const struct generic_data add_ext_advertising_success_1 = { }; static const uint8_t set_ext_adv_data_test1[] = { - 0x00, /* handle */ + 0x01, /* handle */ 0x03, /* complete data */ 0x01, /* controller should not fragment */ 0x07, /* adv data len */ @@ -7010,7 +7010,7 @@ static const struct generic_data add_ext_advertising_success_pwron_data = { static const char set_ext_adv_on_set_adv_enable_param[] = { 0x01, /* Enable */ 0x01, /* No of sets */ - 0x00, /* Handle */ + 0x01, /* Handle */ 0x00, 0x00, /* Duration */ 0x00, /* Max events */ }; @@ -7082,7 +7082,7 @@ static const struct generic_data add_ext_advertising_success_6 = { }; static const uint8_t set_ext_scan_rsp_uuid[] = { - 0x00, /* handle */ + 0x01, /* handle */ 0x03, /* complete data */ 0x01, /* controller should not fragment */ 0x0a, /* scan rsp data len */ @@ -7115,7 +7115,7 @@ static const struct generic_data add_ext_advertising_success_7 = { }; static uint8_t set_connectable_on_ext_adv_param[] = { - 0x00, /* Handle */ + 0x01, /* Handle */ 0x13, 0x00, /* Event type */ 0x00, 0x08, 0x00, /* min_interval */ 0x00, 0x08, 0x00, /* max_interval */ @@ -7146,7 +7146,7 @@ static const struct generic_data add_ext_advertising_success_8 = { }; static const uint8_t set_ext_adv_data_general_discov[] = { - 0x00, /* handle */ + 0x01, /* handle */ 0x03, /* complete data */ 0x01, /* controller should not fragment */ 0x0c, /* adv data len */ @@ -7165,7 +7165,7 @@ static const uint8_t set_ext_adv_data_general_discov[] = { }; static const uint8_t set_ext_adv_data_limited_discov[] = { - 0x00, /* handle */ + 0x01, /* handle */ 0x03, /* complete data */ 0x01, /* controller should not fragment */ 0x0c, /* adv data len */ @@ -7180,7 +7180,7 @@ static const uint8_t set_ext_adv_data_limited_discov[] = { }; static const uint8_t set_ext_adv_data_uuid_txpwr[] = { - 0x00, /* handle */ + 0x01, /* handle */ 0x03, /* complete data */ 0x01, /* controller should not fragment */ 0x0c, /* adv data len */ @@ -7251,7 +7251,7 @@ static const struct generic_data add_ext_advertising_success_12 = { }; static uint8_t set_connectable_off_scan_ext_adv_param[] = { - 0x00, /* Handle */ + 0x01, /* Handle */ 0x12, 0x00, /* Event type */ 0x00, 0x08, 0x00, /* min_interval */ 0x00, 0x08, 0x00, /* max_interval */ @@ -7282,7 +7282,7 @@ static const struct generic_data add_ext_advertising_success_13 = { }; static uint8_t set_connectable_off_ext_adv_param[] = { - 0x00, /* Handle */ + 0x01, /* Handle */ 0x10, 0x00, /* Event type */ 0x00, 0x08, 0x00, /* min_interval */ 0x00, 0x08, 0x00, /* max_interval */ @@ -7424,7 +7424,7 @@ static const struct generic_data remove_ext_advertising_success_2 = { }; static const uint8_t set_ext_adv_data_test2[] = { - 0x00, /* handle */ + 0x01, /* handle */ 0x03, /* complete data */ 0x01, /* controller should not fragment */ 0x07, /* adv data len */ @@ -7531,7 +7531,7 @@ static const struct generic_data add_ext_advertising_scrsp_appear_null = { }; static const uint8_t ext_scan_rsp_data_empty[] = { - 0x00, /* handle */ + 0x01, /* handle */ 0x03, /* complete data */ 0x01, /* controller should not fragment */ 0x01, /* scan rsp data len */ @@ -7556,7 +7556,7 @@ static const struct generic_data add_ext_advertising_no_name_set = { }; static const uint8_t set_ext_scan_rsp_data_name_fits_in_scrsp[] = { - 0x00, /* handle */ + 0x01, /* handle */ 0x03, /* complete data */ 0x01, /* controller should not fragment */ 0x0c, /* Scan rsp data len */ @@ -7585,7 +7585,7 @@ static const struct generic_data add_ext_advertising_name_fits_in_scrsp = { }; static const uint8_t set_ext_scan_rsp_data_shortened_name_fits[] = { - 0x00, /* handle */ + 0x01, /* handle */ 0x03, /* complete data */ 0x01, /* controller should not fragment */ 0x0d, /* Scan rsp data len */ @@ -7615,7 +7615,7 @@ static const struct generic_data add_ext_advertising_shortened_name_in_scrsp = { }; static const uint8_t set_ext_scan_rsp_data_param_name_data_ok[] = { - 0x00, /* handle */ + 0x01, /* handle */ 0x03, /* complete data */ 0x01, /* controller should not fragment */ 0x1e, /* Scan rsp data len */ @@ -7660,7 +7660,7 @@ static const struct generic_data add_ext_advertising_name_data_inv = { }; static const uint8_t set_ext_scan_rsp_data_name_data_appear[] = { - 0x00, /* handle */ + 0x01, /* handle */ 0x03, /* complete data */ 0x01, /* controller should not fragment */ 0x1e, /* Scan rsp data len */ @@ -7710,7 +7710,7 @@ static const uint8_t add_advertising_1m_param_uuid[] = { }; static uint8_t set_connectable_off_ext_1m_adv_param[] = { - 0x00, /* Handle */ + 0x01, /* Handle */ 0x00, 0x00, /* Event type */ 0x00, 0x08, 0x00, /* min_interval */ 0x00, 0x08, 0x00, /* max_interval */ @@ -7758,7 +7758,7 @@ static const uint8_t add_advertising_2m_param_uuid[] = { }; static uint8_t set_connectable_off_ext_2m_adv_param[] = { - 0x00, /* Handle */ + 0x01, /* Handle */ 0x00, 0x00, /* Event type */ 0x00, 0x08, 0x00, /* min_interval */ 0x00, 0x08, 0x00, /* max_interval */ @@ -7806,7 +7806,7 @@ static const uint8_t add_advertising_coded_param_uuid[] = { }; static uint8_t set_connectable_off_ext_coded_adv_param[] = { - 0x00, /* Handle */ + 0x01, /* Handle */ 0x00, 0x00, /* Event type */ 0x00, 0x08, 0x00, /* min_interval */ 0x00, 0x08, 0x00, /* max_interval */ @@ -7857,7 +7857,7 @@ static const uint8_t add_advertising_param_scanrsp_1m[] = { }; static uint8_t set_connectable_off_scan_ext_pdu_adv_param[] = { - 0x00, /* Handle */ + 0x01, /* Handle */ 0x02, 0x00, /* Event type */ 0x00, 0x08, 0x00, /* min_interval */ 0x00, 0x08, 0x00, /* max_interval */ @@ -7888,7 +7888,7 @@ static const struct generic_data add_ext_advertising_success_scannable = { }; static uint8_t set_connectable_on_ext_pdu_adv_param[] = { - 0x00, /* Handle */ + 0x01, /* Handle */ 0x01, 0x00, /* Event type */ 0x00, 0x08, 0x00, /* min_interval */ 0x00, 0x08, 0x00, /* max_interval */ From patchwork Wed Nov 4 23:42:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Augusto von Dentz X-Patchwork-Id: 11882365 X-Patchwork-Delegate: luiz.dentz@gmail.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CD65C55178 for ; Wed, 4 Nov 2020 23:42:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 05B4020786 for ; Wed, 4 Nov 2020 23:42:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ilBoYZZW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732863AbgKDXmm (ORCPT ); Wed, 4 Nov 2020 18:42:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732861AbgKDXmh (ORCPT ); Wed, 4 Nov 2020 18:42:37 -0500 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3C96C0613CF for ; Wed, 4 Nov 2020 15:42:37 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id b12so89306plr.4 for ; Wed, 04 Nov 2020 15:42:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=GioplUM0BRUba4km2iUOfXJ3MZny2/Sz0TzOafj3MFE=; b=ilBoYZZWduAKQ+zAhFA77qwfZEGD4H0rs1qbmTs46ikvzyRx/REqYU7Q+7oW5ZGc/w GKFEYIIsosOcUhOBVm5YgJ021RnAwLT9BcWPDrYxSjP6PbHExEhtqmn1nEz6i83MwFZF 9u2/90KXZcmS4/iXIGjNd9LAHHDmBFigzDbxHm1Q9UX+3moh0KMgTT3Kr5TQiRURU0IC Rz2+KuN+q9JdnEZxZErn2c/K9kNBpZRqtcW8kcekgFugO4/qdqp9j0/2l8jInffcW44Q 2g7r5upJi2b+vSWlKqN3y02forNOtUhC6QQAwsdvOwnWujva9LkNHE061/dXypI92Gg/ ieEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GioplUM0BRUba4km2iUOfXJ3MZny2/Sz0TzOafj3MFE=; b=LwPM0HmOpKNBD4kujGhDvyd9q/qFP+BGg5M9KplE0rga75vuaS1wtua4w76ddBaTZS ENFOUaBJoOKZAwXVLSNW0khBn49TveyxOtWk6bW9WPpBQ4wu8eei/Ia70SpupreK21v0 5L01oTg/JJARyFmPDrKNFClhhQ37SgS7rrGuChC/ImiJ/YflKyLe2umGOhpMsW4OZgTN 0ZMgdbyESBi1Kr+2WlKbGB0/jjP0EhDe9mBgK0FOFQaE8yEvcNow6DUqtPnwPbo7xCF0 VagAnuf0eHy7bqmS+qC/KiZqwGWbuwO7EHt5HfCVx1j9kQV46h5hqwZ8kHr8KuqgixCj em9w== X-Gm-Message-State: AOAM531e0R8+AnOGP4GKuIqaJazPYvaMWQID/3txRuG3MaMO55Z0jhVk 8JHfBZjeZtb89+ubW7nPAwfqlyjBOcldig== X-Google-Smtp-Source: ABdhPJz74nHZz5vISKD1nJ4pZbUsHF2q9y+4ewfED84PgECmN4tAkLivI6+1ipGNz6aQtBjtTT5KpA== X-Received: by 2002:a17:902:6bc2:b029:d6:e0ba:f2ff with SMTP id m2-20020a1709026bc2b02900d6e0baf2ffmr464168plt.10.1604533357249; Wed, 04 Nov 2020 15:42:37 -0800 (PST) Received: from localhost.localdomain (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id 30sm3361513pgl.45.2020.11.04.15.42.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 15:42:36 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH v2 7/8] mgmt-tester: Fix failing pairing tests Date: Wed, 4 Nov 2020 15:42:27 -0800 Message-Id: <20201104234228.2257427-7-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201104234228.2257427-1-luiz.dentz@gmail.com> References: <20201104234228.2257427-1-luiz.dentz@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz Just-works pairing does request user confirmation. --- tools/mgmt-tester.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index f6eac30a5..d8554411f 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -6051,12 +6051,6 @@ static void user_confirm_request_callback(uint16_t index, uint16_t length, struct mgmt_cp_user_confirm_reply cp; uint16_t opcode; - if (test->just_works) { - tester_warn("User Confirmation received for just-works case"); - tester_test_failed(); - return; - } - memset(&cp, 0, sizeof(cp)); memcpy(&cp.addr, &ev->addr, sizeof(cp.addr)); From patchwork Wed Nov 4 23:42:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Augusto von Dentz X-Patchwork-Id: 11882361 X-Patchwork-Delegate: luiz.dentz@gmail.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2FBCC4741F for ; Wed, 4 Nov 2020 23:42:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 49D5B20786 for ; Wed, 4 Nov 2020 23:42:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qkW8lYDo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732890AbgKDXml (ORCPT ); Wed, 4 Nov 2020 18:42:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732863AbgKDXmi (ORCPT ); Wed, 4 Nov 2020 18:42:38 -0500 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF881C0613CF for ; Wed, 4 Nov 2020 15:42:38 -0800 (PST) Received: by mail-pg1-x52c.google.com with SMTP id e21so173639pgr.11 for ; Wed, 04 Nov 2020 15:42:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=I2wQWVcRf4N1MbmSoTwL5Uo3W0ejdtifRaxI4lK0kZs=; b=qkW8lYDoV7WuTPOHPOZotJEFhAwYuLE10hYXYqhZtJOTIe+VomAM8+zQHoWZQKGhwi QX/OY9M9xMF81G7F60q3kne55QDJfdFORPWPtmJB96vZjL23ehQbeHv/dQGw7c/dZ8ot 4x9ErtNgjdNH1kveDgWDZtHJzxPHwf4kA0yzTCSmVzwHXY/37FxR8e43MBl8xeVZwhs1 AdvxGHgKAwNRI0JRxlJYpXZDxNpy4y50IF+FPGV0pzGs/kPct1i4oq+FEBTUJfgEbmxm jAHd4ouKLBf0RFG34Ao6oGEiNeSxNHN+FKcb5UcLhXdTmLOhShKFHVhDOSX+tfNZBuKb va+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=I2wQWVcRf4N1MbmSoTwL5Uo3W0ejdtifRaxI4lK0kZs=; b=i0q6hutbU+cjF7rE7LVvravDDfmtbDLOewUUgPKJx6Qlm92WkbeWZB8UY7WD6zA6O5 JLqG/baevrqz9d3LcICGOC5X516GAaUP22Kmp+F/drwV/D+d1Dkxv+MIxQU0wK9VAY9K J/ufkFuR8s/O1l770yvTLtSeyAF0ju6Dl3JCr07+gBkfCg3GxIYlKu2kAUWXW/QyVEwO DnJboT4IQ+uXv5BGsWWDN7I/BKWIuxaui9LSECPlbNsjbcNPlr7BalIA77M5QOxwNspd OeReCaI5xjJlvZk/8+aANclu8nyk8e3xtzg3j/JfxZHwWetCqi6MoO4zKjXtwcSrMesE Ow8g== X-Gm-Message-State: AOAM53196syF0lBFAxvuXAPl1jJQIyrLmhjoaXinfuZaOOZY1pbow8s4 QJ62Nju3CEVvvQjumNnttEj5DPPsIB6BUw== X-Google-Smtp-Source: ABdhPJwC/SlJUUY3MFkYXHq5q/F5ROIyunnTaWpmFDfd71hUL461xeW1Z7Ccuh5La5SqoYnBEFGx+Q== X-Received: by 2002:a62:7883:0:b029:18a:e054:edf1 with SMTP id t125-20020a6278830000b029018ae054edf1mr386669pfc.70.1604533358170; Wed, 04 Nov 2020 15:42:38 -0800 (PST) Received: from localhost.localdomain (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id 30sm3361513pgl.45.2020.11.04.15.42.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 15:42:37 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH v2 8/8] emulator: Return error for ext adv feature not supported Date: Wed, 4 Nov 2020 15:42:28 -0800 Message-Id: <20201104234228.2257427-8-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201104234228.2257427-1-luiz.dentz@gmail.com> References: <20201104234228.2257427-1-luiz.dentz@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz This return an error if LE Set Extended Advertising Enable is used with unsupported features. --- emulator/btdev.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/emulator/btdev.c b/emulator/btdev.c index 42276a2ce..a36493346 100644 --- a/emulator/btdev.c +++ b/emulator/btdev.c @@ -3760,8 +3760,19 @@ static void default_cmd(struct btdev *btdev, uint16_t opcode, if (btdev->le_adv_enable == lseae->enable) status = BT_HCI_ERR_COMMAND_DISALLOWED; else { - btdev->le_adv_enable = lseae->enable; - status = BT_HCI_ERR_SUCCESS; + const struct bt_hci_cmd_ext_adv_set *eas; + + if (lseae->num_of_sets) { + eas = data + sizeof(*lseae); + if (eas->duration || lseae->num_of_sets > 1) + status = BT_HCI_ERR_INVALID_PARAMETERS; + else + status = BT_HCI_ERR_SUCCESS; + } else + status = BT_HCI_ERR_SUCCESS; + + if (status == BT_HCI_ERR_SUCCESS) + btdev->le_adv_enable = lseae->enable; } cmd_complete(btdev, opcode, &status, sizeof(status)); if (status == BT_HCI_ERR_SUCCESS && btdev->le_adv_enable)