From patchwork Wed Jun 19 19:40:09 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: 167257 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1134048ilk; Wed, 19 Jun 2019 12:51:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4+vsCAwl8ojX/hO9NqavHVeuDOq3Nn0RollCtjhGq+v0uA+5WEPWLqYmVUhSf2LowhrJc X-Received: by 2002:a17:906:1344:: with SMTP id x4mr48225567ejb.249.1560973904342; Wed, 19 Jun 2019 12:51:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560973904; cv=none; d=google.com; s=arc-20160816; b=j1Dz5K1yVh5UE+0P5wT2lr61/sBhj6Vh3MKcYpRCNlPJB/oPhaDNvS1tupy03w54MJ gUSy3NjXZNoF2lbUJ25J5LdPSiSteSt3ZmeT+zSEq4wjuK7Yvh3OJCbcPuADn+ruhSLd jhBHbRdtax/9uZjeA8XgycKrI4FerZ5M3kasULxKvHrHdvEfwx9VJwpkm28tpMxq+Xux pfFIp6IlCZrjo+7jE7aBj5lh31GkxSoY/pPSV+U0zNqU2+incqJoTbNBKGgN8O7GU7+Y 4rgBbheSmGeKJRYvIU9V6y+fQ8QF5bfTxiqjh7EPCc7o8GHaHkLZOHJgJug8jEUD3Vhb /+LA== 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=qdTjyQaBb0/jp//KyLcDmonBqL8NDTLZR4EMwIjuiJg=; b=iUCRg2lTavj9t8XO6rNkFBJLVhDCCRr+huZ3pQsW5dWJG6sFmtcDJt7YSrUSMCHK+/ 8WhVDV3RZ8Lt71NUf7XCUNlWXEQHS7dqvhTvVIHfH7Q/QrckqGnm5u8byQXxpgfiIW0z PHif9p18Zuq3NNNUJzBgN38npPVEPpVP8dTlYCK6MgihlaoJfJMNXreYn+2q9w6o9AIe 1uBt4k/xU/pWCQMOdy89ACy4L+WRWTL8/FChMywPL3oteOIawL2ql/9WfT6ojCXpebVu NWFj2KV0r6mFHgBzPA8LHl33Nb6pb+ORaPqSoLSPpBMt4FIwOHB77mlI8rR3LWsvSNln ltLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="GOTKH/so"; 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 u22si11509430eja.77.2019.06.19.12.51.44 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2019 12:51:44 -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="GOTKH/so"; 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 ([::1]:41462 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgcR-0005uI-Ba for patch@linaro.org; Wed, 19 Jun 2019 15:51:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53928) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgRZ-00067x-Kg for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdgRY-000062-8G for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:29 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:38779) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdgRY-0008Vd-1r for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:28 -0400 Received: by mail-wr1-x441.google.com with SMTP id d18so493485wrs.5 for ; Wed, 19 Jun 2019 12:40:27 -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=qdTjyQaBb0/jp//KyLcDmonBqL8NDTLZR4EMwIjuiJg=; b=GOTKH/soekvQHQvQQZP5TPI1o9LeBPGGBj4hpcm3CPKG6FJS53AN2siCH0/8AIWmb+ 0HnbD8z7Jf0isQiji37McaIHJtmIRpsC+eYQ0SfdVlhaBBCY3sWWQB8bB5Ius3YCqqMa pinEzJ2r7BlCc9s1mxwrpiW6mC+Xp6cp+7myNa2KDis5aAPWK/Jr4Eq2hSnkYNYFY7H5 QMYkSt7ogRJ8XLtS2MMByFcrvh6ths0kkO5uTaC5oYeYJwH8Q5Z84yT2LG/pVQa8hOCQ e9qypKc8m5sdlCQkTe680JjGtFcnxaX20XvdmXltfiWfvx8nKqB9ymqZsobAXGQsEjIn DFsA== 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=qdTjyQaBb0/jp//KyLcDmonBqL8NDTLZR4EMwIjuiJg=; b=IZBarWLlhwVkTcDNP0QXOtwnf1/8xbF6WEFut7No16d6orUxZ/xVAfhumyPBOdDt2p h5qRiP0vBfU5CYVZtP/x6RzRtTAfL1Y4cwY1k6MEe73COaj6/kJyWKJyJyOZNCiLHokW tchU/HTpp6Cem2+ICXbTT4lp9hpXgVvpHAHTaJV5ctdCNpqGyHpm1WvPPWEPvwubUHNQ T4IQrg0tdEhfWDYEcTqSu7MJILat7lF26z8Sb4pAea9Jecl+xoXAnMIRrGwhRzN+8uLB B3ppYVKpcVDNydU+kO7NYkLAKXoM4czkd684j5ARynOKUmON7kf7OkNlHmddT+gQapTq vlfg== X-Gm-Message-State: APjAAAVSS2cOoqHkTielA8iwZzt1g4FPy4to2xt3jjlN+O6jheuOCVzr CJfrZWAkEJ90fYymRc2DDGS7o+lTBZs= X-Received: by 2002:adf:efc8:: with SMTP id i8mr11569882wrp.220.1560973226941; Wed, 19 Jun 2019 12:40:26 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id i25sm7844878wrc.91.2019.06.19.12.40.22 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jun 2019 12:40:23 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id DD8FB1FF92; Wed, 19 Jun 2019 20:40:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 19 Jun 2019 20:40:09 +0100 Message-Id: <20190619194021.8240-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190619194021.8240-1-alex.bennee@linaro.org> References: <20190619194021.8240-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::441 Subject: [Qemu-devel] [PATCH v1 05/17] tests/vm: send proxy environment variables over ssh X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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: <20190617043858.8290-2-kraxel@redhat.com> --- tests/vm/basevm.py | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.20.1 Tested-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 4847549592..5e30bac661 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)