From patchwork Thu Apr 7 05:38:00 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: 607246 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 3qgWcQ214Yz9t5V for ; Thu, 7 Apr 2016 15:39:18 +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=qWp7MCt9; 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 1ao2ej-00052t-1l; Thu, 07 Apr 2016 05:39:01 +0000 Received: from mail-lf0-x22e.google.com ([2a00:1450:4010:c07::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ao2ef-0004we-Ly for hostap@lists.infradead.org; Thu, 07 Apr 2016 05:38:59 +0000 Received: by mail-lf0-x22e.google.com with SMTP id e190so47203872lfe.0 for ; Wed, 06 Apr 2016 22:38:33 -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=Ctu/olHCmNlQrvJ3Eyjtub0sHBnerMDU1hpoEIiFHhU=; b=qWp7MCt934vwOr+kLTGmwpO01jvvS+vbiBD9v9b/JV58gCXL8RRig334eUrS3yu8wP 14FV1AMSTm1edcVP7QXcUE2Xv8491FYzm/vGfioGxCBtzreCUY6EDFFZxDnBR2x0gSGI xncyDP1An6LbQJX3wP1CptgUJudyjmsOrug5Q= 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=Ctu/olHCmNlQrvJ3Eyjtub0sHBnerMDU1hpoEIiFHhU=; b=DSRdyN+/tSjNTb7XTMpuKHFFDmPeyk1eIG4zNdbt4hzPJmys4D4LepNynY1OeILs2d yDo8a6DMS9ddgSvHESTIsPVgZGCF43iRCJ0RQzDCtvuwcZx5cgGehciGFdtN+I6JSVhN qwsYl2JRc117TR8zBXH1YQBdJQsNP5BG+YyJ+k6mj21/2SHHfZimzP+kCIi130iw/ntb FjYcSHvCkQpAA7y5NOwTttjMnUvBDk1Z2GPOIU7UWDF3gxhKRd7Xm0TtiIuk5GQcgO8q BqL6GTIhE77JZbnJc+VFn8ueV26IgBDWMy22Kul2aI0eEihi0pxsSk7uD1LxAwqnMqSH 2SGw== X-Gm-Message-State: AD7BkJLM6YIuMrZUmnpvM1E5FKdsKXXGcZtcmhNUnh15MdmMp4+yfS0FWuaDURqocx4tbNFkOIzB6AC8g8V/VBnV8eo5EhiIgqh7eY9n2lS67JhEVySvuHaFftZlYj7g/gq0VkVeFmsTDds9c0H7r8tONEQ0sb8FYjcWjgmN93Cl/IO38SJmwhTST5kmYqA8Dsse X-Received: by 10.25.166.140 with SMTP id p134mr447327lfe.29.1460007512234; Wed, 06 Apr 2016 22:38:32 -0700 (PDT) Received: from localhost.localdomain ([213.192.73.50]) by smtp.gmail.com with ESMTPSA id f134sm938018lff.34.2016.04.06.22.38.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Apr 2016 22:38:31 -0700 (PDT) From: Janusz Dziedzic To: hostap@lists.infradead.org Subject: [PATCH v2 02/17] tests: pass apdev to hostapd.terminate() Date: Thu, 7 Apr 2016 07:38:00 +0200 Message-Id: <1460007495-17921-2-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_223858_042244_7A99C03F X-CRM114-Status: UNSURE ( 8.69 ) 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:22e 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 Pass apdev dictionary to hostapd.terminate() Signed-off-by: Janusz Dziedzic --- tests/hwsim/hostapd.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/hostapd.py b/tests/hwsim/hostapd.py index 6becb8e..931c666 100644 --- a/tests/hwsim/hostapd.py +++ b/tests/hwsim/hostapd.py @@ -422,8 +422,15 @@ def remove_bss(apdev, ifname=None): hapd_global = HostapdGlobal(hostname=hostname, port=port) hapd_global.remove(ifname) -def terminate(hostname=None, port=8878): - logger.info("Terminating hostapd") +def terminate(apdev): + try: + hostname = apdev['hostname'] + port = apdev['port'] + logger.info("Terminating hostapd " + apdev['hostname'] + "/" + apdev['port']) + except: + hostname = None + port = 8878 + logger.info("Terminating hostapd") hapd_global = HostapdGlobal(hostname=hostname, port=port) hapd_global.terminate()