From patchwork Mon Apr 29 11:51:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Berg X-Patchwork-Id: 1928963 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=GTZy+n4c; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=sipsolutions.net header.i=@sipsolutions.net header.a=rsa-sha256 header.s=mail header.b=u/cx/ZNn; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VShZ96W2xz1ymX for ; Mon, 29 Apr 2024 21:54:09 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=W3QJ6UXMKTSFFf6QgVMi2Ab1SupD4hEAIm1dYkkVs04=; b=GTZy+n4coGFNVN WvK/T+TvT/OjMHcZm8Hg+ZGSQtu4ISwoex+bUOBLxlkSE5TnicLSrG255ZGQ6spJw9uw0fxv7IBYj UHwuWvNk01FU9XDmP7sMDkHN8t6I375oLwGEPbIJrpZcx2A0M8b3vgpKh9IwAYZSaPWQhoIDwN6FK FKQqPYq/f7nswZks4x+Vf/k8K+3ElA+XkheI5bB+A/OCkk624bXHgWZp9y1mH+Xft3QdEOzJSyDRs CkPFLsAwMTVrJhAMgUnIa0XWrEcbPjbnF/SG+ALuDqcRcs2ObkDeGxg3Ep8QcCCbmU+elKPxjWO6P WXih4Qxc9zB7YXGgTfCw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1PZu-00000002YOO-2Dng; Mon, 29 Apr 2024 11:53:50 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:242:246e::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1PYU-00000002XE8-16mt for hostap@lists.infradead.org; Mon, 29 Apr 2024 11:52:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=QOQ6hvktA0nRQY7iqWWFTSsZUefsHAFwwQTQLIrb4VI=; t=1714391542; x=1715601142; b=u/cx/ZNnqi/kxsw0Sz2W+I1vqxChucGAPtz9dJrx4osZ4hr zBpPVZ7YRs3FCJAIFnvwSTdJ/+tRnsVjDZQYYkkyssFxwk0/HN7HjBkMrBBkRBx6IQV1cNem6/xTn BH7lMsn7r4JEsaNOc0S7rQj2cLS/cXOd/4cgmXrudKA1fYMFXRjxsik9aHAKDc3z/mmFJHvyD5Rkm IayO0ADQFghydfxVlf7EoDVvYGYVCtTpefZ56GQE78qEv5oWB/l/1Ox4kA+qeT0jSLHypseBQNh7J 4lGxDLl1kme2fpLD2jGLd6QPmXiZE0LM+X+easIm1/PG8teKBbhH4G4v49yXkZ4A==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1s1PYS-0000000CNIg-0mTo; Mon, 29 Apr 2024 13:52:20 +0200 From: benjamin@sipsolutions.net To: hostap@lists.infradead.org Cc: Benjamin Berg Subject: [PATCH 15/16] tests: Add a WNM tests to check candidate list is used if not required Date: Mon, 29 Apr 2024 13:51:56 +0200 Message-ID: <20240429115157.211073-16-benjamin@sipsolutions.net> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240429115157.211073-1-benjamin@sipsolutions.net> References: <20240429115157.211073-1-benjamin@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240429_045222_440719_6486AEE0 X-CRM114-Status: UNSURE ( 9.69 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Benjamin Berg This tests that the candidate list is used even if it is not required because the abridged and preferred candidate list included bits are not set. Signed-off-by: Benjamin Berg --- tests/hwsim/test_wnm.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Benjamin Berg This tests that the candidate list is used even if it is not required because the abridged and preferred candidate list included bits are not set. Signed-off-by: Benjamin Berg --- tests/hwsim/test_wnm.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/hwsim/test_wnm.py b/tests/hwsim/test_wnm.py index 4df9d77f3..fe3417dc3 100644 --- a/tests/hwsim/test_wnm.py +++ b/tests/hwsim/test_wnm.py @@ -911,6 +911,29 @@ def test_wnm_bss_tm(dev, apdev): ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=0.5) if ev is not None: raise Exception("Unexpected reassociation") + + dev[0].flush_scan_cache() + logger.info("Candidate list is used even if not required by spec (pref=0, abridged=0)") + if "OK" not in hapd2.request("BSS_TM_REQ " + addr + " pref=0 abridged=0 valid_int=255 neighbor=" + apdev[0]['bssid'] + ",0x0000,81,1,7,0301ff" + ' neighbor=' + apdev[1]['bssid'] + ",0x0000,115,36,7,030100"): + raise Exception("BSS_TM_REQ command failed") + ev = hapd2.wait_event(['BSS-TM-RESP'], timeout=10) + if ev is None: + raise Exception("No BSS Transition Management Response") + if "status_code=0" not in ev: + raise Exception("BSS transition request was not accepted: " + ev) + if "target_bssid=" + apdev[0]['bssid'] not in ev: + raise Exception("Unexpected target BSS: " + ev) + # This scans only one frequency + scan_ev = dev[0].wait_event(["CTRL-EVENT-SCAN-STARTED"], timeout=0) + if scan_ev is None: + raise Exception("Expected scan started") + dev[0].wait_connected(timeout=15, error="No reassociation seen") + if apdev[0]['bssid'] not in ev: + raise Exception("Unexpected reassociation target: " + ev) + ev = dev[0].wait_event(["CTRL-EVENT-SCAN-STARTED"], timeout=0.1) + if ev is not None: + raise Exception("Unexpected scan started") + finally: clear_regdom_state(dev, hapd, hapd2)