From patchwork Sun Jan 12 22:02:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Dziedzic X-Patchwork-Id: 1221879 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) 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.a=rsa-sha256 header.s=bombadil.20170209 header.b=SwJg00ub; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=APxdOdQK; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47wrMf31Wgz9s4Y for ; Mon, 13 Jan 2020 09:03:42 +1100 (AEDT) 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=FkCdBicA9GH0qKJto36t2TH4WtTr06i6QdNv+u8BCdM=; b=SwJg00ubV6HxZczNWX9vJUIl1m mEvk20d499CEnG5PytiGmYRpBjwLf630rxZfOAGt1ee1IqKuBD5by65hVMnTcDGMMFgVegD3a/cxe pk3dwTeG+CcR2tcw158Z4x0Z2kyWKf2PTkop3MUPQ7hd/YjCkEP1uSG3GHVHZf0zyTOKWhswnjyN+ THTskjj1s5F1c/DVe+WqgbbmoaSqpEONwElkRVlG7AYCHi7PRKkliHn9i5Qk0QW6yr+pBGdH27x3L ZwlCVneUeTKfWQavj4zTDcXD/Yb09kAiwR7gA4KI4yEVM7sWb07sc6Ho2Ys+z1px5aj77jmPPV4/4 Sdgka21A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iqlKb-0003HR-MV; Sun, 12 Jan 2020 22:03:37 +0000 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iqlJi-00028C-Pi for hostap@lists.infradead.org; Sun, 12 Jan 2020 22:02:44 +0000 Received: by mail-lj1-x234.google.com with SMTP id r19so7896685ljg.3 for ; Sun, 12 Jan 2020 14:02:42 -0800 (PST) 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=HoQaosuS57PUoVnCGVoVv5BcseslHmxWhXJyoBhavEQ=; b=APxdOdQKLZNAX4OeFK4wF064MyNeKGPrMLC7WbMPTHEW9qa6EAkC2i2jrCYIKOiDK5 +5jOxS6dfD77yP9TxPI+3f5W7hA7k8TN990ZXFoU639qguQqIspGLbppjwem0Q0BE8wr AUpL0tIMeHafgnGyPJCU6aUPe9MOsLgMv8oRORO/mAt7EGaA8vq3LTPeDTk3+gx7dXTv 3iMDyW9GQ8YZHKxKSUXA7k47GtM2GuUfAj1OnCXvwlheFrtFxLY6bO4hFOHPw7nHXvlW upDidlD/hasYorzDp80c+14zNjP3lUQaZUqApgctEbLFDQytkSZ+PbKslUy/Clni2jUg 0vpQ== 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=HoQaosuS57PUoVnCGVoVv5BcseslHmxWhXJyoBhavEQ=; b=QlYiIdGXUtUMWRWRhrTk35UsH2xvpENjnfWa3aGBPZ0MF2you47hmYXq+DPsklrcnA QW3sPQup6DjiSWdQaY80qRoTUmux8Vq8Q9hrz73ExoLidDxli0F9qtifvcgbYdb41YQ5 q6llDT8rEyk/I5UQ33NBIh3+mcLpdrHT3+q/7BVvjcV7NxrZDHmZLZJnefLy01nm2clL S/+IaXQd6NK1JTtM5EAC16vd/yjPNh8Rr6PCo/GXB/agLto1lBxQSxqqtD5qBUXQSvx6 nUR1NWSRxapdtjh2qdHhI+Tu8SGc4BziWbj62e8zItdLwmtkb5tdUGQRiUs+L44NVLw3 RgJg== X-Gm-Message-State: APjAAAV28vIFiJqRO7DCi7QWT8QmMzuIgAG5706gaMZlClrOageXsBkc JyS+3BA8MOqU8F4YtKNTBWIQuf43 X-Google-Smtp-Source: APXvYqxuZT9H4NPzSGNa2m86K8zaOs9dNWwXUanzWww+Ny8JVFFn6LFxn/UFpbeb55BrywtRJubH2w== X-Received: by 2002:a2e:8152:: with SMTP id t18mr8152080ljg.255.1578866560561; Sun, 12 Jan 2020 14:02:40 -0800 (PST) Received: from e4300.lan ([62.141.210.6]) by smtp.gmail.com with ESMTPSA id u18sm4831325lje.69.2020.01.12.14.02.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jan 2020 14:02:40 -0800 (PST) From: Janusz Dziedzic To: hostap@lists.infradead.org Subject: [PATCH 07/12] tests: remotehost: add send_file Date: Sun, 12 Jan 2020 23:02:21 +0100 Message-Id: <20200112220226.5056-7-janusz.dziedzic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200112220226.5056-1-janusz.dziedzic@gmail.com> References: <20200112220226.5056-1-janusz.dziedzic@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200112_140242_855211_74A0567D X-CRM114-Status: UNSURE ( 9.18 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:234 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 (janusz.dziedzic[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 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_EF Message has a valid DKIM or DK signature from envelope-from domain -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.29 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 hostapd often using config files eg, ACLs BSS configs When execute remote tests (udp) first we have to send this config files to correct host. Signed-off-by: Janusz Dziedzic --- tests/hwsim/hostapd.py | 12 ++++++++++++ tests/hwsim/remotehost.py | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/tests/hwsim/hostapd.py b/tests/hwsim/hostapd.py index e555f75ed..8f2ce02d4 100644 --- a/tests/hwsim/hostapd.py +++ b/tests/hwsim/hostapd.py @@ -135,6 +135,10 @@ class HostapdGlobal: self.ctrl.terminate() self.ctrl = None + def send_file(self, src, dst): + self.host.send_file(src, dst) + + class Hostapd: def __init__(self, ifname, bssidx=0, hostname=None, port=8877): self.hostname = hostname @@ -521,6 +525,10 @@ class Hostapd: def note(self, txt): self.request("NOTE " + txt) + def send_file(self, src, dst): + self.host.send_file(src, dst) + + def add_ap(apdev, params, wait_enabled=True, no_enable=False, timeout=30, global_ctrl_override=None, driver=False): if isinstance(apdev, dict): @@ -741,3 +749,7 @@ def ht40_minus_params(channel="1", ssid=None, country=None): def cmd_execute(apdev, cmd, shell=False): hapd_global = HostapdGlobal(apdev) return hapd_global.cmd_execute(cmd, shell=shell) + +def send_file(apdev, src, dst): + hapd_global = HostapdGlobal(apdev) + return hapd_global.send_file(src, dst) diff --git a/tests/hwsim/remotehost.py b/tests/hwsim/remotehost.py index 50f46c310..138419e47 100644 --- a/tests/hwsim/remotehost.py +++ b/tests/hwsim/remotehost.py @@ -106,3 +106,8 @@ class Host(): self.local_execute(["scp", self.user + "@[" + self.host + "]:" + log, local_log_dir]) self.execute(["rm", log]) del self.logs[:] + + def send_file(self, src, dst): + if self.host is None: + return + self.local_execute(["scp", src, self.user + "@[" + self.host + "]:" + dst])