From patchwork Thu May 30 10:15:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165425 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp776021ili; Thu, 30 May 2019 03:28:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqynvfH9ZUfT8t3f5o6yb/rLnIDWzgtH8JU2MdQ4JjIsJC0JgOikRTZSWW6ATjKO6Sb2G0ml X-Received: by 2002:ac8:6898:: with SMTP id m24mr2647549qtq.362.1559212129420; Thu, 30 May 2019 03:28:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559212129; cv=none; d=google.com; s=arc-20160816; b=CoGSWjzSHqG2PfoCtpXc+NM7aSP2kg+nDidl/lNrY4tJMcmvqnVbwdGsn+1NnzRUMk SGs1MoVCNN0BfNWnqBwQC3w2rL+OoSKDKG7put4HU4xj/5pC0GAjDFfQ/UyE/2E78joi Ct/7RKbVDXaDswB02OzPx5HzlYRzEFwQraQeOfxnNWebWeVsKg45ffhUUuHPnpo5VMVR dm8O+mJWc3N/B/tlJLdkOWWSIJWyglSCx85LQaQLg/tPYgzTTExhnjiRmfm46Hm1FRH+ K90yXiyQpdeEu5NSvmQNDwZmzMoBKEfyWDG2BlrqmxtOnIMMRUScQU0fmpm5sGJ/yHqa E1Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=tKMybXLMRDSBfHxe/ATk9ylSYfLE+dz7XRu9VYKxKSs=; b=ISbSCiHJwQQH4YITk0tKqWHAoriU5RlDVxk4ZPctlqyBZ3raxLxuPae19c7NaDzH9Z ADRi+r3QyQEV3QQnYYL+knXJKeB8B+l6u7Eq/TPlLvXgadzcm2FuVmwn82HbOObgYUfE cysnKceNNBPyh1zSY+jHgWiW8Eas6DVHARaVecJtDemLXkIV28Mixx+vUyux+igm9JEv 9ztXDwAB5pJZismp0g2jA6u+i9LTr78pMqQi5y95yK31qU+Vw2K4e+SUwCW2soORcC4P gcpcvLYEmWZZzEagy7pIrGc0gpaXP2s83W8FCpdTmFXIp10fc4b1NXWM61n+3GUIBHT5 vXdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=tXn3mjEu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k14si1471908qkg.36.2019.05.30.03.28.49 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:28:49 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=tXn3mjEu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIIi-0004Cs-RX for patch@linaro.org; Thu, 30 May 2019 06:28:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIFE-0001EH-BS for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWIFC-0000GS-TQ for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:12 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:35342) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWIFB-00007H-RY for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:10 -0400 Received: by mail-wm1-x342.google.com with SMTP id c6so564940wml.0 for ; Thu, 30 May 2019 03:25:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tKMybXLMRDSBfHxe/ATk9ylSYfLE+dz7XRu9VYKxKSs=; b=tXn3mjEuMwSRnFRjLzCtDSFvdXivMZdk2BXVccr37weXGO8Odahf4ImzjpoAsiXLzn kkma9tEZYI9TF3sQXR4Fg0k/wGJSp77b/35eiUoaF9M772SUBet2i7JPLq3iiWnIstif veJ+LM7K3S2kFAap0cW/qKP816kRQIW4RV+n6ajayUFeJc605EJT77+5fSLwjTRVQHM0 ZoM156VcLNCEm0ZMmysjcbxW3GZvvtGK/JswnpQFeKLSChdncboL/pHRBihAZ4wfN93m MFVBTC6FNZwS2/B9lE8novrMxwtCDPnBhxaj1Pc/1CRU1xPusDnx0VHHH07La+x8Nhqm PFGA== 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:mime-version:content-transfer-encoding; bh=tKMybXLMRDSBfHxe/ATk9ylSYfLE+dz7XRu9VYKxKSs=; b=MF6nCG9gLfvn2jfBDdQfop/nP+boDLelgnYapx0nU77dsTnMwXa7vSFfV4Seo5AO/p Yfr7xZsk1i/7i5eDLTNfe/qaZsTW32DsTWvLIfSZBQ163IbP1X2EoZmr3kGuo5+/wPOb B9RGeicn+mLu05fip0dZqvDmhq5wCaab57UML+mfO0OKj1LQDw5gResM2Ep86UZl/r/I +z6Jkrzeg6kiF3DgMk175pA0I0nM+t2aNtuS3I57bwENzaPfY7NX5OB7br2fuvhsB3tw kysSqPO0me4/PNDF4drf19TylXu0t9ag7y2+MPv4aiNFJzWncXOLMxbiATMyWifg0wzn HsrA== X-Gm-Message-State: APjAAAUrsj8pR4kke1J93gen5hJyyWzc4ECM3fxNZ+4CS5GrO1M2+AUr BShXzLYBqMQrJeXmz8MPuasTNw== X-Received: by 2002:a7b:c043:: with SMTP id u3mr1259501wmc.56.1559211905274; Thu, 30 May 2019 03:25:05 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id s8sm2386491wra.55.2019.05.30.03.25.02 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:25:03 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4A9231FF9F; Thu, 30 May 2019 11:16:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:52 +0100 Message-Id: <20190530101603.22254-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 Subject: [Qemu-devel] [PATCH v1 15/26] tests/vm: send proxy environment variables over ssh X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann Packages are fetched via proxy that way, if configured on the host. That might be required to pass firewalls, and it allows to route package downloads through a caching proxy server. Needs AcceptEnv setup in sshd_config on the guest side to work. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Tested-by: Thomas Huth Message-Id: <20190520124716.30472-4-kraxel@redhat.com> --- tests/vm/basevm.py | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.20.1 diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 4847549592d..5e30bac6615 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -38,6 +38,13 @@ class BaseVM(object): GUEST_PASS = "qemupass" ROOT_PASS = "qemupass" + envvars = [ + "https_proxy", + "http_proxy", + "ftp_proxy", + "no_proxy", + ] + # The script to run in the guest that builds QEMU BUILD_SCRIPT = "" # The guest name, to be overridden by subclasses @@ -106,6 +113,8 @@ class BaseVM(object): "-o", "UserKnownHostsFile=" + os.devnull, "-o", "ConnectTimeout=1", "-p", self.ssh_port, "-i", self._ssh_key_file] + for var in self.envvars: + ssh_cmd += ['-o', "SendEnv=%s" % var ] if interactive: ssh_cmd += ['-t'] assert not isinstance(cmd, str)