From patchwork Mon Dec 25 10:20:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1879977 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=Q7BSnq2R; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=a3aK+bUk; 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 4Symb4716cz20Rq for ; Mon, 25 Dec 2023 03:24:47 +1100 (AEDT) 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=91VfZcqf2Vhj5i6T6reODkI6LT80ROwgnJJHQDJ0Ugo=; b=Q7BSnq2RZY3PIw VnMthaDiiuiUZz1qwEAsSaO92+0YYCpqhgD5Y21n+CiNIel3cYaviF5mvFwjQoqyNP3/ss77qA7UP YYQDLnROv59byFL+7XuKNcP6TYFLpXqZ8t6IklhMsmkCvi8WzSJkGnqlTxqfDPF0fss2aKDE/S/eG XPk0TagapnfLAYgWWGvSPS9kyXJhnXP6tgd9z7wrOpzuKSYDIAltwWeO4BapOogogZKyWmp9KBo22 09ctvcuMRYQT/qL8PfvaXVQYnFtUdRIZA4xp0B6br5mTbF0v2pT2r9NRTFrLUQA5W1x2Sww7bDrQX XrMQRk6w/2HYRYMXQF3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rHRGg-009c0J-1a; Sun, 24 Dec 2023 16:23:58 +0000 Received: from mgamail.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rHRGe-009bzb-2F for hostap@lists.infradead.org; Sun, 24 Dec 2023 16:23:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703435036; x=1734971036; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PbcTRc85RQ1vHYjirgMUZCOjv+MfGmNIseC2McsD3EE=; b=a3aK+bUkE8AuHqh/TTXazqu5a8ZWleQRD+5a7S2mYCS2nslhr/mTjhW5 Mp2TgxFcdEnXxIRGEM5AwzUAZ+5dl+CEqxHohniLLca8LUAnHovo3+oSd zTArDhlUwYd8V+6ZeMuZHmVQr3me2w+hgcu3Z6jDFApzjPXR9XWs1TWeX VFKOxA99E5yW5XXzF1rZKy3DCxhXhxAoeVOMynMyJZvH+VjBCWhAib1OM aetTLh+VxPusiZGUoaHUOM6NlhQeNpFxr8zxQ/kW01BmXoZy5wrZ5wfAK 5dAfNJd85flnpHfnJUlAQWiYaupvTo/dyKboy9lwiVZraZnxYmgpwIG6e A==; X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="482420986" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="482420986" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:23:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="777554240" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="777554240" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:23:55 -0800 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Benjamin Berg Subject: [PATCH 01/12] hwsim: Strip trailing space from ip output Date: Mon, 25 Dec 2023 12:20:58 +0200 Message-ID: <20231225102109.2853783-2-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> References: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231224_082356_745098_CADA9969 X-CRM114-Status: GOOD ( 11.02 ) 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 It seems that the messages from ip may have a trailing space in some cases, which may break matching in surrounding logic. Strip the output to remove whitespace and avoid any issues this may cause. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.43 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 2.5 DATE_IN_FUTURE_12_24 Date: is 12 to 24 hours after Received: date -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 -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender 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 It seems that the messages from ip may have a trailing space in some cases, which may break matching in surrounding logic. Strip the output to remove whitespace and avoid any issues this may cause. Signed-off-by: Benjamin Berg --- tests/hwsim/test_ap_hs20.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/hwsim/test_ap_hs20.py b/tests/hwsim/test_ap_hs20.py index 1884bcb8dc..afb54c5d54 100644 --- a/tests/hwsim/test_ap_hs20.py +++ b/tests/hwsim/test_ap_hs20.py @@ -4766,7 +4766,7 @@ def get_permanent_neighbors(ifname): cmd = subprocess.Popen(['ip', 'nei'], stdout=subprocess.PIPE) res = cmd.stdout.read().decode() cmd.stdout.close() - return [line for line in res.splitlines() if "PERMANENT" in line and ifname in line] + return [line.strip() for line in res.splitlines() if "PERMANENT" in line and ifname in line] def get_bridge_macs(ifname): cmd = subprocess.Popen(['brctl', 'showmacs', ifname], From patchwork Mon Dec 25 10:20:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1879976 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=oiLPAe+h; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=SG3OlE2r; 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 4Symb45mCcz20Qr for ; Mon, 25 Dec 2023 03:24:47 +1100 (AEDT) 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=j5g8GWkR25xE4bdGf3t5TZf9JrG7O010z1BwBppNSF8=; b=oiLPAe+hS5MiE+ fg2Nbrp4ge9zdDC0uWzmbNhiJ1xEnn4Vhd75XxdKyDdBDWVeHk4zHnTqPeYHm38pQ1YfxiDxMimVA 7YwP5uBtK6g3gydY7SAWbIBIq57kXS24tZmngpbqS0TaNeUJtMx7b2vAWufEeuskmXbvnCFqAkvi1 esSrxBhpQp+VMhd+TRCwWh1ZI/642TXji6R1HWz/LWhVIX5gY2mGkBZtEPbl19REgzAnsqLJfwJeh bOGnd0mh2EsnYOW7BLaE46q8hGEVCySVRMyddI9WIfkCCV8aB/tRIDQkbIv8q0M43MkKRZqs7uPvO 8vYrWyysgDGa3u28oplw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rHRGr-009c1r-2F; Sun, 24 Dec 2023 16:24:09 +0000 Received: from mgamail.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rHRGo-009c18-2U for hostap@lists.infradead.org; Sun, 24 Dec 2023 16:24:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703435046; x=1734971046; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Z4f7hOmAGny6nnygS27C5Xb+9OQzbgzruuKyXu580pY=; b=SG3OlE2rcxnwIOqaBBpMmEzpye6JYsy3OKHjSldGoo4ULyDxUk33J4Rr 9Ats320PszCHXltlqF29Lyii12qkbXUxSY+8RPFjb8ARAe9cj+cCjlM9L RiPVcOBqIFw4MUv/CU2Khi8mDIJq+J54kCK/dJ9igsbQnWMs1w5y/ZeX/ ia12VA91dtawFs3YKklXDIMCzKMLHvWGRLxbZ06wK2kWs5R9ppHTFTcOf If0YCrzYno9HMchSAsa6rAI9DyJn2uAfOjqoCWzvAXY04pXS/Va1w1lzl LNm/yXwVbqK0I2CkunNAmeaOY57I/RkrrHMRcGEF8Rg0sCF5hNch9komS g==; X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="482420992" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="482420992" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="777554283" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="777554283" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:04 -0800 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Benjamin Berg Subject: [PATCH 02/12] hwsim: explicitly set address to bind to Date: Mon, 25 Dec 2023 12:20:59 +0200 Message-ID: <20231225102109.2853783-3-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> References: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231224_082406_822445_4C763F58 X-CRM114-Status: GOOD ( 10.66 ) 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 pyrad internally uses socket.getaddrinfo. While it is documented that one can pass an empty string to bind to all interfaces. The underlying function expects None instead though, breaking the call. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.43 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 2.5 DATE_IN_FUTURE_12_24 Date: is 12 to 24 hours after Received: date -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 -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender 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 pyrad internally uses socket.getaddrinfo. While it is documented that one can pass an empty string to bind to all interfaces. The underlying function expects None instead though, breaking the call. Either way, it does not hurt to set the bind address to 127.0.0.1 explicitly, so do so to avoid issues. Signed-off-by: Benjamin Berg --- tests/hwsim/test_eap_proto.py | 2 +- tests/hwsim/test_radius.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/hwsim/test_eap_proto.py b/tests/hwsim/test_eap_proto.py index a1270ac3c6..e125481717 100644 --- a/tests/hwsim/test_eap_proto.py +++ b/tests/hwsim/test_eap_proto.py @@ -160,7 +160,7 @@ def start_radius_server(eap_handler): srv.hosts["127.0.0.1"] = pyrad.server.RemoteHost("127.0.0.1", b"radius", "localhost") - srv.BindToAddress("") + srv.BindToAddress("127.0.0.1") t_stop = threading.Event() t = threading.Thread(target=run_pyrad_server, args=(srv, t_stop, eap_handler)) t.start() diff --git a/tests/hwsim/test_radius.py b/tests/hwsim/test_radius.py index 5f1f4f175f..224bff177d 100644 --- a/tests/hwsim/test_radius.py +++ b/tests/hwsim/test_radius.py @@ -1132,7 +1132,7 @@ def test_radius_protocol(dev, apdev): srv.hosts["127.0.0.1"] = pyrad.server.RemoteHost("127.0.0.1", b"radius", "localhost") - srv.BindToAddress("") + srv.BindToAddress("127.0.0.1") t_events = {} t_events['stop'] = threading.Event() t_events['msg_auth'] = threading.Event() @@ -1249,7 +1249,7 @@ def start_radius_psk_server(psk, invalid_code=False, acct_interim_interval=0, srv.hosts["127.0.0.1"] = pyrad.server.RemoteHost("127.0.0.1", b"radius", "localhost") - srv.BindToAddress("") + srv.BindToAddress("127.0.0.1") t_events = {} t_events['stop'] = threading.Event() t_events['psk'] = psk @@ -1595,7 +1595,7 @@ def test_ap_vlan_wpa2_psk_radius_required(dev, apdev): srv.hosts["127.0.0.1"] = pyrad.server.RemoteHost("127.0.0.1", b"radius", "localhost") - srv.BindToAddress("") + srv.BindToAddress("127.0.0.1") t_events = {} t_events['stop'] = threading.Event() t_events['long'] = threading.Event() From patchwork Mon Dec 25 10:21:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1879975 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=gqPzaMIA; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=mUlOcB72; 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 4Symb465SPz20Rm for ; Mon, 25 Dec 2023 03:24:47 +1100 (AEDT) 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=CZ2JEHl+cg6NKGZJXgFEVvlTnrHg7QoojdEOrv6E1v0=; b=gqPzaMIAeB4vcZ ViHaTC+iXCNGlj8ot7LRZQPPv2OQ20iHxWkPV/l9Kx/D2aColYZPdvPSQdXO3DauJvNwuyW07obk9 Wg68BxdcGBzflbuGuGRcHBqJHa6go1hrj5h0h8D76BXP9ByfTfBXC91iYj3z4Hj1kliN/ILmzfpVo QB3mcSz3XVy1CcWje6tF829OLoW2JsDjU+2/Sz5sAHTELhT8jXSwg5pWyeUG3sMQp++JSXvmKYm5e DSoB0CA9m5d4GA4ZxiXfuyf3up9iz3uWPtiQlTARXag93YflnkUiIL9yc5+AUXz88W2YC97dAAT17 aTi8WKHyiRa/ah5ENHwg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rHRGt-009c2a-1c; Sun, 24 Dec 2023 16:24:11 +0000 Received: from mgamail.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rHRGq-009c18-3D for hostap@lists.infradead.org; Sun, 24 Dec 2023 16:24:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703435048; x=1734971048; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uvHUpJ6jFr28/8DwRCNk3AuxeE75UFgnrGX2GnehI00=; b=mUlOcB72ykEPLxFzY3QPXK2LZ3rL3Yo4VSWK+laVPcGGnmTRNJ4flHQb dCmMYl9a70MKJhrkSARxvrDXcMQ8Ca6FMa3KjaWLpZ9K51P1r0y0+9wy4 mSSgaKwQQif+YBMLqmeacMlFZa43puqk+RFKjVtevUmEQhfZZ0i6l9EPd aYy59VO1mKs0zb01WVxlAv/qhLKqj3qo14iy4u+rkZ6WilK4ZAsc5JIru eJC9ZgH2JLapnziGcNQiYFUjKBCG72CibfOiqsZ+Y6SrOyWgJqLZjq5Yb qNI7PYMrwBAQSUaX7asNn6IsqanoJfG8iEnrGFwzfMlAvyRnOFOKWRtPD g==; X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="482420993" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="482420993" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="777554290" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="777554290" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:07 -0800 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Benjamin Berg Subject: [PATCH 03/12] hwsim: write services needed for pyrad Date: Mon, 25 Dec 2023 12:21:00 +0200 Message-ID: <20231225102109.2853783-4-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> References: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231224_082409_041876_08669D1B X-CRM114-Status: UNSURE ( 7.82 ) 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 pyrad does an internal call to getaddrinfo with the service "www". Make sure this service is known by writing an appropriate /etc/services file. Signed-off-by: Benjamin Berg --- tests/hwsim/vm/inside.sh | 5 +++++ 1 file changed, 5 insertions(+) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.43 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 2.5 DATE_IN_FUTURE_12_24 Date: is 12 to 24 hours after Received: date -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 -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender 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 pyrad does an internal call to getaddrinfo with the service "www". Make sure this service is known by writing an appropriate /etc/services file. Signed-off-by: Benjamin Berg --- tests/hwsim/vm/inside.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/hwsim/vm/inside.sh b/tests/hwsim/vm/inside.sh index d813cf065f..38c5284d9c 100755 --- a/tests/hwsim/vm/inside.sh +++ b/tests/hwsim/vm/inside.sh @@ -93,6 +93,11 @@ tcp 6 TCP udp 17 UDP ipv6-icmp 58 IPv6-ICMP EOF +# for pyrad +cat > /etc/services < X-Patchwork-Id: 1879979 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=jHcCFdIX; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=F3LI/oCn; 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 4Symb45VDvz1ydb for ; Mon, 25 Dec 2023 03:24:47 +1100 (AEDT) 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=ogviVmKuh+4lOQvJGPL2pafRGsmsYJcVEd0dvxVZOfQ=; b=jHcCFdIXGzBXM1 LVPD+nTFqZJ9rSFLi1eXMkJPO93Ipc2zbeDhBMU0zOuw4P2ul1ktLOugLufVQuvFglpoIC3Nii3hQ tywi55wXSkmskiNBQvtPGU0FoxTmocoROkbBHW87Cs/iizK6ahbHjIiS61s7JvRHXztP5ZU/NR6N/ wL4VO32t1ap1L8+gaFyVEeE/GEJgqhVPpEGhDYljNLzozOffCrCscpQkDza3ad7yS2mx6N68AKabi OzXYvigPC3g7sDXkbG7Hq83heOYTpO8Qdsd/wMFND7Mee/6lTDS/3EJK35wLtTrU2WadiESURdNFK /etyGaNcMLayho2AXQpw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rHRGv-009c3Q-23; Sun, 24 Dec 2023 16:24:13 +0000 Received: from mgamail.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rHRGt-009c18-0Z for hostap@lists.infradead.org; Sun, 24 Dec 2023 16:24:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703435051; x=1734971051; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4gbiZ0u4+eeeuGdBn0rqiplf4hPK24j5s+p3pS1mPSE=; b=F3LI/oCnpr36cYXURCUIihKbEGCeMRl0fi+D/4YC9dYgSj9owxNEcBA3 qqnEVlwGSss1TE6oJV7ztEmuZbQX9p1sE4fTder/ZJaBssBPCsjQhTYBC F6HLaeo8qGXzi8NtxHuH+XiESIuPwv7E5n7OTxMJ067rJwIYQ2+FO4ql2 e1FnMhi4oMK1QDX1SsexfxflgiRASKSgmB3kuZjkvJVQGLdzujTl1Is7W nMzlGhTW8qWzclwnjOqhokARQcie2Z+KmunXNlq4otefLBeC3SloNcA44 ugUUN/WNgTTjzsm134duY6dMlrKScxMXbZWYQIXdDCatz5/chsI2COyjF w==; X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="482420994" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="482420994" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="777554297" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="777554297" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:09 -0800 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Benjamin Berg Subject: [PATCH 04/12] hwsim: Use pgrep instead of ps Date: Mon, 25 Dec 2023 12:21:01 +0200 Message-ID: <20231225102109.2853783-5-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> References: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231224_082411_222287_2D24E325 X-CRM114-Status: GOOD ( 10.94 ) 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 The ps command as shipped by busybox does not support the "command" column. Change the code to use pgrep instead which will work fine in all environments. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.43 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 2.5 DATE_IN_FUTURE_12_24 Date: is 12 to 24 hours after Received: date -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 -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender 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 The ps command as shipped by busybox does not support the "command" column. Change the code to use pgrep instead which will work fine in all environments. Signed-off-by: Benjamin Berg --- tests/hwsim/test_ap_eap.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/tests/hwsim/test_ap_eap.py b/tests/hwsim/test_ap_eap.py index bfc1bb4175..3885943153 100644 --- a/tests/hwsim/test_ap_eap.py +++ b/tests/hwsim/test_ap_eap.py @@ -7607,20 +7607,15 @@ def test_ap_wpa2_eap_psk_mac_addr_change(dev, apdev): params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap") hapd = hostapd.add_ap(apdev[0], params) - cmd = subprocess.Popen(['ps', '-eo', 'pid,command'], stdout=subprocess.PIPE) - res = cmd.stdout.read().decode() + cmd = subprocess.Popen(['pgrep', '-nf', 'wpa_supplicant.*' + dev[0].ifname], stdout=subprocess.PIPE) + res = cmd.stdout.read().decode().strip() cmd.stdout.close() pid = 0 - for p in res.splitlines(): - if "wpa_supplicant" not in p: - continue - if dev[0].ifname not in p: - continue - pid = int(p.strip().split(' ')[0]) - if pid == 0: - logger.info("Could not find wpa_supplicant PID") - else: + if res: + pid = int(res.strip()) logger.info("wpa_supplicant PID %d" % pid) + else: + logger.info("Could not find wpa_supplicant PID") addr = dev[0].get_status_field("address") subprocess.call(['ip', 'link', 'set', 'dev', dev[0].ifname, 'down']) From patchwork Mon Dec 25 10:21:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1879980 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=H5K4vjHM; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=fTriTAwz; 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 4Symb74YRWz23dB for ; Mon, 25 Dec 2023 03:24:50 +1100 (AEDT) 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=OexgS+gsPaFlynTOeiRJ44zTjgALLriHD6Wq7DA+54s=; b=H5K4vjHMJSyaSY DkyU0wDoFZA3A8mMGCOuJ5qZRTvaQO7NZT93BMISO/55cUJM+kIFF0TLFpKR8RVSQHZ4PIP+icHba tUTGH9md+98GRmfpSTRAdyvZmmTxydIDOEFJqkPcQvRQTEZpw3EHijWEe7kAHyhcQIrzCfBQuYv+M oLL8U7rvwWGA9lWgnUDWTgv2ouIm754EAsHlTxeOCY9bMxRsb6qqfGb/yzfp8kOBtPABalYrvGC8K 0X5jgQCpSY+O5CZUStjxC4uGQ5gqlRX/Apw8zqp4clQ7B5Gu2C7EdxtAxRLCdDtdI3pT+vxJJiWX8 TTBsx4qZUyr7sK7W7mbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rHRGx-009c4K-2V; Sun, 24 Dec 2023 16:24:15 +0000 Received: from mgamail.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rHRGv-009c18-09 for hostap@lists.infradead.org; Sun, 24 Dec 2023 16:24:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703435053; x=1734971053; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6bbcmraBJCbNvQvYVaigGCh4zdYU7KT6psGbyVhkG0I=; b=fTriTAwzIQgaAAUJyEKmgUO08NATLPfIG0DGEpWkehR0YNPQmAyTJ9qi FMLRXjVWDXTBvYtcmaex5aLA1GjXxLRvBEns9n8bBWWB/yi8g67azkSid N7Se6JyjyBSTS97magFMAGHsxR4C5WX5qFtABTbGbTeTJWE/qKpW4a+B0 tq9ovwbXOA3AEspIbAu8yHNyrtMg63U72lS5u9kYoiVUqnHj/mqzuRuq6 XDaC4AkyPPv77RLdxr4rt1rfIkaAB5Trkt3uStxm0iUppxgm6V1BiiaOr z9AdVvxXH9jpnL864RQe5KJUXDnOgm+YPHci+y5DPK6aI0ylbJUepPqnS A==; X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="482420995" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="482420995" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="777554303" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="777554303" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:11 -0800 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Benjamin Berg Subject: [PATCH 05/12] hwsim: Stop WPA AP at end of VHT 80 MHz (US) test Date: Mon, 25 Dec 2023 12:21:02 +0200 Message-ID: <20231225102109.2853783-6-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> References: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231224_082413_094369_15CD5250 X-CRM114-Status: UNSURE ( 9.01 ) 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 The regulatory domain cannot be reset while the AP is still active. Add the appropriate commands to bring down the AP after the test, which will also make resetting the regulatory domain work. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.43 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 2.5 DATE_IN_FUTURE_12_24 Date: is 12 to 24 hours after Received: date -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 -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender 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 The regulatory domain cannot be reset while the AP is still active. Add the appropriate commands to bring down the AP after the test, which will also make resetting the regulatory domain work. Signed-off-by: Benjamin Berg --- tests/hwsim/test_wpas_ap.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/hwsim/test_wpas_ap.py b/tests/hwsim/test_wpas_ap.py index 7090f23e4a..67a34cd613 100644 --- a/tests/hwsim/test_wpas_ap.py +++ b/tests/hwsim/test_wpas_ap.py @@ -795,6 +795,8 @@ def run_wpas_ap_open_vht80_us(dev, freq, center_freq, ht40): if "WIDTH=80 MHz" not in sig: raise Exception("Unexpected SIGNAL_POLL value(2): " + str(sig)) finally: + dev[0].request("REMOVE_NETWORK all") + dev[0].wait_disconnected() set_country("00") dev[0].set("country", "00") dev[1].flush_scan_cache() From patchwork Mon Dec 25 10:21:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1879981 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=ELrn1OBy; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=AUvMNO4x; 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 4Symb825Xdz23dC for ; Mon, 25 Dec 2023 03:24:52 +1100 (AEDT) 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=4/+EVh2InW5ibxAmGylUh/S/DTvmt0M1DJoPrqI8D+0=; b=ELrn1OByFp2FXh t8tjibcW10cDpekwreOXuDBhkqgAvDzbfRvSn9b9yepZdrqe8hykrA0/Id2DnSfatYHTzi6tRm/jn B9/fO249Xht2UnSAAmlD63j+WvJJHH/htHuzAl7gW5ZXEIYrWL5C9Wsv7mbff7I1mZy/S2+EIAfw9 CIazGR9GuKalk0EQqeNQ/x7K+3HSLeH7WxAtaZPDZzVZdthhJ3B4t6JmHdwOaXppTNLN51DFo6zQF BWE68KzuQvhnLrMePeGK3CRelNB++lV3HNcj799N6W/MlSlwHJ4nLQFIBWk2XuUqxX0/+SYwtQ1Nl vagmFhN8kbo9jD9fe/cQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rHRGz-009c5e-3A; Sun, 24 Dec 2023 16:24:17 +0000 Received: from mgamail.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rHRGx-009c18-0l for hostap@lists.infradead.org; Sun, 24 Dec 2023 16:24:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703435055; x=1734971055; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rZQ32ScnHAwX3BnTsyRrE8L/Sq0o+HZ9xs3U7Viino4=; b=AUvMNO4xntZeCGIikAG0UcB8qCr47nF08IcGzHx7A97XWZ2njBsgEmVH rbfEtgorDU1UpSxC3CdHr3EJBryFktzCKEcXXhy+bpDyIm26COIv+D0X5 9KgDWxUYyxcnJPpJinpoh/Uzc1a1t0Plw8wJKdSGfCvjWL9EBqSO9L4Dc H0JmuEbhWr2gnvIlwd1iFn/uiAprzeUlZJMjEoa0wpo0PO/TOvPL962U0 rqlvkI5wXcQKqhYep/jKURJmKSeQmGSfBuEZn5i5ia3gaFe6mGDIu83EN F4jt5t3snoeaNjZEdmo3Se8h/0qhDB01dTKfA72ygE1v5Mq0BU1b7OQTv w==; X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="482420996" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="482420996" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="777554310" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="777554310" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:13 -0800 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Benjamin Berg Subject: [PATCH 06/12] hwsim: Flag inside VM using an environment variable Date: Mon, 25 Dec 2023 12:21:03 +0200 Message-ID: <20231225102109.2853783-7-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> References: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231224_082415_284918_C2B87FED X-CRM114-Status: GOOD ( 11.71 ) 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 It is possible to execute the tests directly inside the a VM without necessarily running the repository wrapper script to do so. In these cases, passing the VM flag using an environment variable allow [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.43 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 2.5 DATE_IN_FUTURE_12_24 Date: is 12 to 24 hours after Received: date -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 -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender 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 It is possible to execute the tests directly inside the a VM without necessarily running the repository wrapper script to do so. In these cases, passing the VM flag using an environment variable allows correctly flagging this fact to the tests. Signed-off-by: Benjamin Berg --- tests/hwsim/run-all.sh | 2 +- tests/hwsim/utils.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/hwsim/run-all.sh b/tests/hwsim/run-all.sh index 75c3a58b52..bee753bb69 100755 --- a/tests/hwsim/run-all.sh +++ b/tests/hwsim/run-all.sh @@ -134,7 +134,7 @@ if [ "$(id -u)" != 0 ]; then else SUDO= fi -${SUDO} ./run-tests.py -D --logdir "$LOGDIR" $TRACE_ARGS -q $DB $RUN_TEST_ARGS || errors=1 +${SUDO} env VM=$VM ./run-tests.py -D --logdir "$LOGDIR" $TRACE_ARGS -q $DB $RUN_TEST_ARGS || errors=1 ./stop.sh diff --git a/tests/hwsim/utils.py b/tests/hwsim/utils.py index d01e1fbbfe..7e36082843 100644 --- a/tests/hwsim/utils.py +++ b/tests/hwsim/utils.py @@ -79,10 +79,8 @@ def wait_fail_trigger(dev, cmd, note="Failure not triggered", max_iter=40, time.sleep(timeout) def require_under_vm(): - with open('/proc/1/cmdline', 'r') as f: - cmd = f.read() - if "inside.sh" not in cmd: - raise HwsimSkip("Not running under VM") + if os.getenv('VM') != 'VM': + raise HwsimSkip("Not running under VM") def iface_is_in_bridge(bridge, ifname): fname = "/sys/class/net/"+ifname+"/brport/bridge" From patchwork Mon Dec 25 10:21:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1879985 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=Cum3y0oa; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=O22FVT9U; 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 4SymbR2tjgz23dN for ; Mon, 25 Dec 2023 03:25:07 +1100 (AEDT) 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=S2wbEDVPCc0gGLjiq3U8BuAPep/DhiCZDx+ASKHi0FI=; b=Cum3y0oasKdkNY e7FUId3rlWTRnGkIXBR3rrqMytcicI2vKmdH5gCdXkLg8pEHoxPJJA3M/C9lkC5+SI5Z1/7yQtMo7 cnP2kghPvZSGztFbhiI6A1EPvsAItVi9k2FSLeufzNEn9CISmLHLLicBCgcoDhVa0LglFHYBPONet 5lUzoK90rG9Niw+7xdWag9gTKZoeeIJw+VbeUhIrfmO1XxH51PfRLx/SCpK9fd4qhjrLXxd09ZzlR bstYqCxMZ6W5+kEmfFnjmQoPw/L2HTDss+HaigsWH11tGdp9oYCDrDL6oINYkWFlkxe67kvMIMCtW ZchiS4cKVg9RfngXWb3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rHRH2-009c7i-0p; Sun, 24 Dec 2023 16:24:20 +0000 Received: from mgamail.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rHRGz-009c18-11 for hostap@lists.infradead.org; Sun, 24 Dec 2023 16:24:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703435057; x=1734971057; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=v25evgnWsBv9Qr4NsXwBZmH6Icx2V42pGEI0zrBK1Uk=; b=O22FVT9U0c4RUK/Dk8HmgFkDkK9Ia7lPSbjCSbQj3MOF+2VIGqJfEZMB DCg1b0kppVVnMkouC6cHZ8tgkpiPDWFYKmw5TCQJg38bj7iRz8ehiIDqI qrG9cgKAtmHYHISTkY43xqiU9zdhCX6RHiYICo1W7EfGDHNF+sgslBdqs eCzZ0MPCTf1iCQx/KEa8lZKt6v/iirfdu8eTEPwTzKF26j0FI2Wpkg3ZY 3JPnGI9G9q8YulMZsB/M6lMsQ8IaDZyYMbWjJCZ6zVufrv52llN9CW+pq BRC7TPzgwuH1NREOnSFuYSGIC2uMQ8aGug2YaUkQmKi5d1ZTYcxohSFLp Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="482420997" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="482420997" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="777554320" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="777554320" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:15 -0800 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Andrei Otcheretianski Subject: [PATCH 07/12] Disable _FORTIFY_SOURCE when building with -O0 Date: Mon, 25 Dec 2023 12:21:04 +0200 Message-ID: <20231225102109.2853783-8-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> References: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231224_082417_363275_DC1B3799 X-CRM114-Status: UNSURE ( 8.85 ) 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: _FORTIFY_SOURCE requires at least -O2 optimization level. This may result in compilation warnings. Fix it. Signed-off-by: Andrei Otcheretianski --- hostapd/Makefile | 2 +- tests/build/build-hostapd-internal.config | 2 +- tests/build/build-wpa_supplicant-internal.config | 2 [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.43 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 2.5 DATE_IN_FUTURE_12_24 Date: is 12 to 24 hours after Received: date -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 -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender 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 _FORTIFY_SOURCE requires at least -O2 optimization level. This may result in compilation warnings. Fix it. Signed-off-by: Andrei Otcheretianski --- hostapd/Makefile | 2 +- tests/build/build-hostapd-internal.config | 2 +- tests/build/build-wpa_supplicant-internal.config | 2 +- wpa_supplicant/Makefile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hostapd/Makefile b/hostapd/Makefile index 51702439c6..500098c8ba 100644 --- a/hostapd/Makefile +++ b/hostapd/Makefile @@ -167,7 +167,7 @@ OBJS += ../src/eapol_auth/eapol_auth_sm.o ifdef CONFIG_CODE_COVERAGE -CFLAGS += -O0 -fprofile-arcs -ftest-coverage +CFLAGS += -O0 -fprofile-arcs -ftest-coverage -U_FORTIFY_SOURCE LIBS += -lgcov LIBS_c += -lgcov LIBS_h += -lgcov diff --git a/tests/build/build-hostapd-internal.config b/tests/build/build-hostapd-internal.config index 421977eed4..5b5d8037ed 100644 --- a/tests/build/build-hostapd-internal.config +++ b/tests/build/build-hostapd-internal.config @@ -77,7 +77,7 @@ CONFIG_SUITEB=y CONFIG_MBO=y CONFIG_CODE_COVERAGE=y -CFLAGS += -O0 -Wsign-compare +CFLAGS += -O0 -Wsign-compare -U_FORTIFY_SOURCE CONFIG_TAXONOMY=y #CONFIG_FILS=y diff --git a/tests/build/build-wpa_supplicant-internal.config b/tests/build/build-wpa_supplicant-internal.config index 574fb4b182..fb6a7b9dc3 100644 --- a/tests/build/build-wpa_supplicant-internal.config +++ b/tests/build/build-wpa_supplicant-internal.config @@ -117,7 +117,7 @@ CONFIG_SUITEB=y CONFIG_MBO=y #CONFIG_CODE_COVERAGE=y -CFLAGS += -O0 -Wsign-compare +CFLAGS += -O0 -Wsign-compare -U_FORTIFY_SOURCE #CONFIG_FILS=y #CONFIG_FILS_SK_PFS=y CONFIG_PMKSA_CACHE_EXTERNAL=y diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile index 46e20f44a6..9b0c3c7c8c 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -188,7 +188,7 @@ CFLAGS += -Werror -DEAPOL_TEST endif ifdef CONFIG_CODE_COVERAGE -CFLAGS += -O0 -fprofile-arcs -ftest-coverage +CFLAGS += -O0 -fprofile-arcs -ftest-coverage -U_FORTIFY_SOURCE LIBS += -lgcov LIBS_c += -lgcov LIBS_p += -lgcov From patchwork Mon Dec 25 10:21:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1879982 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=lIiUHXG4; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=BDf/8YcS; 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 4SymbD6y4mz23dK for ; Mon, 25 Dec 2023 03:24:56 +1100 (AEDT) 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=k13v8qjuD5zpMJgPNLVIRhkjGzvSRdxT7NwvBPj5qwc=; b=lIiUHXG4ub4Fyu uLMAC8RR3aIt3jVkN140VlH+uTt23slbu8pMAew7lzH/zSZOIKFibfsRsSQh+OjBn/XwIS9FMKfjp FqjwEGb+5mXSp+1NuQh/7q4ZjSPH6vvdVNklEJRLi9Ul3gLIBfvTlN4InYfcO1pqCuAuOxK+evQ8Q RroGH0P6xaxBEzcpLwRXORdoWq4ucqJPXjFGw5xQZAGutRDHW9z5lXArYHwgVT0h00d2vzRppGv0z 4hlFceiFsMMKLSgO0awbYJ/EliOk8IDh0C7cB2kDegQM13YIInzaI3PITE85F4OgdEO6l/zgGQTeh KAepz/i9/58GX/hWA6aw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rHRH4-009c8q-17; Sun, 24 Dec 2023 16:24:22 +0000 Received: from mgamail.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rHRH1-009c18-24 for hostap@lists.infradead.org; Sun, 24 Dec 2023 16:24:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703435059; x=1734971059; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MDkiZE5AbxvEqo7aYOzZ42K25zQNDmwjAEWtzKacGbk=; b=BDf/8YcSfvT/X6xSYjEPfnK8dlD6flw/wH3t2geK1z0Nx+RbVImQZVTC fDD2Oqd/9PrFiOIODZDVLxi/FHOhxBDnwSV/PNUgCUQfGqJPtD2J5S9pO +MkxI9OsbS8rpibbfxFimZPRGEYfwrcytSKtIxCTO5JxDuuTTS36jBLFs TZPoyGaqiU0Q1faaQMZoYKEWL2z93rZVjQv5cBq/cm4A7hnNVq+UVp4Ib xkAkwY+kwqe5ADyiSQ+eVG393KdS3CzmLH2Fssr+AixTUbFz8Zm8CMrWc lY+n0aTLeayzGpF7Ac19I7GskdpM66cnie4zMzyZIUaEeuS+V2pXPVXW1 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="482421000" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="482421000" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="777554328" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="777554328" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:18 -0800 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Benjamin Berg Subject: [PATCH 08/12] build: Properly grab the libpcsclite cflags Date: Mon, 25 Dec 2023 12:21:05 +0200 Message-ID: <20231225102109.2853783-9-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> References: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231224_082419_691218_C6AC0786 X-CRM114-Status: GOOD ( 12.97 ) 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 We should be grabbing the include directory using pkg-config and not just the libs. Without this, the header file might not be found on all systems because it may not be in /usr/include but elsewhere [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.43 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 2.5 DATE_IN_FUTURE_12_24 Date: is 12 to 24 hours after Received: date -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 -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender 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 We should be grabbing the include directory using pkg-config and not just the libs. Without this, the header file might not be found on all systems because it may not be in /usr/include but elsewhere in the system. Signed-off-by: Benjamin Berg --- wpa_supplicant/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile index 9b0c3c7c8c..eccfd68c54 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -1090,17 +1090,20 @@ endif ifdef CONFIG_PCSC # PC/SC interface for smartcards (USIM, GSM SIM) -CFLAGS += -DPCSC_FUNCS -I/usr/include/PCSC +CFLAGS += -DPCSC_FUNCS OBJS += ../src/utils/pcsc_funcs.o ifdef CONFIG_NATIVE_WINDOWS #Once MinGW gets support for WinScard, -lwinscard could be used instead of the #dynamic symbol loading that is now used in pcsc_funcs.c #LIBS += -lwinscard +CFLAGS += -I/usr/include/PCSC else ifdef CONFIG_OSX LIBS += -framework PCSC +CFLAGS += -I/usr/include/PCSC else LIBS += $(shell $(PKG_CONFIG) --libs libpcsclite) +CFLAGS += $(shell $(PKG_CONFIG) --cflags libpcsclite) endif endif endif From patchwork Mon Dec 25 10:21:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1879983 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=3AeSImQY; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=B7j9Dmv+; 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 4SymbJ3flkz23dL for ; Mon, 25 Dec 2023 03:25:00 +1100 (AEDT) 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=4U9Wd8OaAbSIxl46YAiXnFs2DqAZmt1lnlcr+wq89Ss=; b=3AeSImQYaB0ZTl lZp9hxwDR/XSb4QTB2lXa0bBwit/xICOo4nbwLaBzugck/uHcQpdruGpRSiuShKy4KQ5phGntnyNn LPY8wWjmzd8IJ3O683LIErSNNlhlf02O+f8NfBQ8rbHVygmWqpIkbYsTLdosNM9RQ1EUmzim360IK e4ZVOWltBfyga3SNk6zGVdljyMn+e/RwUFBxE7cxiF/uP863HChhqLbCH7d9fryyl63fFW0e/I0K9 vsnRXr1csZ4VDcZhNCAMShhBgwtlCddV62oysjiMr6dx9C+15fdlieEpwIHMutsTdxDtOlhzWF6z1 XZwuJf1WJCEbpVIGq/8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rHRH6-009c9s-0d; Sun, 24 Dec 2023 16:24:24 +0000 Received: from mgamail.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rHRH3-009c18-2a for hostap@lists.infradead.org; Sun, 24 Dec 2023 16:24:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703435061; x=1734971061; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2CE96+4EhHTugKWpvt4Oof7aGgzsKWEyTQbrFznF54U=; b=B7j9Dmv+b2oe6kbbB3VxNwG5j0tIaR5uLC6Lo1bgYpNFIl/ejQeo0iY1 wfXI3qJH25JAcL3OWHFjyHXopW9UmYUmVS4dE31yhZv2BvBNKeo5DOsgr urO2lQc+OGJCvALjdYMIbadfNhL/H6QHfnwly9nTvCATo23ymp8j8P3Ln l7tQ7/RWpptrIuqhEHxpulFrxstu89NB43dt9uJWkmqYuf0uf1NND9rfO VfUC1ujDSrlD7aWXRKWsrRKwOzjeekLEhyGCL14qONNYwtnrel0YSQ+UB 9UXeBwZkHHTDmaY0tMlOcn/LIs9TIuKyuDqhYQl6aFmdcTK7KnK+gyJe7 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="482421001" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="482421001" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="777554334" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="777554334" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:20 -0800 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Benjamin Berg Subject: [PATCH 09/12] tests: Optimize process memory reading using join Date: Mon, 25 Dec 2023 12:21:06 +0200 Message-ID: <20231225102109.2853783-10-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> References: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231224_082421_853523_502D7E66 X-CRM114-Status: GOOD ( 10.49 ) 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 Appending to a bytes() object is rather inefficient. As such, avoid doing so by first creating a list and then join'ing all buffers together at the end only. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.43 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 2.5 DATE_IN_FUTURE_12_24 Date: is 12 to 24 hours after Received: date -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 -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender 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 Appending to a bytes() object is rather inefficient. As such, avoid doing so by first creating a list and then join'ing all buffers together at the end only. Signed-off-by: Benjamin Berg --- tests/hwsim/test_ap_psk.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/hwsim/test_ap_psk.py b/tests/hwsim/test_ap_psk.py index ab76372578..d175259b53 100644 --- a/tests/hwsim/test_ap_psk.py +++ b/tests/hwsim/test_ap_psk.py @@ -2625,7 +2625,7 @@ def find_wpas_process(dev): raise Exception("Could not find wpa_supplicant process") def read_process_memory(pid, key=None): - buf = bytes() + buf = [] logger.info("Reading process memory (pid=%d)" % pid) with open('/proc/%d/maps' % pid, 'r') as maps, \ open('/proc/%d/mem' % pid, 'rb') as mem: @@ -2651,11 +2651,11 @@ def read_process_memory(pid, key=None): except OSError as e: logger.info("Could not read mem: start=%d end=%d: %s" % (start, end, str(e))) continue - buf += data + buf.append(data) if key and key in data: logger.info("Key found in " + l) logger.info("Total process memory read: %d bytes" % len(buf)) - return buf + return b''.join(buf) def verify_not_present(buf, key, fname, keyname): pos = buf.find(key) From patchwork Mon Dec 25 10:21:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1879984 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=sqL0DJbn; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=SNkjM4mU; 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 4SymbK2rt9z20Qr for ; Mon, 25 Dec 2023 03:25:01 +1100 (AEDT) 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=CPTnP5JHj27lY4I9isV7UhNRRjyCoYXDgLAGSgXXLKY=; b=sqL0DJbnHdoOSX Kyl0M9TAmuDwuRsJZW/ne6613MDx/mLsDYw750I3fIOuJtKP09aubvgocdidUYJIYx4aBufBSAhtw UjYc/xBHL9H+1OM+U4T9AAIL/1LKljGJrgD+9GPUKQ3EPQYHaG0G5Wyev29K5+QWPQ9RumsAMUuwp XwkDw8p+MvcUPsR95/rEPd2RZ6Bv/A7Y5bkbZT5jZXCJ6/uXImzdT8gem7mTAusjdyczeugU7WeIb CpFWuVUlmtmbU9MZOUtKbV0wwKh5OaIOwvaMTI98izxb8h3FDb1iCVdur2qoTCFCZk59HZ7nQHnhj +jzY54+EKex5CqSvIMkQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rHRH9-009cCG-1Q; Sun, 24 Dec 2023 16:24:27 +0000 Received: from mgamail.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rHRH6-009c18-1O for hostap@lists.infradead.org; Sun, 24 Dec 2023 16:24:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703435064; x=1734971064; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=w7ynCH0YDFIxP0aSvtxXfIo1KbUU7cmt+uGz7qDRXeY=; b=SNkjM4mU1tKxGfPiSh6By2yEew/WCnkcFcTp98k9nJ1Kd1/olOuERaWF mWmyRGobutBc2TOmf4hsQ4qwmpWQDSjvI45qNADvg9Zxt1yrJxwKlUSeg l0RZr65GorYKyBwn5vLQNKyF3MPaEAEOT5q3d3BZmXpopUTvJHh28leIS BmdtNbyw9jeDj1U3/n2DmiZ0LWgAKMZmUIkkVdJ1ceWhzzOGDhSR2/o8e 4Sw1y+zIQKFfDW+artewX+3ATKrFnbnFVUP3Q8K7yp5JZDLsAjaaDEp24 mXNPA450CeOg6MBbLoZv7LrQBjcAMdwhfL1ttaxhAYf2GjvdMy0fi3gYo w==; X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="482421004" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="482421004" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="777554339" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="777554339" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:22 -0800 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Johannes Berg Subject: [PATCH 10/12] tests: ap_vht_40: wait a bit before connectivity check Date: Mon, 25 Dec 2023 12:21:07 +0200 Message-ID: <20231225102109.2853783-11-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> References: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231224_082424_499524_1DC7755D X-CRM114-Status: UNSURE ( 9.61 ) 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 We need the station to be fully set up on the AP before running the connectivity check, not just the station to be set up itself. Just waiting for the events seems to still be racy so just sleep a lit [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.43 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 2.5 DATE_IN_FUTURE_12_24 Date: is 12 to 24 hours after Received: date -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 -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender 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 We need the station to be fully set up on the AP before running the connectivity check, not just the station to be set up itself. Just waiting for the events seems to still be racy so just sleep a little bit. Signed-off-by: Johannes Berg --- tests/hwsim/test_ap_vht.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/hwsim/test_ap_vht.py b/tests/hwsim/test_ap_vht.py index 2a7da8f68c..5f0efecb4c 100644 --- a/tests/hwsim/test_ap_vht.py +++ b/tests/hwsim/test_ap_vht.py @@ -347,6 +347,7 @@ def test_ap_vht_40(devs, apdevs): "vht_oper_centr_freq_seg0_idx": "0"} hapd = hostapd.add_ap(ap, params) dev.connect("test-vht40", scan_freq="5180", key_mgmt="NONE") + time.sleep(0.1) hwsim_utils.test_connectivity(dev, hapd) sta = hapd.get_sta(dev.own_addr()) From patchwork Mon Dec 25 10:21:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1879986 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=VmAA5nN+; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=I76U9MNw; 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 4SymbL3HL4z20Rm for ; Mon, 25 Dec 2023 03:25:02 +1100 (AEDT) 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=CQOfBEQUCHVxt4KN2z8iuYSbAkgIUNCCdseR+8ABYJU=; b=VmAA5nN+Xl3eYT uv8puijW5eCh8iXnrVE7egZhjTZzwDpCALu2aNhrNRJ+36RXoCD4Qr/xk0/X4l+e3L0bg5uKGE5Ra xeVxa5qej3ZFf67jWsl2yzd2J5rCdMfd8UFYfeXcz8EemnIvz/3obisagtmHyGSmxZv0JhtU2kGB/ 8E/V5y8jjL5tYURQrj6pqNC2Lf2C07tH+Qa7kHPs3YAdIbLXdQEsq8glkEvhZ8vdalkQFWgPB1/Hn hgLeYIgXnyk826q5OpHVUTffhhzzlgkLT22kRMwDBMFbW2zK55Sg9megg6TO2gsoT89R/CGM3lFak WUporu/UlSAo8qj+18SA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rHRHA-009cCz-2F; Sun, 24 Dec 2023 16:24:28 +0000 Received: from mgamail.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rHRH8-009c18-31 for hostap@lists.infradead.org; Sun, 24 Dec 2023 16:24:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703435066; x=1734971066; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yTl8GngAH9z/bT3ReR+jdvYV9GPwkQGPwbuVJ4yk/CE=; b=I76U9MNwKCe1zia8j/P8xPonFkGBtNXjRNTJqndzPBVNn+SvXa6mxXua hSyAiGUR7hvCkA4mcWzFzQT6pHhja1KbWNypLpLIF29/0PnX10mLh74nL JgaiXb6B0iQ+ghXcyqywpy7Gj3j4jkGi2DwFKfr2l081abN7szqaVk1YD AG6uawTaYqS7at7/EVwd1ubuOklAg68pTOsp95xCmIaOwuP98o2fJDuba iqHMw7Qx4uJH9SHqE90SKGokL79Iy8k5Zc+SBg43ybiF9PCmLn9pP+uxX uiDIivzvNPZL2xifeW4cPzWQjnI/PJXmttS28Abacqv23sV7n9vRmD61r A==; X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="482421006" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="482421006" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="777554346" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="777554346" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:25 -0800 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Johannes Berg Subject: [PATCH 11/12] tests: P2P: also wait in go_neg_pbc() Date: Mon, 25 Dec 2023 12:21:08 +0200 Message-ID: <20231225102109.2853783-12-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> References: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231224_082426_985565_4D1E0459 X-CRM114-Status: UNSURE ( 7.44 ) 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 Similar to other changes like this, wait a bit before connectivity checks in go_neg_pbc(). Signed-off-by: Johannes Berg --- tests/hwsim/p2p_utils.py | 1 + 1 file changed, 1 insertion(+) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.43 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 2.5 DATE_IN_FUTURE_12_24 Date: is 12 to 24 hours after Received: date -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 -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender 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 Similar to other changes like this, wait a bit before connectivity checks in go_neg_pbc(). Signed-off-by: Johannes Berg --- tests/hwsim/p2p_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/hwsim/p2p_utils.py b/tests/hwsim/p2p_utils.py index 31d0f74a41..fe115e0ab8 100644 --- a/tests/hwsim/p2p_utils.py +++ b/tests/hwsim/p2p_utils.py @@ -374,6 +374,7 @@ def go_neg_pbc(i_dev, r_dev, i_intent=None, r_intent=None, i_freq=None, raise Exception("go_neg_init_pbc thread failed") logger.debug("i_res: " + str(i_res)) logger.info("Group formed") + time.sleep(0.1) hwsim_utils.test_connectivity_p2p(r_dev, i_dev) i_dev.dump_monitor() return [i_res, r_res] From patchwork Mon Dec 25 10:21:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1879987 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=J7/jh7Bp; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=kSIFjpjr; 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 4SymbT2lPRz23dP for ; Mon, 25 Dec 2023 03:25:09 +1100 (AEDT) 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=HyFDriS70YBvNWZInq+StPfBKncoxBkL1BWPAQPxxVo=; b=J7/jh7BpKsvxvH xh2lA3Wuo+1gsXGvLPpe8NuFDO0Kdrqv5/TiTTAb5U1kO02yxTqbT/cIRRMIZNga/VVVFXkde+7Cv CZW8nN5ruKI6O7KNzpWtgl5tFLvIzaS3kPpn6x4pml77z6QoR8YV1dfjG3lf2gh229JP9y8rMQXbj K6UOVRAALy/naQn/2FQZZfnWmJ3+WlXFtG9RbXPWFXEIzobmZVE15+8KEY9D5p7gcQ1lMBWA3FTqT u4S+K2H8n1cFsD0nOWuNDBd33guLMaCGUmfqAEifRvZy4I/2/LRxSJXoxuuXcKyRO5pNiINPeXZEx NHeSLA4/Vpcx7oaOAypw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rHRHF-009cG7-0F; Sun, 24 Dec 2023 16:24:33 +0000 Received: from mgamail.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rHRHC-009c18-1a for hostap@lists.infradead.org; Sun, 24 Dec 2023 16:24:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703435070; x=1734971070; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LneZXoS+/E/6ctRM1ISWahVOODJJlr5iYfas5v94fl4=; b=kSIFjpjrmsNo76M/3ERoAW9/jyNVt43Bm6k9wuG6FbKFfRW3LFOtypzh rGJ2eE1YWOmYmbm3jcd59b5YcSZkh7WfuSJ+ZUy0NJog0/4O/FnU9a+kX clEdoFJUCyS26ZQVm+bC9uERj743aSupYgn1Q6nZXGU8ZgxGjGaSoymNa kowZV2ZK7JU3mB7V2Hkn+bqzXu6mErOWS9u/7p8/PmpMPHwKEWkE3JNXw AFI/sGIdde3wafwsT3SyHbbCxs8mzW1fgS4TdfuTCoYMhV4iRh839KKmd 6T3x5t0IbLazHRDHN5nTxPKGxCEgiaJEaBeKu9ybmPI1MvvHWjYkk+mt/ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="482421009" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="482421009" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="777554349" X-IronPort-AV: E=Sophos;i="6.04,301,1695711600"; d="scan'208";a="777554349" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 08:24:28 -0800 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Benjamin Berg Subject: [PATCH 12/12] tests: run kmemleak between tests if available Date: Mon, 25 Dec 2023 12:21:09 +0200 Message-ID: <20231225102109.2853783-13-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> References: <20231225102109.2853783-1-andrei.otcheretianski@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231224_082430_555326_734A1ABE X-CRM114-Status: GOOD ( 12.53 ) 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 triggers a kmemleak scan between tests. This allows finding memory leaks and doing this should attribute the leak to the correct test in most cases. Note that it does add a sleep after each test, [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.43 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 2.5 DATE_IN_FUTURE_12_24 Date: is 12 to 24 hours after Received: date -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 -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender 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 triggers a kmemleak scan between tests. This allows finding memory leaks and doing this should attribute the leak to the correct test in most cases. Note that it does add a sleep after each test, as such it is most sensible when combined with UML time-travel. Signed-off-by: Benjamin Berg --- tests/hwsim/run-tests.py | 54 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/run-tests.py b/tests/hwsim/run-tests.py index 30368a97ab..1a23e0addf 100755 --- a/tests/hwsim/run-tests.py +++ b/tests/hwsim/run-tests.py @@ -123,11 +123,12 @@ def report(conn, prefill, build, commit, run, test, result, duration, logdir, logdir + "/" + test + "." + log) class DataCollector(object): - def __init__(self, logdir, testname, args): + def __init__(self, logdir, testname, kmemleak, args): self._logdir = logdir self._testname = testname self._tracing = args.tracing self._dmesg = args.dmesg + self._kmemleak = kmemleak self._dbus = args.dbus def __enter__(self): if self._tracing: @@ -159,6 +160,36 @@ class DataCollector(object): self._trace_cmd.stdin.write(b'DONE\n') self._trace_cmd.stdin.flush() self._trace_cmd.wait() + + if self._kmemleak: + output = os.path.join(self._logdir, '%s.kmemleak' % (self._testname, )) + num = 0 + while os.path.exists(output): + output = os.path.join(self._logdir, '%s.kmemleak-%d' % (self._testname, num)) + num += 1 + + # Trigger kmemleak + with open('/sys/kernel/debug/kmemleak', 'w+') as kmemleak: + kmemleak.write('scan') + kmemleak.seek(0) + + # Minimum reporting age + time.sleep(5) + + kmemleak.write('scan') + kmemleak.seek(0) + + leaks = [] + while l := kmemleak.read(): + leaks.append(l) + leaks = ''.join(leaks) + if leaks: + with open(output, 'w') as out: + out.write(leaks) + + kmemleak.seek(0) + kmemleak.write('clear') + if self._dmesg: output = os.path.join(self._logdir, '%s.dmesg' % (self._testname, )) num = 0 @@ -395,6 +426,19 @@ def main(): if args.dmesg: subprocess.call(['dmesg', '-c'], stdout=open('/dev/null', 'w')) + try: + # try to clear out any leaks that happened earlier + with open('/sys/kernel/debug/kmemleak', 'w') as kmemleak: + kmemleak.write('scan') + kmemleak.seek(0) + time.sleep(5) + kmemleak.write('scan') + kmemleak.seek(0) + kmemleak.write('clear') + have_kmemleak = True + except OSError: + have_kmemleak = False + if conn and args.prefill: for t in tests_to_run: name = t.__name__.replace('test_', '', 1) @@ -494,7 +538,7 @@ def main(): pass reset_ok = True - with DataCollector(args.logdir, name, args): + with DataCollector(args.logdir, name, have_kmemleak, args): count = count + 1 msg = "START {} {}/{}".format(name, count, num_tests) logger.info(msg) @@ -651,6 +695,12 @@ def main(): logger.info("Kernel issue found in dmesg - mark test failed") result = 'FAIL' + if result == 'PASS' and have_kmemleak: + # The file is only created if a leak was found + if os.path.exists(os.path.join(args.logdir, name + '.kmemleak')): + logger.info("Kernel memory leak found - mark test failed") + result = 'FAIL' + if result == 'PASS': passed.append(name) elif result == 'SKIP':