From patchwork Thu Apr 7 10:32:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilan Peer X-Patchwork-Id: 607302 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 3qgbXD3WPrz9t0t for ; Thu, 7 Apr 2016 18:35:56 +1000 (AEST) 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 1ao5Pl-0003Pm-Ni; Thu, 07 Apr 2016 08:35:45 +0000 Received: from mga14.intel.com ([192.55.52.115]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ao5Pb-00039J-C1 for hostap@lists.infradead.org; Thu, 07 Apr 2016 08:35:36 +0000 Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP; 07 Apr 2016 01:35:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,448,1455004800"; d="scan'208";a="80728392" Received: from unknown (HELO JED00377.ger.corp.intel.com) ([10.12.217.192]) by fmsmga004.fm.intel.com with ESMTP; 07 Apr 2016 01:35:19 -0700 From: Ilan Peer To: hostap@lists.infradead.org Subject: [PATCH 06/15] tests: Modify persistent_group_profile_add() to support P2P Device interface Date: Thu, 7 Apr 2016 13:32:00 +0300 Message-Id: <1460025129-18399-6-git-send-email-ilan.peer@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460025129-18399-1-git-send-email-ilan.peer@intel.com> References: <1460025129-18399-1-git-send-email-ilan.peer@intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160407_013535_568483_962D80F9 X-CRM114-Status: UNSURE ( 8.19 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.9 (-------) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-7.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [192.55.52.115 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [192.55.52.115 listed in wl.mailspike.net] -1.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -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.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: Avraham Stern MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Avraham Stern Modify persistent_group_profile_add() test to support configurations that use a dedicated P2P Device interface by sending the ADD_NETWORK and SET_NETWORK commands on the global control interface and specifying the P2P Device interface name. Signed-off-by: Avraham Stern --- tests/hwsim/test_p2p_persistent.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/hwsim/test_p2p_persistent.py b/tests/hwsim/test_p2p_persistent.py index 362e443..6451540 100644 --- a/tests/hwsim/test_p2p_persistent.py +++ b/tests/hwsim/test_p2p_persistent.py @@ -541,11 +541,13 @@ def test_persistent_group_missed_inv_resp(dev): def test_persistent_group_profile_add(dev): """Create a P2P persistent group with ADD_NETWORK""" passphrase="passphrase here" - id = dev[0].add_network() - dev[0].set_network_quoted(id, "ssid", "DIRECT-ab") - dev[0].set_network_quoted(id, "psk", passphrase) - dev[0].set_network(id, "mode", "3") - dev[0].set_network(id, "disabled", "2") + id = dev[0].global_request("IFNAME=" + dev[0].p2p_dev_ifname + " ADD_NETWORK") + if "FAIL" in id: + raise Exception("ADD_NETWORK failed") + dev[0].global_request("IFNAME=" + dev[0].p2p_dev_ifname + " SET_NETWORK " + id + ' ssid "DIRECT-ab"') + dev[0].global_request("IFNAME=" + dev[0].p2p_dev_ifname + " SET_NETWORK " + id + ' psk "' + passphrase + '"') + dev[0].global_request("IFNAME=" + dev[0].p2p_dev_ifname + " SET_NETWORK " + id + " mode 3") + dev[0].global_request("IFNAME=" + dev[0].p2p_dev_ifname + " SET_NETWORK " + id + " disabled 2") dev[0].p2p_start_go(persistent=id, freq=2412) pin = dev[1].wps_read_pin()