From patchwork Thu Jun 23 17:16:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Afek X-Patchwork-Id: 639780 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rb7SM74tdz9sdm for ; Fri, 24 Jun 2016 03:17:23 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wizery-com.20150623.gappssmtp.com header.i=@wizery-com.20150623.gappssmtp.com header.b=XD05Z7hw; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bG8Fa-0004JL-2Z; Thu, 23 Jun 2016 17:17:10 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bG8FW-0004Fi-Mg for hostap@lists.infradead.org; Thu, 23 Jun 2016 17:17:07 +0000 Received: by mail-pf0-x244.google.com with SMTP id i123so7182143pfg.3 for ; Thu, 23 Jun 2016 10:16:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wizery-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=RdURy6aG7AUGY2ZfaHwN8W5M7PgWAz0KmEa1RGGY4Gg=; b=XD05Z7hwcCcfrS8i78epFoTLIvxb5ukkNViCruiuEvyFVJFA/VRuQSJSHIZoa2+0V/ 3H/+Ph1ieq8oeuE05ado+v5fzgBBVPutFPg181D+XQ+70kq8pS+/azWIKBHZknBfjJyM fjBj1oBQ5rkyTJhQizhfe+jlqasFTKyNgsCKZn1j4er0Vj5XVashxG6iW/Ws8tqBS1Vg CLIXVwufmG4VpYJemKMzTzmus+/mzG6MGKQVpxRZhwNI0eBEvhx5zjB67J6zm0u720oV mofur/5A5dCpqdyAtfg1rqPt/6tANOItegRNGTSya2toeUF6ZNURS5gsLcjkZ51LUDbV MaWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=RdURy6aG7AUGY2ZfaHwN8W5M7PgWAz0KmEa1RGGY4Gg=; b=g8b2dtGlotgcUO25jiqHW2rzkvI/eVAYRHribMrzseBBdz6TRMr18GGI0wWNr3L1S7 VMhg8PgXgWsurTUoEu/wSb0mnHCWFAfFhaZ5l9mfdkM2tXCyLLe+nvIw+oFlsEfLEmAE agpwg/Alg4hYQSyUGuUbJ6orzVGboEZ49klGJc9b0avXQMUwAbcCyVS3LU0M0o9hQfls MCcJxbk1L1r7RQmsO76ShMnA3xMXlowsd5MHTwGAtNL7xqNfvMLUZCoBOu1muSWIbC6A zLx69k4RlEi/6lTbD95E02Z1PKBmX6VnWbsKnlaKzp7z/BSfoQlWhi+4A3njif4ezolq DPhw== X-Gm-Message-State: ALyK8tJfqkSPRC4ocDAKrj4kIhqV/WJurQ2fX+g3K5JIgk+CIinKOtRdCGV9C7oooouZ1A== X-Received: by 10.98.201.210 with SMTP id l79mr17200834pfk.87.1466702207463; Thu, 23 Jun 2016 10:16:47 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.41]) by smtp.gmail.com with ESMTPSA id n124sm1450391pfn.44.2016.06.23.10.16.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Jun 2016 10:16:46 -0700 (PDT) From: Jonathan Afek To: hostap@lists.infradead.org Subject: [PATCH 4/8] tests: Initialize hapd var for some tdls tests Date: Thu, 23 Jun 2016 20:16:32 +0300 Message-Id: <1466702196-26828-4-git-send-email-jonathan@wizery.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1466702196-26828-1-git-send-email-jonathan@wizery.com> References: <1466702196-26828-1-git-send-email-jonathan@wizery.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160623_101706_871383_93711391 X-CRM114-Status: UNSURE ( 9.17 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:400e:c00:0:0:0:244 listed in] [list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -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 X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Some tdls tests reference a hapd var in the finally block even if the test failed before assigning the value to this var. This makes the code in the fainally block to fail on referencing this var. This patch assigns None to the hapd var before starting the tests. Signed-off-by: Jonathan Afek --- tests/hwsim/test_ap_tdls.py | 1 + tests/hwsim/test_nfc_wps.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/tests/hwsim/test_ap_tdls.py b/tests/hwsim/test_ap_tdls.py index 138f21c..44c7b48 100644 --- a/tests/hwsim/test_ap_tdls.py +++ b/tests/hwsim/test_ap_tdls.py @@ -361,6 +361,7 @@ def test_ap_open_tdls_vht(dev, apdev): "vht_capab": "", "vht_oper_chwidth": "0", "vht_oper_centr_freq_seg0_idx": "0" } + hapd = None try: hapd = hostapd.add_ap(apdev[0], params) wlantest_setup(hapd) diff --git a/tests/hwsim/test_nfc_wps.py b/tests/hwsim/test_nfc_wps.py index 6cb3ecb..b65c787 100644 --- a/tests/hwsim/test_nfc_wps.py +++ b/tests/hwsim/test_nfc_wps.py @@ -233,6 +233,7 @@ def test_nfc_wps_handover(dev, apdev): def test_nfc_wps_handover_5ghz(dev, apdev): """Connect to WPS AP with NFC connection handover on 5 GHz band""" + hapd = None try: ssid = "test-wps-nfc-handover" params = ap_wps_params(ssid) @@ -265,6 +266,7 @@ def test_nfc_wps_handover_5ghz(dev, apdev): def test_nfc_wps_handover_chan14(dev, apdev): """Connect to WPS AP with NFC connection handover on channel 14""" + hapd = None try: ssid = "test-wps-nfc-handover" params = ap_wps_params(ssid)