From patchwork Tue Oct 14 17:34:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Toby Gray X-Patchwork-Id: 399516 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) by ozlabs.org (Postfix) with ESMTP id 16EBC14012A for ; Wed, 15 Oct 2014 04:35:53 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 1A08217C040; Tue, 14 Oct 2014 13:35:51 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hedYFZd55d96; Tue, 14 Oct 2014 13:35:50 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 307E617C045; Tue, 14 Oct 2014 13:35:16 -0400 (EDT) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 1CA9A9D3C2 for ; Tue, 14 Oct 2014 13:35:14 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JcnauCR-CSo8 for ; Tue, 14 Oct 2014 13:35:08 -0400 (EDT) Received: from SP39.realvnc.ltd (mx.realvnc.com [212.69.41.4]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "SP39", Issuer "SP39" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id C56C99D37A for ; Tue, 14 Oct 2014 13:34:50 -0400 (EDT) Received: from tg-mobile-dev.realvnc.ltd (10.10.30.125) by SP39.realvnc.ltd (10.10.99.12) with Microsoft SMTP Server (TLS) id 15.0.775.38; Tue, 14 Oct 2014 18:34:48 +0100 From: Toby Gray To: Subject: [PATCH 1/2] tests: Add tests for removing a P2P group via the group control interface Date: Tue, 14 Oct 2014 18:34:42 +0100 Message-ID: <1413308083-8450-2-git-send-email-toby.gray@realvnc.com> X-Mailer: git-send-email 1.8.3.4 In-Reply-To: <1413308083-8450-1-git-send-email-toby.gray@realvnc.com> References: <1413308083-8450-1-git-send-email-toby.gray@realvnc.com> MIME-Version: 1.0 X-Originating-IP: [10.10.30.125] X-ClientProxiedBy: SP39.realvnc.ltd (10.10.99.12) To SP39.realvnc.ltd (10.10.99.12) X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com This adds a test which attempts to use the control interface for the P2P group to remove the P2P group. Signed-off-by: Toby Gray --- tests/hwsim/test_p2p_device.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/hwsim/test_p2p_device.py b/tests/hwsim/test_p2p_device.py index 9217720..e811c30 100644 --- a/tests/hwsim/test_p2p_device.py +++ b/tests/hwsim/test_p2p_device.py @@ -30,3 +30,20 @@ def test_p2p_device_grpform2(dev, apdev): r_dev=dev[0], r_intent=0) check_grpform_results(i_res, r_res) remove_group(wpas, dev[0]) + +def test_p2p_device_grpremove(dev, apdev): + """P2P group removal via the P2P ctrl interface with driver using cfg80211 P2P Device""" + wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5') + wpas.interface_add("wlan5") + [i_res, r_res] = go_neg_pin_authorized(i_dev=dev[0], i_intent=15, + r_dev=wpas, r_intent=0) + check_grpform_results(i_res, r_res) + # Issue the remove request on the interface which will be removed + p2p_iface_name = r_res['ifname'] + p2p_iface_wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5') + p2p_iface_wpas.set_ifname(p2p_iface_name) + try: + p2p_iface_wpas.request("P2P_GROUP_REMOVE *") + except: + # Expect command to fail + pass