From patchwork Mon Sep 25 07:20:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1838934 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=gGI6OWWh; 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=JXVoUdub; 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 4RvDrF5Fxwz26jP for ; Mon, 25 Sep 2023 17:23:41 +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=eOJBrmzvKLBtO+ZBZOtM685EttgMko5hK2YuByz48Zw=; b=gGI6OWWht9qeoH bw8NoXob2zMtyJynM2V5AOnrIPrcWm0NAUfJbCnfwTKjv/vxpovTCOz8mrmQRWg56hF0ghDpGqeWy Uz74jhRoiwZDeuPJw51IHGao3SGFTfgoarOFm+AZ3pCaFpWGjOX+E2lrRiJ3WXBAc3Bf41oXo5svV V/bONaplfx1+BLIN65SBQeJ5bBA6Oo+kWJqVswnNpX5Ti7ZWL6B5BsXE7HV/fbKQ7ak8uZwC1O0wy /FRLzg1xcZPsQXwoUbJZ5zcirheXvbmQ2flpRh5awD15Tx/YuIRfcvn1ItKvBip6ixWUZG9/CwS71 4XBeYC57FYniX3u4x5yw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qkfvl-00DYNi-0u; Mon, 25 Sep 2023 07:22:57 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:242:246e::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qkfvY-00DYFz-2K for hostap@lists.infradead.org; Mon, 25 Sep 2023 07:22:45 +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=dNwnl+hsf/RgLwCcktspSPa5hCCLKuzFt8c9ezO+Yng=; t=1695626564; x=1696836164; b=JXVoUdubo4ygybaaYpglhcrXBWxf/wEcmn3J01CDBZ1PrS2 QsPAaCrxEGe5n4scZc+Qmruj9g3wd5SVEnlcKLAYRBrDspD9PTd+GlgqbMcErPPNWslQUj10htKsb BWLAY62bmEVCS0wWtbiBGHiXENudwm/Px8RVGtvZle0n9rvKE6/dGVcsbIVylqLKQOSbBchS8Le5X nbU2qzAPGS2EG0rzUATr+OlRvd7aDYKc7I7Rirk38jUnNWboNYY4w9bvYlkw+d/vVRLVW3Ez/ZJ8J bKttIGRNZnBabt/GSjQj80GUadqtgraUfB0GQeDeEdZSOAi3AoxQPdXBdsv2FEUA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1qkfvW-003GNz-1S; Mon, 25 Sep 2023 09:22:42 +0200 From: Johannes Berg To: hostap@lists.infradead.org Cc: Johannes Berg Subject: [PATCH 13/17] tests: pmksa_cache: wait for STA on AP side before query Date: Mon, 25 Sep 2023 09:20:53 +0200 Message-ID: <20230925092039.461d8eb0a4fe.Ib58ac8bc71a41cfaf4663feb28752431f821684b@changeid> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230925072039.49987-18-johannes@sipsolutions.net> References: <20230925072039.49987-18-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230925_002244_767335_586315B0 X-CRM114-Status: UNSURE ( 9.07 ) 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: Johannes Berg Before querying the PMKSA cache, wait for the STA to have appeared on the AP side, otherwise scheduling differences may have us asking when the STA thinks it's connected but the AP hasn't fully proces [...] 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_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -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: Johannes Berg Before querying the PMKSA cache, wait for the STA to have appeared on the AP side, otherwise scheduling differences may have us asking when the STA thinks it's connected but the AP hasn't fully processed that. Signed-off-by: Johannes Berg --- tests/hwsim/test_pmksa_cache.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/hwsim/test_pmksa_cache.py b/tests/hwsim/test_pmksa_cache.py index 65ef5d8162e8..17f478f1ce60 100644 --- a/tests/hwsim/test_pmksa_cache.py +++ b/tests/hwsim/test_pmksa_cache.py @@ -980,6 +980,7 @@ def test_pmksa_cache_ctrl(dev, apdev): pmksa_sta = dev[0].get_pmksa(bssid) if pmksa_sta is None: raise Exception("No PMKSA cache entry created on STA") + hapd.wait_sta() pmksa_ap = hapd.get_pmksa(addr) if pmksa_ap is None: raise Exception("No PMKSA cache entry created on AP") @@ -1000,6 +1001,7 @@ def test_pmksa_cache_ctrl(dev, apdev): pmksa_sta2 = dev[0].get_pmksa(bssid) if pmksa_sta2 is None: raise Exception("No PMKSA cache entry created on STA after reconnect") + hapd.wait_sta() pmksa_ap2 = hapd.get_pmksa(addr) if pmksa_ap2 is None: raise Exception("No PMKSA cache entry created on AP after reconnect")