From patchwork Fri Apr 13 08:38:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masashi Honma X-Patchwork-Id: 897886 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GpNwc6Py"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="h99fAam5"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40Mrmg1TDFz9s0x for ; Fri, 13 Apr 2018 18:39:31 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Em65hZqV5xL6Wwj7dfsa+PPL7eXzLLRbAE8QArxtCuA=; b=GpNwc6Pyjrkw1/jNWLEBeSGP00 9XwmLdURxo+G1KT0ikb6FlJBGdJYDsLPdmSXOPl2Q40ZJomKITO3uBxWtZvSIR7OHCcKaSDWmUtf5 3TkHOHq0CdXQf98ZFJnRkUMyEFA2hEa+hk3Ut2RkPc3mNqWtygUmoMgrufEagAhH2yaRIgKbmn070 H1OmxzGCOHzLLt6Y4Q2IN7TcNcs61ayfRv3RQwt9kesH5KmiictEgYyqBL/vSiygAqPp2xLM0pnej GwTM/fC91xEw6WWnErTlfKx1uybrhpUi7GOR66ryVtKiqSKbhrnxfoeiOQ8IqgRwNVCjzyA+A3ttY j0H/iwiA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f6uEw-0006sc-Gl; Fri, 13 Apr 2018 08:39:26 +0000 Received: from mail-pl0-x241.google.com ([2607:f8b0:400e:c01::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f6uEa-0006b3-5C for hostap@lists.infradead.org; Fri, 13 Apr 2018 08:39:05 +0000 Received: by mail-pl0-x241.google.com with SMTP id t20-v6so5706785ply.9 for ; Fri, 13 Apr 2018 01:38:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8bs3sq1/e4iSZMQcW3fK8/nzXrhFq9X2q8Ju1Tl73z4=; b=h99fAam5BQXPLPhHzDMSwccdi91y0STQPEUqfY5Cyvv4U2Zks+Vfjsi/W+QGQhhkA3 7asqU4Oh00/6tCjLUJOT6/FqudcEDL3eInd/2g7yfFKHYVCGqyr0OMD7+xKLsNx6BXxP i/LJ03+XVazswgj4CSf22YsrNOxWPwhThoLAE8pdqzVAsHwM2gWqsTKTy93luErvYtJC +RW4Hov8fz0BqLVeS/usfRFi/w5frCLtiq4QTs98ME0Ml48BM+RkBIBczG/RJHb8HwAJ jbB6Ht9tCcWLjYEivIfJz0y5UGHh0De+c6ir7XwsjLzt+mbeH0UsQdAEcbZe64GY914M aZEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8bs3sq1/e4iSZMQcW3fK8/nzXrhFq9X2q8Ju1Tl73z4=; b=r+ocishLI2oGlm4y5IqQFcoPfUWOAArlP5Ui9aGKGG8PKEUsu9747+pExb4YLXuR/w gzvlVgVCRBOdzxYUN3pLE7Bicq+EDcbnlqCoqVcjkBHuplYxg992wk7TxBLAoH28wC9V xvEoHH9ikXgFCCjhyqBAElLwhUEJkJcZQHZbOscd3lEi5PDU6LAwn/5Gjz3tpiy3t7te via+J0W4d4Y1NK0YBT1ruBThsnJxg+sq9+1QSR97VyQXFSofTybv9P7SxKKNPbz0YlU7 CSC85ymNjpLZLyuapN4fKxMQHIktT0KQa3Vbhw+lc4xhPThrR/FZUwJlHc8ArATc2v+S TrIQ== X-Gm-Message-State: ALQs6tDndsdraJnsfxgUi5oFlBCo0Ubz/diXQqqLCzb5VP+XK90fxwNm FevMy2JxlK8ueeKkFg9cgTTstQ== X-Google-Smtp-Source: AIpwx48haMf5+Sj2MbQyCi+pwoIjCSUwH6tO1ZaDxcxtuhXxvp7/PMgyjrH7UmFpH9Uq3TPEs5Bgxw== X-Received: by 2002:a17:902:3084:: with SMTP id v4-v6mr4389855plb.262.1523608733359; Fri, 13 Apr 2018 01:38:53 -0700 (PDT) Received: from iiyama.flets-east.jp ([2409:11:321:2100:89cb:a57b:2e52:d73]) by smtp.gmail.com with ESMTPSA id v63sm14353199pfk.8.2018.04.13.01.38.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Apr 2018 01:38:52 -0700 (PDT) From: Masashi Honma To: hostap@lists.infradead.org Subject: [PATCH 3/3] tests: Add a mesh DFS test Date: Fri, 13 Apr 2018 17:38:36 +0900 Message-Id: <1523608716-5947-3-git-send-email-masashi.honma@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523608716-5947-1-git-send-email-masashi.honma@gmail.com> References: <1523608716-5947-1-git-send-email-masashi.honma@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180413_013904_222342_B574F9DB X-CRM114-Status: GOOD ( 11.08 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c01:0:0:0:241 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (masashi.honma[at]gmail.com) -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -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.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: j@w1.fi, Masashi Honma , peter.oh@bowerswilkins.com MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Signed-off-by: Masashi Honma --- tests/hwsim/test_wpas_mesh.py | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py index c3cfb7b..94bf544 100644 --- a/tests/hwsim/test_wpas_mesh.py +++ b/tests/hwsim/test_wpas_mesh.py @@ -18,6 +18,8 @@ from utils import HwsimSkip, alloc_fail, fail_test, wait_fail_trigger from tshark import run_tshark from test_ap_ht import set_world_reg from hwsim_utils import set_group_map +from test_dfs import wait_dfs_event +from test_p2p_channel import set_country def check_mesh_support(dev, secure=False): if "MESH" not in dev.get_capability("modes"): @@ -1061,6 +1063,47 @@ def _test_mesh_open_vht_160(dev, apdev): dev[0].dump_monitor() dev[1].dump_monitor() +def test_wpas_mesh_open_dfs(dev, apdev): + """wpa_supplicant open MESH network with DFS""" + try: + _test_wpas_mesh_open_dfs(dev, apdev) + finally: + for i in range(0, 2): + dev[i].mesh_group_remove() + check_mesh_group_removed(dev[i]) + dev[i].flush_scan_cache() + dev[i].dump_monitor() + set_country("00") + +def _test_wpas_mesh_open_dfs(dev, apdev): + set_country("US") + for i in range(0, 2): + dev[i].request("SET country US") + check_mesh_support(dev[i]) + add_open_mesh_network(dev[i], freq="5260", basic_rates="60 120 240", + disable_ht40=True) + + ev = wait_dfs_event(dev[i], "DFS-CAC-START", 5) + if "DFS-CAC-START" not in ev: + # For now, assume DFS is not supported by all kernel builds. + raise HwsimSkip("CAC did not start - assume not supported") + + ev = wait_dfs_event(dev[i], "DFS-CAC-COMPLETED", 70) + if "success=1" not in ev: + raise Exception("CAC failed") + if "freq=5260" not in ev: + raise Exception("Unexpected DFS freq result") + + # Check for mesh joined + check_mesh_group_added(dev[i]) + + # Check for peer connected + for i in range(0, 2): + check_mesh_peer_connected(dev[i]) + + # Test connectivity 0->1 and 1->0 + hwsim_utils.test_connectivity(dev[0], dev[1]) + def test_wpas_mesh_password_mismatch(dev, apdev): """Mesh network and one device with mismatching password""" check_mesh_support(dev[0], secure=True)