From patchwork Thu Apr 7 05:38:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz.Dziedzic@tieto.com X-Patchwork-Id: 607249 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 3qgWcT6fdgz9t4T for ; Thu, 7 Apr 2016 15:39:21 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=tieto.com header.i=@tieto.com header.b=CXu+3aQN; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ao2ew-00058R-OM; Thu, 07 Apr 2016 05:39:14 +0000 Received: from mail-lf0-x22d.google.com ([2a00:1450:4010:c07::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ao2eh-0004x7-J9 for hostap@lists.infradead.org; Thu, 07 Apr 2016 05:39:05 +0000 Received: by mail-lf0-x22d.google.com with SMTP id j11so48842738lfb.1 for ; Wed, 06 Apr 2016 22:38:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wNso3UWIsFa7/LATgwwpxnFXO3p07GfLQhltyvrQ1Vk=; b=CXu+3aQN3y6iPHNN33yTyiId9gTg+N/puS2vflSPAdLqhu8BY8royYuHTBRM12Ll7r 9PWEimMX8JiR3T0t9/OJb8hJ+D/U86+IKsm91mRqMaTpnv/vkxd6uNcqBwPA/Wpfrc1B wcapLks0jO9ZKOClJ+P4IVM8ibTPq8VYjRcb0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wNso3UWIsFa7/LATgwwpxnFXO3p07GfLQhltyvrQ1Vk=; b=PZz92ZsfeI0s5Nl1IYNXuEe0qWnoFp/qa/wkNO5+zkc/bBVLvZaJok7IL5eSBLNe0D fy/9t+nJrs/O2QMsTW79GeajC0jvVzvLvsWJpt7FPVSlLq2diSpiCib56ffIEtRzA6UJ lHlTgvH80RbpljI177CB9iIIrRdi9bakfeCtm2cXrHCFyLN8zpDViCSfFJxE7b6u81A3 1TCuFwkUA4jIvcI40VVNMkYZvmmvWLpS74forZZow0iXSr3ivZkhV8aFZi1EtF8yA7G/ 27Byoth7GIAvyh7MhyT0DKzTJ25GOj00U7cINVlfVxRZwp0TE37YOX6AmASDcjyG1q+0 2AGw== X-Gm-Message-State: AD7BkJJVTNMy3FKHFb87XEC4jgFmgh1wCNq2rgBhjEo0m8Kb9Ugok85QNJpcMeB3Lgv6gqikPx0oGKJwAqH35TuLvM6MrW3iebOjU9Yym9QTmWVzk06hFg8LKjJSIQJqjAAvJYNKKXonSTFCOUnKoFo+orRp/RJZSGaybaXU9LfXaJ82nYzLGuZZNsOW7ekA2HnQ X-Received: by 10.25.83.8 with SMTP id h8mr437181lfb.167.1460007517639; Wed, 06 Apr 2016 22:38:37 -0700 (PDT) Received: from localhost.localdomain ([213.192.73.50]) by smtp.gmail.com with ESMTPSA id f134sm938018lff.34.2016.04.06.22.38.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Apr 2016 22:38:37 -0700 (PDT) From: Janusz Dziedzic To: hostap@lists.infradead.org Subject: [PATCH v2 08/17] tests: use hapd from hostapd.add_iface() Date: Thu, 7 Apr 2016 07:38:06 +0200 Message-Id: <1460007495-17921-8-git-send-email-janusz.dziedzic@tieto.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460007495-17921-1-git-send-email-janusz.dziedzic@tieto.com> References: <1460007495-17921-1-git-send-email-janusz.dziedzic@tieto.com> X-DomainID: tieto.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160406_223900_053825_EFFC3535 X-CRM114-Status: UNSURE ( 9.83 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:4010:c07:0:0:0:22d listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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: , Cc: j@w1.fi, Janusz Dziedzic MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org While add_iface() return correct hapd, just use it. Signed-off-by: Janusz Dziedzic --- tests/hwsim/test_ap_acs.py | 4 +--- tests/hwsim/test_ap_dynamic.py | 6 ++---- tests/hwsim/test_ap_vlan.py | 3 +-- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/tests/hwsim/test_ap_acs.py b/tests/hwsim/test_ap_acs.py index 05e1ad1..89abb24 100644 --- a/tests/hwsim/test_ap_acs.py +++ b/tests/hwsim/test_ap_acs.py @@ -89,12 +89,10 @@ def test_ap_acs_chanlist(dev, apdev): def test_ap_multi_bss_acs(dev, apdev): """hostapd start with a multi-BSS configuration file using ACS""" skip_with_fips(dev[0]) - ifname = apdev[0]['ifname'] force_prev_ap_on_24g(apdev[0]) # start the actual test - hostapd.add_iface(apdev[0], 'multi-bss-acs.conf') - hapd = hostapd.Hostapd(ifname) + hapd = hostapd.add_iface(apdev[0], 'multi-bss-acs.conf') hapd.enable() wait_acs(hapd) diff --git a/tests/hwsim/test_ap_dynamic.py b/tests/hwsim/test_ap_dynamic.py index 091930d..381a323 100644 --- a/tests/hwsim/test_ap_dynamic.py +++ b/tests/hwsim/test_ap_dynamic.py @@ -182,8 +182,7 @@ def test_ap_multi_bss_config(dev, apdev): ifname2 = apdev[0]['ifname'] + '-2' ifname3 = apdev[0]['ifname'] + '-3' logger.info("Set up three BSSes with one configuration file") - hostapd.add_iface(apdev[0], 'multi-bss.conf', ifname1) - hapd = hostapd.Hostapd(ifname1) + hapd = hostapd.add_iface(apdev[0], 'multi-bss.conf', ifname1) hapd.enable() multi_check(dev, [ True, True, True ]) hostapd.remove_bss(apdev[0], ifname2) @@ -193,8 +192,7 @@ def test_ap_multi_bss_config(dev, apdev): hostapd.remove_bss(apdev[0], ifname1) multi_check(dev, [ False, False, False ]) - hostapd.add_iface(apdev[0], 'multi-bss.conf', ifname1) - hapd = hostapd.Hostapd(ifname1) + hapd = hostapd.add_iface(apdev[0], 'multi-bss.conf', ifname1) hapd.enable() hostapd.remove_bss(apdev[0], ifname1) multi_check(dev, [ False, False, False ]) diff --git a/tests/hwsim/test_ap_vlan.py b/tests/hwsim/test_ap_vlan.py index 79c4166..4caf804 100644 --- a/tests/hwsim/test_ap_vlan.py +++ b/tests/hwsim/test_ap_vlan.py @@ -330,8 +330,7 @@ def ap_vlan_iface_cleanup_multibss(dev, apdev, cfgfile): ifname = apdev[0]['ifname'] # start the actual test - hostapd.add_iface(apdev[0], cfgfile) - hapd = hostapd.Hostapd(ifname) + hapd = hostapd.add_iface(apdev[0], cfgfile) hapd1 = hostapd.Hostapd("wlan3-2", 1) hapd1.enable()