From patchwork Mon Jun 24 13:43:23 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: 167577 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp4257838ilk; Mon, 24 Jun 2019 06:51:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqydDCXTjCA8gU7T5bvPSqJUc6Y4AeudG5Jsp/pxEX1hnhPj0cRmkYcEEf/OWfeaqqZejOMA X-Received: by 2002:a17:906:4bcb:: with SMTP id x11mr5060076ejv.1.1561384277419; Mon, 24 Jun 2019 06:51:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561384277; cv=none; d=google.com; s=arc-20160816; b=w3Vw8dhQdATcBifbGZoUv/j86VJtrd2cqRlTt23beBRKGx9Gv9lDHqu7egogxiUSZj zy7zh1r+T4JRglchgU8qrP5vyPSx1uAWN+WyT8riJ2a+M6ROt02HR5pqqFtLLUepCz5C bcmS60m/uD0OP5jO19Q/C7TrubdYpms2m2YsMUAPIrvoawocIyAqmsQnmEzI3h5ZF0p1 ClzrgHQIU8h0MQQ/y3RvCzDSDYWOglDVzOAqGGPKT6nB54CUqKvZG1ZrkWhqbub1tUCn jpdTMsDWSPR4SPY35wYeJtnmGtjiaZSFp33FQTYvLUMzxvmCzcgUAooRPu/wxh0JUX0Y VPag== 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=UmlC5jhm/yiDMB/28jG9Y1RW/s/4aA4e4sfjTnMWwG4=; b=si9IXc6SslquVhSQEDpHR8juaFoPrMDgXfPhgp+F3Y+KFLAmw0XyQclt+cXBOajOhO C0xrwAT8ptj+7OHoR/PC1swKSIAh/Bjryns5uqg/x8tiFKyzih3kJyeWF3mC/DGIrN2d q6bCdYOVbg2Jp+c15aLbMHVbwBaQwC9ro8jT/vN8g18JUfEjJhe8fim+z1ADSe995t/t 9t+9FKV/14Z/zVjWcHw9VyGeaDlT1Zz8VQ8oW/xJFC9gmPVMdqDIjlHTnPk0svqWzKb9 h5hQj1sS5bFZJSusNm8ezVmaOfUVLGCvxAc4PCpdMT6ziqCnq++0NDumwBkgn2JS78vE EfFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=obrIbgPG; 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 t16si9326309eda.244.2019.06.24.06.51.17 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Jun 2019 06:51:17 -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=obrIbgPG; 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]:51325 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfPNM-0002HF-BX for patch@linaro.org; Mon, 24 Jun 2019 09:51:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41558) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfPGI-0006iv-CW for qemu-devel@nongnu.org; Mon, 24 Jun 2019 09:43:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hfPGG-0007g5-Mc for qemu-devel@nongnu.org; Mon, 24 Jun 2019 09:43:58 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:40189) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hfPGG-0007OS-AM for qemu-devel@nongnu.org; Mon, 24 Jun 2019 09:43:56 -0400 Received: by mail-wm1-x32f.google.com with SMTP id v19so13430096wmj.5 for ; Mon, 24 Jun 2019 06:43:43 -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=UmlC5jhm/yiDMB/28jG9Y1RW/s/4aA4e4sfjTnMWwG4=; b=obrIbgPGbOjoOwra80SsV3ITSoWb/Un6kxVUrlBzcsbEp8kslAZ1/mT13TKTgnQSK5 GL5O8V+yMwd4CBBYfCPnV7kL0T59sMy3DEvw2rmos89naaRqb84V6LZgZ7F7wCnZXmUb r5nn0JNSs7y2YpQbG6NaYSNBa/w/O6fUSYMC8Tg8TyeTYr8+m4USdw2TlranpSivwREd sglLj1Zmwz28F9MTWTWaN2SSbqQxPA3iKKii1PUdcYPDWKqIZjiSzwOe7pRuLBWEGzkj H3QLR7pVEdSu7JJF+nr8Y3dI+GO18ycd8Sox0ihzv1+DuvZ15+ywpnC+Fz78Nbq446s2 Ak0g== 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=UmlC5jhm/yiDMB/28jG9Y1RW/s/4aA4e4sfjTnMWwG4=; b=sLbADiSdoVK0j6jIqnNbBkjbBt+fxVyvwGvr1dqCHloHt+RcBAcU7jxaLnSZOAfnjb zyGLWtHSFT2VnjgNJCN2ILwJA7O8b6IU8aIYxwl6RRsr45Vgu7+DqjyXxFUOlToQZHYH DRIStUByMq2lI8sbjEe/p14QOPLmihTXpNx/NSTk6ms6MjReYNbF/lc3ISqBI3OaRAbG DEgQSPnZrCLcE19mIO19ec82qnb0c37MQ/hMXveMun9gZCkVhhpIVOOllwAaR/PTx0jL IWr3qyeEnHLkNRZLzrfav7h7wXJnFI2M1KaBkg6tZeRBxRwGYJ/46y2bXN8KoUv8/326 R6zA== X-Gm-Message-State: APjAAAVCUrzUu2NesLG+ZVHm8f/BXM3sdhgK/sVyrRev4SYo/OAPcR0A SPPVXYBmQ21kN2j5JF9yUAcrhw== X-Received: by 2002:a1c:dc45:: with SMTP id t66mr16621984wmg.63.1561383822979; Mon, 24 Jun 2019 06:43:42 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id y133sm23398521wmg.5.2019.06.24.06.43.39 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 24 Jun 2019 06:43:41 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id EACB61FF92; Mon, 24 Jun 2019 14:43:37 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Mon, 24 Jun 2019 14:43:23 +0100 Message-Id: <20190624134337.10532-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190624134337.10532-1-alex.bennee@linaro.org> References: <20190624134337.10532-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::32f Subject: [Qemu-devel] [PULL 05/19] 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 , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Gerd Hoffmann , =?utf-8?q?Alex_Benn=C3=A9e?= 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 Tested-by: Philippe Mathieu-Daudé Message-Id: <20190617043858.8290-2-kraxel@redhat.com> Signed-off-by: Alex Bennée -- 2.20.1 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)