From patchwork Thu Jan 21 15:40:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1429924 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=VVpOVvqK; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DM68d42Qnz9sW4 for ; Fri, 22 Jan 2021 02:42:25 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wCCNMxRa/DiMhh8gAPrCbjbSF56HIoUcbDjQsvoJtCs=; b=VVpOVvqKEzMa06jw8gvULOtmt vwA/gYiO+u6FddX4rPYG/TSYlvWOYe85rBJa5nrLW08J3meOTrJd3/TycWEMgk+TyZgA/qMogpk8R WKxLnrwbi4aEV9Ja3wClLduZ3lVFYIoEUaE5svv04m5gIVkKDd7t906VJ0qdBhSiw8RNSAqUPAWfH V+9iVgQhEtP2NC1Co+V5PI5Tn8uQaT0BjsHFOlf/ZwrSeyPllqCHHFJ3qhv7x9Pr1MRJMPYw68JAI RBZwWkrZSMEi1JXoQH/JtUWCJVnnz/AIpRi3RJeCrbGH7E4/IiofcAkU6An1DatyU/g6N4m40AI68 88TzGlLLA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2c5Q-0000LN-Vn; Thu, 21 Jan 2021 15:41:29 +0000 Received: from mga05.intel.com ([192.55.52.43]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2c5P-0000FU-B7 for hostap@lists.infradead.org; Thu, 21 Jan 2021 15:41:28 +0000 IronPort-SDR: wgZmAs7NEWKprcraEzsDyBc5axw6oQAvKKB1AnEqX4jvXBm/yuOX88Wc1n6ik3AVB1EQGugXin HXQiXOJCCGgA== X-IronPort-AV: E=McAfee;i="6000,8403,9870"; a="264104160" X-IronPort-AV: E=Sophos;i="5.79,364,1602572400"; d="scan'208";a="264104160" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jan 2021 07:41:24 -0800 IronPort-SDR: C8YzXGQIN3BWmFV+NAa1UxxmyOdm1H0FzytTSGbSmRIG4tZ3VA99TIfRD+aUkXf3XPS2LJUnNU OBZsQxbZ1mWg== X-IronPort-AV: E=Sophos;i="5.79,364,1602572400"; d="scan'208";a="385350160" Received: from ramilaux-mobl2.ger.corp.intel.com (HELO aotchere-desk.ger.corp.intel.com) ([10.214.246.158]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jan 2021 07:41:23 -0800 From: Andrei Otcheretianski To: hostap@lists.infradead.org Subject: [PATCH] tests: Fix ap_ft_r0_key_expiration test Date: Thu, 21 Jan 2021 17:40:35 +0200 Message-Id: <20210121154037.32654-4-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210121154037.32654-1-andrei.otcheretianski@intel.com> References: <20210121154037.32654-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-20210121_104127_532422_AB59F572 X-CRM114-Status: UNSURE ( 8.48 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) 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_PASS SPF: sender matches SPF record X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrei Otcheretianski Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The test configures ft_r0_key_lifetime parameter, however ft_params already contain the r0_key_lifetime. Since both options are accepted by hostapd and set the same field, one of them gets overwritten. As the dictionary enumeration order is not guaranteed in python, the test may sporadically fail. Fix that by explicitely removing the unneeded parameter. Signed-off-by: Andrei Otcheretianski --- tests/hwsim/test_ap_ft.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/hwsim/test_ap_ft.py b/tests/hwsim/test_ap_ft.py index 12d4c1395e..1598c89a67 100644 --- a/tests/hwsim/test_ap_ft.py +++ b/tests/hwsim/test_ap_ft.py @@ -3352,9 +3352,11 @@ def test_ap_ft_r0_key_expiration(dev, apdev): passphrase = "12345678" params = ft_params1(ssid=ssid, passphrase=passphrase) + params.pop('r0_key_lifetime', None) params['ft_r0_key_lifetime'] = "2" hapd0 = hostapd.add_ap(apdev[0], params) params = ft_params2(ssid=ssid, passphrase=passphrase) + params.pop('r0_key_lifetime', None) params['ft_r0_key_lifetime'] = "2" hapd1 = hostapd.add_ap(apdev[1], params)