From patchwork Wed Aug 22 16:49:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 960948 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KqJfrdf7"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41wSDK42Xxz9s47 for ; Wed, 22 Aug 2018 22:54:25 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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:In-Reply-To: References:List-Owner; bh=RQwIiQ/W1Eg1ZzmQz6dBHwbkxs3kszkrVBpvCV7jovI=; b=KqJ frdf7lSPDVnB2LKA9LTMREbxW88sSEGud4yvIRJbnJFDwOvucLGWt1oESlWa8NyRn2R0kGsv4/nfp Q4lKbY07a2a+/fmn4+OKatFmoQGpRwKsJlWuqeTruFNXu0B8Q3gcfEf/X/mkUbdsV6CH6W3/E/uZd 0Vr9FjitJ0gdfx0xfwLc64ucBs/Ggkdjp03/rUrj/CQMM/ALJPfYV9dTgljS38Uwct591SIoKW2Dq VqeC7Oi6G5cK8CCHV2FpxY5YOs3GPGgo3caMDiSkDgjNKEX6KHTgUxr5+E331StrtunpaqX0Fagqo idHnbaDV3ZXG4Ky+ApjdvSVwNYTwlKg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsSeF-0005wj-VJ; Wed, 22 Aug 2018 12:54:07 +0000 Received: from mga17.intel.com ([192.55.52.151]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsSe8-0005dH-5K for hostap@lists.infradead.org; Wed, 22 Aug 2018 12:54:01 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Aug 2018 05:53:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,274,1531810800"; d="scan'208";a="226746736" Received: from unknown (HELO andrei-XPS-12-9Q33.ger.corp.intel.com) ([10.12.217.183]) by orsmga004.jf.intel.com with ESMTP; 22 Aug 2018 05:53:41 -0700 From: Andrei Otcheretianski To: hostap@lists.infradead.org Subject: [PATCH] tests: Extend the timeout for some SAE error case tests Date: Wed, 22 Aug 2018 19:49:05 +0300 Message-Id: <1534956548-8088-4-git-send-email-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180822_055400_278026_05B6340C X-CRM114-Status: GOOD ( 10.00 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [192.55.52.151 listed in list.dnswl.org] 2.4 DATE_IN_FUTURE_03_06 Date: is 3 to 6 hours after Received: date -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ilan Peer MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Ilan Peer Commit 3bef4e4cbbfd ("mac80211: Adjust SAE authentication timeout") in the kernel tree increased the SAE authentication timeout. This caused some error case tests to fail. To fix this, extend the timeout for some error case tests. Signed-off-by: Ilan Peer --- tests/hwsim/test_sae.py | 4 ++-- tests/hwsim/utils.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/hwsim/test_sae.py b/tests/hwsim/test_sae.py index e0bc339..ba6a200 100644 --- a/tests/hwsim/test_sae.py +++ b/tests/hwsim/test_sae.py @@ -1059,7 +1059,7 @@ def test_sae_bignum_failure(dev, apdev): hapd.request("NOTE STA failure testing %d:%s" % (count, func)) dev[0].connect("test-sae", psk="12345678", key_mgmt="SAE", scan_freq="2412", wait_connect=False) - wait_fail_trigger(dev[0], "GET_FAIL") + wait_fail_trigger(dev[0], "GET_FAIL", timeout=0.1) dev[0].request("REMOVE_NETWORK all") dev[0].dump_monitor() hapd.dump_monitor() @@ -1088,7 +1088,7 @@ def test_sae_bignum_failure(dev, apdev): hapd.request("NOTE STA failure testing %d:%s" % (count, func)) dev[0].connect("test-sae", psk="12345678", key_mgmt="SAE", scan_freq="2412", wait_connect=False) - wait_fail_trigger(dev[0], "GET_FAIL") + wait_fail_trigger(dev[0], "GET_FAIL", timeout=0.1) dev[0].request("REMOVE_NETWORK all") dev[0].dump_monitor() hapd.dump_monitor() diff --git a/tests/hwsim/utils.py b/tests/hwsim/utils.py index f19b413..c3edf8e 100644 --- a/tests/hwsim/utils.py +++ b/tests/hwsim/utils.py @@ -54,13 +54,14 @@ class fail_test(object): if self._dev.request("GET_FAIL") != "0:%s" % self._funcs: raise Exception("Test failure did not trigger") -def wait_fail_trigger(dev, cmd, note="Failure not triggered", max_iter=40): +def wait_fail_trigger(dev, cmd, note="Failure not triggered", max_iter=40, + timeout=0.05): for i in range(0, max_iter): if dev.request(cmd).startswith("0:"): break if i == max_iter - 1: raise Exception(note) - time.sleep(0.05) + time.sleep(timeout) def require_under_vm(): with open('/proc/1/cmdline', 'r') as f: