From patchwork Fri Jun 7 09:05:13 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: 166140 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp465437ili; Fri, 7 Jun 2019 03:40:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqy84xLLuXo3+uCMOSuNI+89Q8UgIYi9Uc4AjZ58Brf+7TZZEMUQs9o8dMUZtF/KKpY6gM4W X-Received: by 2002:ac8:e0c:: with SMTP id a12mr1493028qti.132.1559904044224; Fri, 07 Jun 2019 03:40:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559904044; cv=none; d=google.com; s=arc-20160816; b=FNZaAoZHlAF2/PD/gtmQH2fGUrFlz+JzPGQBOaI7tGhtzI1mLin8zZ1Xes+a6OW6Q1 qjuEOLOlk/cvzIt2uxFT54VZPX4oFNopozyfhV9ZS1e/EspjkawMQ8p7+eNmx/xM7mTn 1pwtRUv10d81r85Iq8mKAS5OuF2S3MomSuvqN50p6QVBMecZQJ3OyEr4TbRJFG0Uhosn Xm2/r/+OC9roT//a2ezxU652nbhlZIDxevXxlfhtSVPPYxpcpkjtAuxu0M9aOz+fqdYJ oT++Xf9sAHGTZeSOJmBu7BD5/thCRrTE3YmALN41ffZtAz70d68X5vI12hZQdBpd8rmH g13Q== 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=K60puiqqk977DMRGqqyet05oJzMhJ6Klb8DUPo/1Vlw=; b=QRrQYOixPiQAGRhfilAPU9z5duzfMpp6YFDUVSxoTtnYf4eecR8yJkSYQUHzCwWzlJ EjzNv+ny60xj58Kv5vLl4Lc3njiB+V12gCuZjAPUtI+ozXTcL0PI/hPRcmoDlRCKM2+H tgm5j4MrIGs7+I2awW55CsT3BjsiMg6O4DbN8Fc4xKKj2h/P2fGxzuUxw5btHZTmPE7W yzVpT8MwhRmZhELZjXsuOFu4ci2B8qxYpyrxNU4F8CFuosz/p8QB8Rv5SxGwEewZCHzZ XBPq2gYMJzouzkvg9s6hLKQGx7rtSm9deg7BT/TE2Uab/FKx3JzRwYnaC9rFU/5jP9MM p0uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GbiJ4Txk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.47 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.47]) by mx.google.com with ESMTPS id r45si1021051qtr.349.2019.06.07.03.40.44 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Jun 2019 03:40:44 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.47 as permitted sender) client-ip=209.51.188.47; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GbiJ4Txk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.47 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]:48162 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZCId-00045x-Ql for patch@linaro.org; Fri, 07 Jun 2019 06:40:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45085) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZB55-0008MV-6M for qemu-devel@nongnu.org; Fri, 07 Jun 2019 05:22:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZB54-0005xj-3M for qemu-devel@nongnu.org; Fri, 07 Jun 2019 05:22:39 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:54297) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hZB53-0005wn-SU for qemu-devel@nongnu.org; Fri, 07 Jun 2019 05:22:38 -0400 Received: by mail-wm1-x344.google.com with SMTP id g135so1270028wme.4 for ; Fri, 07 Jun 2019 02:22:37 -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=K60puiqqk977DMRGqqyet05oJzMhJ6Klb8DUPo/1Vlw=; b=GbiJ4TxkuDOA1cloaOY2UICFfE7xXXjk1cGMBJlz9lpbopmmJ5brGwZtMEpj1+E3RW RNn9dTHlY/10bq/wMimwjAnlbhD765sdE1Tbr65ta8xL6wFMmT5VWYqDNlYQVCzh9dQq wVNZ6Tm/Aze1m1rOh2hmx01OKCRFi8ZsZSc7o+CnttIIEjCRixZlDSQAc+RKbSShVqdC sxo3/weY9ncDjfP4blP+2n7r9uLVULKJqDYKBhOdJneCguPYh/LrbxAbUkC0EZKAPs94 diw0ewizv1XIRfytlerX9aD1eWm5bixaVTP4r4sD/OdZMcMa3wfPy5vgyyOeHV+M+jNU 06RA== 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=K60puiqqk977DMRGqqyet05oJzMhJ6Klb8DUPo/1Vlw=; b=s+QaDsT1sRIsP9zsnNi/rpqsDuQOesN6Kx5Oeucc0Qx3xWnIt1IWuNLgyTz0njRb7y fTEUyyB8IddhmbKiekYl+/apwFw18CRg5SDPxfH6TPHN1Lw+o9GiA+tWK+OpLRq1Z81e OQBT6SVS1ZnlWLmrX1RC92/dQzbvf9++bcFB8wI5aDTtJVL97blXyEgzO4HKS7AG40n6 /5hJ7liE/jhBS+DAfsqUjo+JSfF/QKNNdrL4ElV2UEP5KK1V4NzzJaMW7asBotjMSUga BQDOwny7EzT/2WowQH44LeXJSEtHVMMFv6M/8z8861GdlDcG0OlSlWrWtGa0p2mTOu/z Gd3Q== X-Gm-Message-State: APjAAAXQQmsSMTiFyLID02NNN62SzfZUeVpocjV7H9P+IWef2RP2fRqb 6v2ni6i3Jo0GLeCm0wqH0AfY3A== X-Received: by 2002:a1c:b189:: with SMTP id a131mr3040412wmf.7.1559899356679; Fri, 07 Jun 2019 02:22:36 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id a17sm1159492wrr.80.2019.06.07.02.22.30 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 07 Jun 2019 02:22:35 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 217081FF9D; Fri, 7 Jun 2019 10:05:53 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Fri, 7 Jun 2019 10:05:13 +0100 Message-Id: <20190607090552.12434-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190607090552.12434-1-alex.bennee@linaro.org> References: <20190607090552.12434-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::344 Subject: [Qemu-devel] [PULL 14/52] 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 Message-Id: <20190520124716.30472-4-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)