From patchwork Thu Jan 30 14:39:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Abinader X-Patchwork-Id: 315370 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]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 89E282C00D5 for ; Fri, 31 Jan 2014 01:33:14 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id C049E9C1A1; Thu, 30 Jan 2014 09:33:09 -0500 (EST) 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 8fh6B7ucJ3H3; Thu, 30 Jan 2014 09:33:09 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 2CDEB9C1B0; Thu, 30 Jan 2014 09:33:05 -0500 (EST) 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 D645A9C1B0 for ; Thu, 30 Jan 2014 09:33:03 -0500 (EST) 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 jHunXkHbxAZ3 for ; Thu, 30 Jan 2014 09:32:59 -0500 (EST) Received: from mail-yk0-f173.google.com (mail-yk0-f173.google.com [209.85.160.173]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 43EEF9C1A1 for ; Thu, 30 Jan 2014 09:32:59 -0500 (EST) Received: by mail-yk0-f173.google.com with SMTP id 20so16141893yks.4 for ; Thu, 30 Jan 2014 06:32:58 -0800 (PST) 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; bh=daECTsYnskOBO3EG2H3/QJDgQbj5m3tYDp/f2ExOT7M=; b=Iby4f7hd+HhFk0m6CTJrLASamRhuLRklhiv7BoMNa0RzXjpdCHxyzQLcqE2rFd+aEz 6GiVKisOeFJarnOqPgEyy7bDNBp/6WAqfRgAVFR6jXTAcV9abBHqZG6WdSGGKPip/VYc ahiF0qKWgfjKs2fM4usWYQ6iC4eHWgp4i1iYDLVQt952iQ4oIXrpDJrqF9Yu2BGOPTCU oUW4qWA6137roHDu6R25Ez7jojy0srN7mslfSAAF5xtX7HtMm8VoH0StPOmwDSkLMAt/ jtcm/tr/CxzVB1KZ0J7Vt0BuDYGPQzq5ImDYMwiQPigyCVczD6hni67b9YUJwaJPhlfl ItXQ== X-Gm-Message-State: ALoCoQlZlewqgU0QhLu3dLAh7+4Bo9cT1vU8JsoySIQ2YxvOrbf0njkTISQ8yPEsahpOrUEGLCtO X-Received: by 10.236.45.42 with SMTP id o30mr160389yhb.137.1391092378815; Thu, 30 Jan 2014 06:32:58 -0800 (PST) Received: from localhost.localdomain ([200.223.116.173]) by mx.google.com with ESMTPSA id g26sm21209284yhk.3.2014.01.30.06.32.57 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 Jan 2014 06:32:58 -0800 (PST) From: Eduardo Abinader To: hostap@lists.shmoo.com Subject: [PATCH 1/1] hwsim tests: adapt p2p_discovery to new notation Date: Thu, 30 Jan 2014 10:39:00 -0400 Message-Id: <1391092740-10858-1-git-send-email-eduardo.abinader@openbossa.org> X-Mailer: git-send-email 1.8.1.2 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: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com This patch removes "magic" ctrl_iface calls from test case, thus, complying with he new notation. Signed-hostap: Eduardo Abinader --- tests/hwsim/test_p2p_discovery.py | 6 +++--- tests/hwsim/wpasupplicant.py | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/hwsim/test_p2p_discovery.py b/tests/hwsim/test_p2p_discovery.py index d555e02..1825c38 100644 --- a/tests/hwsim/test_p2p_discovery.py +++ b/tests/hwsim/test_p2p_discovery.py @@ -23,7 +23,7 @@ def test_discovery(dev): raise Exception("Device discovery timed out") logger.info("Test provision discovery for display") - dev[0].global_request("P2P_PROV_DISC " + addr1 + " display") + dev[0].p2p_prov_disc(addr1, "display") ev1 = dev[1].wait_global_event(["P2P-PROV-DISC-SHOW-PIN"], timeout=15) if ev1 is None: raise Exception("Provision discovery timed out (display/dev1)") @@ -39,7 +39,7 @@ def test_discovery(dev): raise Exception("Dev1 not in provision discovery event") logger.info("Test provision discovery for keypad") - dev[0].global_request("P2P_PROV_DISC " + addr1 + " keypad") + dev[0].p2p_prov_disc(addr1, "keypad") ev1 = dev[1].wait_global_event(["P2P-PROV-DISC-ENTER-PIN"], timeout=15) if ev1 is None: raise Exception("Provision discovery timed out (keypad/dev1)") @@ -56,7 +56,7 @@ def test_discovery(dev): raise Exception("Dev1 not in provision discovery event") logger.info("Test provision discovery for push button") - dev[0].global_request("P2P_PROV_DISC " + addr1 + " pbc") + dev[0].p2p_prov_disc(addr1, "pbc") ev1 = dev[1].wait_global_event(["P2P-PROV-DISC-PBC-REQ"], timeout=15) if ev1 is None: raise Exception("Provision discovery timed out (pbc/dev1)") diff --git a/tests/hwsim/wpasupplicant.py b/tests/hwsim/wpasupplicant.py index 3707cbb..3d67861 100644 --- a/tests/hwsim/wpasupplicant.py +++ b/tests/hwsim/wpasupplicant.py @@ -297,6 +297,9 @@ class WpaSupplicant: def p2p_stop_find(self): return self.global_request("P2P_STOP_FIND") + def p2p_prov_disc(self, dev_addr, method): + return self.global_request("P2P_PROV_DISC " + dev_addr + " " + method) + def wps_read_pin(self): #TODO: make this random self.pin = "12345670"