From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82A80C48BE9 for ; Mon, 24 Jun 2019 13:52:11 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5244B2133F for ; Mon, 24 Jun 2019 13:52:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="obrIbgPG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5244B2133F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:51336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfPOE-000481-KK for qemu-devel@archiver.kernel.org; Mon, 24 Jun 2019 09:52:10 -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-Google-Smtp-Source: APXvYqxfXFCree/i0XFd2AIns4ij+K9pYRujG9dNl35kRHA1Ucb4x0pimJFgRgwjiaasPyV+Mob0SQ== 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=20Benn=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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Gerd Hoffmann , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.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 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) -- 2.20.1