From nobody Tue Nov 11 03:17:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560973368; cv=none; d=zoho.com; s=zohoarc; b=Gwo1PMYqlY4yMWB5Zf3d6kNExgKaU1okmQ1DYNZDeo50I5eE7hgL56WurjH5AGMNt4MJfADnI1Tpsfqg1nukAf0Gjs8N53HR/VTLh+pnM3gwmzZ7L4ej4obslxeWYH61dbqb5Ts8bFNp04C/26TUL5IeAwEzF/FVzthuul+hlcA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560973368; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ahgJcoAG7RlG7q4icivLXPe7IKp6EgtWsDrDvy33nsw=; b=gu7bR0WnT7n0YuwjKvyD/TCm/e3u0fViZ2HaWyXfXWPGe6XJKelx4zlAbdgBL6Yfu3ycnZT2zoMyLyK9Fd8FnOE+uS7OHTV3mO3nmxzSaU1J5Xl3dK51VwwIydVD1ppoYnzaVIJ4JalVAsLtUeTp8Te+9Yc6N/3qH2uKKZ3C6CA= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560973368816662.7086062323937; Wed, 19 Jun 2019 12:42:48 -0700 (PDT) Received: from localhost ([::1]:41422 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgTl-0007sD-JP for importer@patchew.org; Wed, 19 Jun 2019 15:42:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53862) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgRV-0005zF-MO for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdgRU-0008Rs-Ec for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:25 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:53689) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdgRU-0008R3-7R for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:24 -0400 Received: by mail-wm1-x341.google.com with SMTP id x15so676346wmj.3 for ; Wed, 19 Jun 2019 12:40:24 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id f12sm27114958wrg.5.2019.06.19.12.40.21 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jun 2019 12:40:21 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8BB3E1FF8C; Wed, 19 Jun 2019 20:40:21 +0100 (BST) 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=ahgJcoAG7RlG7q4icivLXPe7IKp6EgtWsDrDvy33nsw=; b=pudx98c+j8ZzDliq4YExa9ZVynTLKf/yqrj/3IvRabsx6+gwOY4wcobzJ2LOPOPOhz NWD6QguqQ9xKrYKgIqt7nwc02Qpot4/Plj+gmJHdgpaLAnReM2T2UVL/kh3AU0T3jWtu AugUyumRiBAA7JQ9IKaqBvC6AbN1N2LYIpOqCRpjZs7quG7fNaB9ZT76jgNCDt/ZH00i nn//+5Q5hKlZfU/XfWf6p4pN95BXuXQ73z8DBZF9op20avcfZxGJIFcbgur0GudZkdJe j0B1EJlbB0VN8aRzW+qe2W1IB6AORRKgO+s75e7hKbXxykAkijOLKMhLC4FDpJSsxZ1b WQGA== 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=ahgJcoAG7RlG7q4icivLXPe7IKp6EgtWsDrDvy33nsw=; b=OFsbvChHIMD5eusd0t+ZO9TUi62Oy2y+NDD4FCTwNsCPUVWcfTf4o0Wtdiwfr5/Z1n P1P+C6KgEHRMkfNfM9qDPIBD+hMRnmw0U6mEd8b30US4AgQJuY4/DWc20KXuLbmWR/Af 1KIM2drf7t3WF9+XS+Frs7uaKhfAzL+NEG3aNqSAEBnZ+3woExEcwcFagqTsjKqDeBCd lgJJRAdXpuUBRVb/2EpUpdzP+iyIi8LojLeEc/vPC+xcLCceRM4+T4soB1cpyDbvjuuc 30ui1CDSnRKPqr241nLFH1PVL06av4tg4Owesl7C2pP8haVQXVLguGqHY+lMmjPuM1Bg ZoIA== X-Gm-Message-State: APjAAAUxVczliCu5wqiCGMMuSmBZL1QMoSnPKRnF38aFlbP9MtS2MizA PDuZ5UCBwaGrkPn5xrmTMu02gA== X-Google-Smtp-Source: APXvYqxQaUiq4e94q+Fv5OwfONe1WJ1/kiMUH7Qh6O/tzqP8tltbhSk6AF1tnYp0dlie3o8zkOlI6A== X-Received: by 2002:a1c:720e:: with SMTP id n14mr9641760wmc.53.1560973222964; Wed, 19 Jun 2019 12:40:22 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 19 Jun 2019 20:40:05 +0100 Message-Id: <20190619194021.8240-2-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 Subject: [Qemu-devel] [PATCH v1 01/17] tests/vm: avoid extra compressed image copy 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?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Cleber Rosa The image copy is only really needed because xz doesn't know to properly decompress a file not named properly. Instead of decompressing to stdout, and having to rely on a shell, let's just create a link instead of copying the file. Signed-off-by: Cleber Rosa Message-Id: <20190613130718.3763-2-crosa@redhat.com> Signed-off-by: Alex Benn=C3=A9e Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/vm/centos | 4 ++-- tests/vm/freebsd | 4 ++-- tests/vm/netbsd | 4 ++-- tests/vm/openbsd | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/vm/centos b/tests/vm/centos index 7417b50af4..b00b46a8dc 100755 --- a/tests/vm/centos +++ b/tests/vm/centos @@ -66,8 +66,8 @@ class CentosVM(basevm.BaseVM): cimg =3D self._download_with_cache("https://cloud.centos.org/cento= s/7/images/CentOS-7-x86_64-GenericCloud-1802.qcow2.xz") img_tmp =3D img + ".tmp" sys.stderr.write("Extracting the image...\n") - subprocess.check_call(["cp", "-f", cimg, img_tmp + ".xz"]) - subprocess.check_call(["xz", "-dvf", img_tmp + ".xz"]) + subprocess.check_call(["ln", "-f", cimg, img_tmp + ".xz"]) + subprocess.check_call(["xz", "--keep", "-dvf", img_tmp + ".xz"]) subprocess.check_call(["qemu-img", "resize", img_tmp, "50G"]) self.boot(img_tmp, extra_args =3D ["-cdrom", self._gen_cloud_init_= iso()]) self.wait_ssh() diff --git a/tests/vm/freebsd b/tests/vm/freebsd index b0066017a6..5575c23a6f 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -34,8 +34,8 @@ class FreeBSDVM(basevm.BaseVM): img_tmp_xz =3D img + ".tmp.xz" img_tmp =3D img + ".tmp" sys.stderr.write("Extracting the image...\n") - subprocess.check_call(["cp", "-f", cimg, img_tmp_xz]) - subprocess.check_call(["xz", "-dvf", img_tmp_xz]) + subprocess.check_call(["ln", "-f", cimg, img_tmp_xz]) + subprocess.check_call(["xz", "--keep", "-dvf", img_tmp_xz]) if os.path.exists(img): os.remove(img) os.rename(img_tmp, img) diff --git a/tests/vm/netbsd b/tests/vm/netbsd index 4c6624ea5e..d0508f4465 100755 --- a/tests/vm/netbsd +++ b/tests/vm/netbsd @@ -34,8 +34,8 @@ class NetBSDVM(basevm.BaseVM): img_tmp_xz =3D img + ".tmp.xz" img_tmp =3D img + ".tmp" sys.stderr.write("Extracting the image...\n") - subprocess.check_call(["cp", "-f", cimg, img_tmp_xz]) - subprocess.check_call(["xz", "-dvf", img_tmp_xz]) + subprocess.check_call(["ln", "-f", cimg, img_tmp_xz]) + subprocess.check_call(["xz", "--keep", "-dvf", img_tmp_xz]) if os.path.exists(img): os.remove(img) os.rename(img_tmp, img) diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 2105c01a26..87ec982489 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -36,8 +36,8 @@ class OpenBSDVM(basevm.BaseVM): img_tmp_xz =3D img + ".tmp.xz" img_tmp =3D img + ".tmp" sys.stderr.write("Extracting the image...\n") - subprocess.check_call(["cp", "-f", cimg, img_tmp_xz]) - subprocess.check_call(["xz", "-dvf", img_tmp_xz]) + subprocess.check_call(["ln", "-f", cimg, img_tmp_xz]) + subprocess.check_call(["xz", "--keep", "-dvf", img_tmp_xz]) if os.path.exists(img): os.remove(img) os.rename(img_tmp, img) --=20 2.20.1 From nobody Tue Nov 11 03:17:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560973769; cv=none; d=zoho.com; s=zohoarc; b=UrQcUFMOws5BFamgmxZVF7v4DIMKMzxXYKIYIh4ToWjwg+BcB5Sev4HS4K1kCN/mZLW9NQbsmdYWavA5O6nmNnKBFPk+qzO9+q6mHzIoXWSqJUgw0ObuiH/xyHpM9nXrAhvC8mldfHhRHODh70WznM1ATIqVpoXiEB9YEqAMRaI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560973769; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=QOjApRFyonn/7Cn6p2ojwBNi3DBnLp0ky5fDJ7UyreM=; b=FumM8ILTiwcKvYMCmRqPuKTeQ/YDUcLReVJ2LzagTkhb8IWXYtAcrinK31KivAPfqlEdpPCruSNgghaZ9tu/FiLs30+P4LN+YVJE0T+tKrLvb7jN0yuxHAGKmNZaoJDMNLppfzO0VONW/4y+xkjLJHZshfTuMcxvkqfBoPCnelY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15609737691501017.5776116867364; Wed, 19 Jun 2019 12:49:29 -0700 (PDT) Received: from localhost ([::1]:41450 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdga7-0003Xo-Uc for importer@patchew.org; Wed, 19 Jun 2019 15:49:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53875) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgRW-00061J-AW for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdgRV-0008SI-2p for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:26 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:54856) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdgRU-0008Rk-So for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:25 -0400 Received: by mail-wm1-x341.google.com with SMTP id g135so669846wme.4 for ; Wed, 19 Jun 2019 12:40:24 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id c65sm1375701wma.44.2019.06.19.12.40.21 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jun 2019 12:40:22 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A53231FF8F; Wed, 19 Jun 2019 20:40:21 +0100 (BST) 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=QOjApRFyonn/7Cn6p2ojwBNi3DBnLp0ky5fDJ7UyreM=; b=CMVuiKkugnseipDzZesGcJkDxkHE4uiVbnBppHdgkmQB7s1Tsyy2+ABEjUjJc6tr4S ZY8TRLzR9QEvYIXXaWswWNzu2ldQzKDEIPuCKRA9argsWyHKwqSfw5tnhmc+JLihcZix zqZyW6VnxB1TTZKinUzaJ2RCp/mCFXdaY6kWweoUbXxSGesAhGFrBuV41tuRYTNhMGK0 xOFMvyIIsW9xXIQAXL7NBF16eTFKy38q2qHrAl3MIf1z3x+ERM7WQ82OjJjGspdS53Ac iLOuaiqMa9LOGK6EFcyB52UgifTlUmBUjAh5Qzwr3drjw6cLlcWmXPoqvt0+qZ9G8aQv ekQw== 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=QOjApRFyonn/7Cn6p2ojwBNi3DBnLp0ky5fDJ7UyreM=; b=leTR3v5Y3bSkApGiO4Cq+NJwnDvB7a8NHWTMeEhc2LgCN9CnOmZkXnUnnXN0d8k8E6 Ij9j4JSCVx6FUY/qFondhr+rkL2YQOVFb2yOazWKyUQm3z0+cSSsM123g7uIPW6+TImX y94YqoyFe6arI86exIqQINjlubZmIycrzCM2KpLOfXtpE8p4SYCgXfL5Aeb32k/vqZic lJsx4n8zz3YfigyvN/U8ZNnLkXTgnmiretllLv85X29iziDEaLyTqsgV9BtFMa1rEFk/ uZOBBJkISSItS6it1AKteaxdEe9aDXKmZn7/Rmanezf995I5z4YHEUg146zAB33LZT9K 5gbA== X-Gm-Message-State: APjAAAUdVeC21q/KqtmJpA7/8bjAT4cAWNDmEGHdAhyPxwUGLwd4LH1h oYKxVvyM9rC9DBnNqu3vxdVQiA== X-Google-Smtp-Source: APXvYqzK5vhglbYC5MmULok/KEnE0eaUAO1Dl9JLrQ9pYfYPz9kcBdF2MAEQcpYaHdnLZxNdqF/bwg== X-Received: by 2002:a1c:6a06:: with SMTP id f6mr9493478wmc.159.1560973223794; Wed, 19 Jun 2019 12:40:23 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 19 Jun 2019 20:40:06 +0100 Message-Id: <20190619194021.8240-3-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 Subject: [Qemu-devel] [PATCH v1 02/17] tests/vm: avoid image presence check and removal 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?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Cleber Rosa Python's os.rename() will silently replace an existing file, so there's no need for the extra check and removal. Reference: https://docs.python.org/3/library/os.html#os.rename Signed-off-by: Cleber Rosa Message-Id: <20190613130718.3763-3-crosa@redhat.com> Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/vm/centos | 2 -- tests/vm/freebsd | 2 -- tests/vm/netbsd | 2 -- tests/vm/openbsd | 2 -- tests/vm/ubuntu.i386 | 2 -- 5 files changed, 10 deletions(-) diff --git a/tests/vm/centos b/tests/vm/centos index b00b46a8dc..53976f1c4c 100755 --- a/tests/vm/centos +++ b/tests/vm/centos @@ -77,8 +77,6 @@ class CentosVM(basevm.BaseVM): self.ssh_root_check("systemctl enable docker") self.ssh_root("poweroff") self.wait() - if os.path.exists(img): - os.remove(img) os.rename(img_tmp, img) return 0 =20 diff --git a/tests/vm/freebsd b/tests/vm/freebsd index 5575c23a6f..091be1a065 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -36,8 +36,6 @@ class FreeBSDVM(basevm.BaseVM): sys.stderr.write("Extracting the image...\n") subprocess.check_call(["ln", "-f", cimg, img_tmp_xz]) subprocess.check_call(["xz", "--keep", "-dvf", img_tmp_xz]) - if os.path.exists(img): - os.remove(img) os.rename(img_tmp, img) =20 if __name__ =3D=3D "__main__": diff --git a/tests/vm/netbsd b/tests/vm/netbsd index d0508f4465..ee9eaeab50 100755 --- a/tests/vm/netbsd +++ b/tests/vm/netbsd @@ -36,8 +36,6 @@ class NetBSDVM(basevm.BaseVM): sys.stderr.write("Extracting the image...\n") subprocess.check_call(["ln", "-f", cimg, img_tmp_xz]) subprocess.check_call(["xz", "--keep", "-dvf", img_tmp_xz]) - if os.path.exists(img): - os.remove(img) os.rename(img_tmp, img) =20 if __name__ =3D=3D "__main__": diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 87ec982489..28c7d25e29 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -38,8 +38,6 @@ class OpenBSDVM(basevm.BaseVM): sys.stderr.write("Extracting the image...\n") subprocess.check_call(["ln", "-f", cimg, img_tmp_xz]) subprocess.check_call(["xz", "--keep", "-dvf", img_tmp_xz]) - if os.path.exists(img): - os.remove(img) os.rename(img_tmp, img) =20 if __name__ =3D=3D "__main__": diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386 index a22d137e76..12867b193f 100755 --- a/tests/vm/ubuntu.i386 +++ b/tests/vm/ubuntu.i386 @@ -80,8 +80,6 @@ class UbuntuX86VM(basevm.BaseVM): self.ssh_root_check("apt-get install -y libfdt-dev flex bison") self.ssh_root("poweroff") self.wait() - if os.path.exists(img): - os.remove(img) os.rename(img_tmp, img) return 0 =20 --=20 2.20.1 From nobody Tue Nov 11 03:17:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560974030; cv=none; d=zoho.com; s=zohoarc; b=F47vK3QUjchPf+oNH5lp/GJOorBsixnvkQnc5tDrukBf8lRH0xa3kq9TnRsWwEPhmcCrSEo4n5sOS9pKn6JnAZ0ccj9g2Szkq4HRbfOq4k52E3RwUck+k0iLC1kQql8ji3qYj8G6yY3f5vURTiSz1th1PDQTeZK3mG8SuHOYeUU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560974030; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=agoXBU9KBwBvYhLupQKySupZDhJoyEvavC+P1ObpTUI=; b=V62d5SeWwj9xopFFxOhfSpHSoC5oFEfp1EbU7C5Gmy7JQgAEQn0HOn0TqBpzhIK08r6WIg6Jigc/k0l1BcbZWIjbQG2+tl81I70FQh8s7SEWz3nkjRxRC2TfF3YArr6S5ykWyrDEDt7/w7RJwYzDa5njjU7+IkgGQNgPTI9Vwmo= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560974030663302.00825256948053; Wed, 19 Jun 2019 12:53:50 -0700 (PDT) Received: from localhost ([::1]:41480 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgeS-0007wM-KW for importer@patchew.org; Wed, 19 Jun 2019 15:53:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53896) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgRX-000643-Ct for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdgRW-0008TA-4x for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:27 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:37569) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdgRV-0008SS-Uh for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:26 -0400 Received: by mail-wm1-x32e.google.com with SMTP id f17so709071wme.2 for ; Wed, 19 Jun 2019 12:40:25 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id r2sm3356988wma.26.2019.06.19.12.40.22 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jun 2019 12:40:22 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B86581FF90; Wed, 19 Jun 2019 20:40:21 +0100 (BST) 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=agoXBU9KBwBvYhLupQKySupZDhJoyEvavC+P1ObpTUI=; b=LenmuXzHbJZYCZiqMPSJt1R8ChPKFru3KZsS+sKjyzc0whAIF7NtQ3dwN1K7zsOICy w1bT48CttJsIQ3R1T6LUolybx5swIE8PX3E6+9JwbQsXgnfHmrU6sVIXvU2y1a1dRHSg PMp3RjeG0arjOQ0UDXfOC9pK7Jr4ZRrs+YHw7Gh0+OLsyHQ7V+5bujLHWA35Yqn2j5Io 3UViTwYtLu+QoKM3OJnsrNPxwbVFaOfaTx0WkWLaxKfW5aEn7jZ7iMBCLrEfZIsfEyib tYsGL61+v6lAae6lRTEyVeV1UxF+U0IS2dXheFWhEfHgjVpfP31EmPk/JqocV9P3qj8q Luog== 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=agoXBU9KBwBvYhLupQKySupZDhJoyEvavC+P1ObpTUI=; b=A4n3vvL3rDavPvKnl4hAf2VfiLDROsTupNKRQtN4sZk7xuxKGbv/y8TyjwCj31uS6x gBclMIdLO25PRcZs9Z4C3WjXdOUJ5WN57AW5AkMFZ05WsyqnSEf/uZcEYcb6gql+5TBl XeVZ4J5Vw7JthARs/9BtrjJXUHL+cpAYEGDLkKqslkBhpbDdM2UATyrQxbqDNO+8LIqT l0V84W4THk/agL1KNi28cRHaUwV5CwqQ/B9zkLfTOqIhijVr459bm17lqRmQ67FbZle1 +PQXnGZ8FCh87/jdPftUvKVVMw8tfMJzZ2Q/WnUiTqtHvRE5t3ixy7V/wNRv81lKlpzv kHTw== X-Gm-Message-State: APjAAAXR9DgYZjCpLy1bhNN374XFOa+UbMm+i8+38qHCLf22kDWZ4eaI UHc3fen5+DiYOzr51wkm9uTw6Q== X-Google-Smtp-Source: APXvYqxQ70p/1m+zJpeYg7P6rt3DFikl+48jWNv3BPQdT/1S4OtgjAvVbT3Sfh+Ri+jAWmTRZcH46g== X-Received: by 2002:a1c:5453:: with SMTP id p19mr8935717wmi.148.1560973224759; Wed, 19 Jun 2019 12:40:24 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 19 Jun 2019 20:40:07 +0100 Message-Id: <20190619194021.8240-4-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32e Subject: [Qemu-devel] [PATCH v1 03/17] tests/vm: pin ubuntu.i386 image 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?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Cleber Rosa It's a good practice to always have the same components used in tests. According to: https://cloud-images.ubuntu.com/releases/16.04/ New images are released from time to time, and the "release/" directory points to the latest release. Let's pin to the latest available version, and while at it, set a hash for verification. Signed-off-by: Cleber Rosa Message-Id: <20190613130718.3763-4-crosa@redhat.com> Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/vm/ubuntu.i386 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386 index 12867b193f..7017e6d388 100755 --- a/tests/vm/ubuntu.i386 +++ b/tests/vm/ubuntu.i386 @@ -61,7 +61,9 @@ class UbuntuX86VM(basevm.BaseVM): return os.path.join(cidir, "cloud-init.iso") =20 def build_image(self, img): - cimg =3D self._download_with_cache("https://cloud-images.ubuntu.co= m/releases/16.04/release/ubuntu-16.04-server-cloudimg-i386-disk1.img") + cimg =3D self._download_with_cache( + "https://cloud-images.ubuntu.com/releases/16.04/release-201906= 05/ubuntu-16.04-server-cloudimg-i386-disk1.img", + sha256sum=3D"e30091144c73483822b7c27193e9d47346dd1064229da577c= 3fedcf943f7cfcc") img_tmp =3D img + ".tmp" subprocess.check_call(["cp", "-f", cimg, img_tmp]) subprocess.check_call(["qemu-img", "resize", img_tmp, "50G"]) --=20 2.20.1 From nobody Tue Nov 11 03:17:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560973771; cv=none; d=zoho.com; s=zohoarc; b=fBalpmc9vLKLre9PfVGqV+L8aZqJ9c2Eh64eUz/udveQvT+qDEj4Vf2b27GIlnbPhT9yKBnEAb8NbrulWK6vtP+Y4bpVVG7X4yh+PI4C0HMFP4mOv6ZtKaJBeVbiul5teTJezZybj9PEO1DwoWeDQJ3v7OARb5olS1Dn0P7DtFY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560973771; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=6j/tPjZmC3evFe7OoozCDsXFpBZiOXO2+h6m9FK7slk=; b=jv7OoHKpJ1MIcvA2HXeW7Vgaoc/aUdkNhWKCqg28TiTmy7ADmTrlzHeoS9WiUyNe1A8xXt/9n08t8viV2mltkFrblFSjudL9I3LrMEbM8qKZCbCRYZai1xH1Bmx577zTAInvcCGD5+QDU4/7xH1YMDOKsjS77jICza1gH/ttRw8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560973771182369.4417653828589; Wed, 19 Jun 2019 12:49:31 -0700 (PDT) Received: from localhost ([::1]:41452 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgaG-0003bp-19 for importer@patchew.org; Wed, 19 Jun 2019 15:49:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53904) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgRX-00064r-UI for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdgRW-0008Tr-VH for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:27 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:52108) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdgRW-0008T1-NA for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:26 -0400 Received: by mail-wm1-x342.google.com with SMTP id 207so694700wma.1 for ; Wed, 19 Jun 2019 12:40:26 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id v65sm3571592wme.31.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 CADC71FF91; Wed, 19 Jun 2019 20:40:21 +0100 (BST) 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=6j/tPjZmC3evFe7OoozCDsXFpBZiOXO2+h6m9FK7slk=; b=yLSSok3Qvl8AOpn0jUmJuUibKEqNNfg7Ajqpfj1TysSe6Iu+h9YRJqi8YKz4N+wOs+ 6FOtT4zzkTT4AeFRGxSVrVmWSkYnsOamIZiSnNMaSJtmQ9qwqgNZHvcMqXJdQYrhiUBg 5EgSEDWP2Ej6kLjmQbCGua8MvowKbv3o+PWNKphem6DwkWhYTggD2mjFXJF7oP2n+PDy Y5/0AOXiAZs5goOCQ5sSUjjsheY8h2IVTVjVv3SCwCkHliM6Ys/nb5PeT5wRDG25lcjw 50V31RSA3stpqKLAxibaX5M0wvowAaqC1gXcPdTXr5e1DyvOJlyQ1lumENot1E96LRWF T4nQ== 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=6j/tPjZmC3evFe7OoozCDsXFpBZiOXO2+h6m9FK7slk=; b=L8zRUOCp6iT3cfse4ofnXT1APoTpSCoFeE6HgEjWMmUesBi122O9ScMEAisfT8YRud UrmO3NzkbpiZ+IVnsKe+YEjWyW2By3BTuAWroPWRzOM2MlJ1y1mOpbntsvCCohUvBlU5 ZrcGZQxcyHcfCWGQD7EUNsaJA8Gx19V6bZ5A6y2lRpPGkt7pRbTX8caxprQpAqmfEq/v 9JyJ+WpYvsp9OH5+BlqNHhcY8ym4o9mIWj2PAtWOjuq/jo1sujUXgeo9Q59Mg3sKxvRx eA2r7OubjzO75t03xVMC2RklGZAwP23wojzZF9Jp1R2wBpxPMeFyySyKsyMf44DS/pqc u/ZA== X-Gm-Message-State: APjAAAU3N/OZQmp0i4l1U5/x8KtATOjhXAZ8vCWhsjPRX+Lux4+kJ6G0 PlKVfouGRCSpyYIBIYNhe0Ckiw== X-Google-Smtp-Source: APXvYqzjY6yaKnpsPn3Ou21UkSOrAVfEEZEp8n2C7Xmlg9gHc3ITAdGSDX7tGW7CrPKRoAaPyuj55g== X-Received: by 2002:a1c:7e85:: with SMTP id z127mr9804067wmc.95.1560973225536; Wed, 19 Jun 2019 12:40:25 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 19 Jun 2019 20:40:08 +0100 Message-Id: <20190619194021.8240-5-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 04/17] tests/vm: add source repos on ubuntu.i386 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?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Cleber Rosa Possibly because of different behavior on the newly update cloud-image, trying to run 'apt-get build-dep' results in: E: You must put some 'source' URIs in your sources.list This enables all source repos (even though some are not needed) for simplicity sake. Signed-off-by: Cleber Rosa Message-Id: <20190613130718.3763-5-crosa@redhat.com> Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/vm/ubuntu.i386 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386 index 7017e6d388..3ea459ee20 100755 --- a/tests/vm/ubuntu.i386 +++ b/tests/vm/ubuntu.i386 @@ -77,6 +77,7 @@ class UbuntuX86VM(basevm.BaseVM): time.sleep(5) self.wait_ssh() # The previous update sometimes doesn't survive a reboot, so do it= again + self.ssh_root_check("sed -ie s/^#\ deb-src/deb-src/g /etc/apt/sour= ces.list") self.ssh_root_check("apt-get update") self.ssh_root_check("apt-get build-dep -y qemu") self.ssh_root_check("apt-get install -y libfdt-dev flex bison") --=20 2.20.1 From nobody Tue Nov 11 03:17:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560973768; cv=none; d=zoho.com; s=zohoarc; b=epGbj84zjAsOH5aqX/48vyltjIcBEyD7SQrTAopeUrD7T73flPfl+MxCo7biZvNJykTR50EhEojxxHV5jpd8+yYFDhUIY5TBhIVuivsPxKWqaUK81EknX0seF4oLTAglJozq0YI0IZZ2pE9X+Du0q+PaaRbt1kclaNzEFzCw4aE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560973768; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=qdTjyQaBb0/jp//KyLcDmonBqL8NDTLZR4EMwIjuiJg=; b=ftEtKJG1U5Q0rc0FCzHxfYT7tTJh9BeBFjRIrh5ik6On1FnUeoqJX9PiQkoqQkUkwYawJFk8C/dRd4uOmqwIEV+yNmMttWAgNfaX/QDB5I1kE0ZEUnJVc1uct+zU3EZfWyY1RSJhgkQO0B3xAG4ZqZ8BFv8UOtEVx8PFpW0dq9E= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560973768873811.7263786998384; Wed, 19 Jun 2019 12:49:28 -0700 (PDT) Received: from localhost ([::1]:41454 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgaE-0003c4-1f for importer@patchew.org; Wed, 19 Jun 2019 15:49:27 -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) 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) 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-Google-Smtp-Source: APXvYqzDrYudV2r87KauE420Wnm/Nt62hqdSrM237yLMwfXyYKLsD4VDQ02JABe4i+pm3pfrZoXjug== X-Received: by 2002:adf:efc8:: with SMTP id i8mr11569882wrp.220.1560973226941; Wed, 19 Jun 2019 12:40:26 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=20Benn=C3=A9e?= , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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=C3=A9 Tested-by: Thomas Huth Message-Id: <20190617043858.8290-2-kraxel@redhat.com> Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/vm/basevm.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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 =3D "qemupass" ROOT_PASS =3D "qemupass" =20 + envvars =3D [ + "https_proxy", + "http_proxy", + "ftp_proxy", + "no_proxy", + ] + # The script to run in the guest that builds QEMU BUILD_SCRIPT =3D "" # The guest name, to be overridden by subclasses @@ -106,6 +113,8 @@ class BaseVM(object): "-o", "UserKnownHostsFile=3D" + os.devnull, "-o", "ConnectTimeout=3D1", "-p", self.ssh_port, "-i", self._ssh_key_file] + for var in self.envvars: + ssh_cmd +=3D ['-o', "SendEnv=3D%s" % var ] if interactive: ssh_cmd +=3D ['-t'] assert not isinstance(cmd, str) --=20 2.20.1 From nobody Tue Nov 11 03:17:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560973631; cv=none; d=zoho.com; s=zohoarc; b=TymFic9uitTa1y5pzLSMKwFG6ouUcfUfyKPuSrr9D3VVWKcCJQS2kmsaVJCxwWJt5OlZSOiUwmjyBumHBC3Vku3HMtv3r+k3OLENV3Moh2puhv5RL9U3rXKa07gUfV2YsVZSNLrPsQXvJAM6AK82mPdpvl4seMRnpb7KiZ9bf1Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560973631; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=xvCzdluYnrwYcHghSKZ/rlY7/FmiKtd1c7t0G93SmmQ=; b=GzBVGqqXbsenlNGGa0rRcQmmlY68yQfJqVl83xBE6VPr2hmneWbqCpS8n+IWS6+USx8Wy2dTcfA0xiLFz/Jq3UboNId43VqX2O6yR1IoyBoHhN7KiImczFov8B4no0XjkYqDVMp+FVfmhJDckPbBsxQ1hdynh1R1MsIPclZT/E8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560973631345970.9177552268569; Wed, 19 Jun 2019 12:47:11 -0700 (PDT) Received: from localhost ([::1]:41448 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgY0-0002qU-OY for importer@patchew.org; Wed, 19 Jun 2019 15:47:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53918) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgRY-00066e-JC for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdgRX-0008Vo-H4 for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:28 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:47059) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdgRX-0008Te-AN for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:27 -0400 Received: by mail-wr1-x441.google.com with SMTP id n4so440261wrw.13 for ; Wed, 19 Jun 2019 12:40:27 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 72sm15113657wrk.22.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 F01371FF93; Wed, 19 Jun 2019 20:40:21 +0100 (BST) 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=xvCzdluYnrwYcHghSKZ/rlY7/FmiKtd1c7t0G93SmmQ=; b=os/VqEbQx1wcOOru7EslrS0uy3sCxZpv4+20JudtT0TuXAeNfVuIhP4G3rpa7GR07y iBDi5ZT+Hkd06yHL9qs5AlDiF4X/zglUIQ6V0xH8HKWdAFaQAL/SLFoJsmuk+F5eLDTl eWMaVgLz9ku1v+3lWuESwEqXaC6lGaqDV8n6OvInmMVu+mByVgDbEwSBNDxk1OT5802y xEnikeNJ/QZIx1U1WfU2HU/IALmwWoyu+XIngM0tYSK6+nBJ13aNSOvpIHmza1QIiV5S F247UCvSwpg+RlhcKCYj0SGmiNpqFDQbZwlti0h+C9jG82Ke2fJB+3mFLWPuWCtVlh0j wLdw== 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=xvCzdluYnrwYcHghSKZ/rlY7/FmiKtd1c7t0G93SmmQ=; b=ctF2/egF0zbJXiTsz55ZhJyLHSQ3bZA1RPMy2F2iiVWgIAK4vaoq8UDLb0AyV6M+ee glYrf8I9Wm5j0ATS2y7zjjBWkzSM5+PRCgzhzVM/JhugKq76GTXrXnMAj+jzJeK5QQyE MgzVUdv9qiz9JvtwUGhGrukdZZbGf54bIHa/KZjwKvR+MJvwRcTjwyKBax6Fs3RsZvrK 25TAWODR5SvIBBl4AjixSZzdsHSP1KZUCMZ83jrEcPEM3L0dzMMXGFZh4Ay3jxBZakhM tfJ031J8ujhSHYnVY9LYyeCwKCfnWiV5WjnMT5HylyKiaE34Rq1GcEnEHAcqPGgHH8uV W0xA== X-Gm-Message-State: APjAAAV2w7j2y+F0RzyaCsgQzYZrQWTQw7nX9QCABjeM6Nm8JgugtRhd NdWZaPDK4BpFOW3iTWkKh+PXAA== X-Google-Smtp-Source: APXvYqzTCeAMareyZ/SX9QZ1NkkIAr5M6YMh4MYhr5aaWAgWG3i5D3QvJZB9JKhmSPO3MisvlTqIUA== X-Received: by 2002:a5d:5510:: with SMTP id b16mr53368161wrv.267.1560973226051; Wed, 19 Jun 2019 12:40:26 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 19 Jun 2019 20:40:10 +0100 Message-Id: <20190619194021.8240-7-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 06/17] tests/vm: use ssh with pty unconditionally 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=20Benn=C3=A9e?= , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Gerd Hoffmann Allways ask ssh to run with a pseudo terminal. Not having a terminal causes problems now and then. Signed-off-by: Gerd Hoffmann Tested-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20190617043858.8290-3-kraxel@redhat.com> [AJB: added PMD's r-b/t-b tags] Signed-off-by: Alex Benn=C3=A9e --- tests/vm/basevm.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 5e30bac661..395eefaec9 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -107,16 +107,14 @@ class BaseVM(object): os.rename(fname + ".download", fname) return fname =20 - def _ssh_do(self, user, cmd, check, interactive=3DFalse): - ssh_cmd =3D ["ssh", "-q", + def _ssh_do(self, user, cmd, check): + ssh_cmd =3D ["ssh", "-q", "-t", "-o", "StrictHostKeyChecking=3Dno", "-o", "UserKnownHostsFile=3D" + os.devnull, "-o", "ConnectTimeout=3D1", "-p", self.ssh_port, "-i", self._ssh_key_file] for var in self.envvars: ssh_cmd +=3D ['-o', "SendEnv=3D%s" % var ] - if interactive: - ssh_cmd +=3D ['-t'] assert not isinstance(cmd, str) ssh_cmd +=3D ["%s@127.0.0.1" % user] + list(cmd) logging.debug("ssh_cmd: %s", " ".join(ssh_cmd)) @@ -128,9 +126,6 @@ class BaseVM(object): def ssh(self, *cmd): return self._ssh_do(self.GUEST_USER, cmd, False) =20 - def ssh_interactive(self, *cmd): - return self._ssh_do(self.GUEST_USER, cmd, False, True) - def ssh_root(self, *cmd): return self._ssh_do("root", cmd, False) =20 @@ -284,9 +279,9 @@ def main(vmcls): return 2 =20 if args.interactive: - if vm.ssh_interactive(*cmd) =3D=3D 0: + if vm.ssh(*cmd) =3D=3D 0: return 0 - vm.ssh_interactive() + vm.ssh() return 3 else: if vm.ssh(*cmd) !=3D 0: --=20 2.20.1 From nobody Tue Nov 11 03:17:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560974243; cv=none; d=zoho.com; s=zohoarc; b=B1N4hWDCnwUFfI3VUYaol9i3rlCU0hLL9RLnRenDL5vy9r7iR7W5LRB1+ltl/EMF9RWyAsvw8nLIh+fqzqKXswwg6rojx96hwSY8ZSzUeBwlWFkrF7RiFfsyL7SEzc04vWMuLbLJNztdr0HqYhLVBqQ0ACRuGFPw3mdzMTgW+jA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560974243; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=+wqq4GBFQwrMJ04FlDJ+2L8IS0oLTrKe+hT5DciI8mk=; b=KH4+8zxdEHSINm67qLMa4IlfqXuSlpqwKPpCg1PgTUk0CqpiSz7+7Ht5EWEI0jvuxIK+LGg5KlHXXy7CDeougquOm4ET5Zf80CY/dCqe9lttOGwxyJYF2oMIpCHfXpaI2jYpgcKDeJRZJg5pgaKM2YS0naV10xhZj23IDrf+y50= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560974243064595.0407145288505; Wed, 19 Jun 2019 12:57:23 -0700 (PDT) Received: from localhost ([::1]:41508 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdghu-0003GM-2q for importer@patchew.org; Wed, 19 Jun 2019 15:57:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53944) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgRc-0006AA-Kh for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdgRa-000098-Rl for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:32 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:32868) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdgRZ-00006K-K2 for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:30 -0400 Received: by mail-wr1-x42a.google.com with SMTP id n9so528650wru.0 for ; Wed, 19 Jun 2019 12:40:29 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id h21sm1393459wmb.47.2019.06.19.12.40.23 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jun 2019 12:40:26 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0E50D1FF96; Wed, 19 Jun 2019 20:40:22 +0100 (BST) 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=+wqq4GBFQwrMJ04FlDJ+2L8IS0oLTrKe+hT5DciI8mk=; b=JBAffJZGJkFH+KR0qxTHczfggE5KA8gE60L7XjGcbcFnlOJp8KCCErxUxkN0CnsdJu 9G+kZHo485AOxm+xFbqAaDS8gwfkSOaMjzCEd80+c/DjSFKp9GF6Lyxezue2EXiOb7IA 072gwJrYsVoFrvNej8gq/r9sfzXak+Mpof/tS0/cxPc4Nx0aWAN/8q1X4HsGZJF7jI2D kAgeAm30jJssYrgU0kVJktIZ6UhXcAQUkSsd8PuJGvOHrjeIdLO98b6WVmDHC1svdhDJ ZZO7jr41HkfdxeO46Qpkfgaec46fk5l9AIRreAzbbLQhTb0vj8IjLxYrfNPVUaukwWgK EPTg== 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=+wqq4GBFQwrMJ04FlDJ+2L8IS0oLTrKe+hT5DciI8mk=; b=k6zbQJZMy3Yt8RON6TRr0JpT1qs6Enau8wiNksm1A/oic20whvaljzapUqaIHXReqF 66Bs8Rk5oE2fDLCInKSyYJVigP6ZDQepmpBkr/lcRsDCmbwc0JZHLF77cMXcsglGFPyk zC/lYnw2rJKrKG6yT2Nt4XClzWQCWqMXhd2NKBw4lDD4lMMQdNToND/WWO9sQQX/B3Nv kMVMIL62kV7tFh1HqsLiu3qdUQvBeDc1Eh3qJ9mroA25oQenIwdOCSFJx/td5+tFnO4f kJddeVJsu+7WsemE9KqVHAsk6i+C/1Z1RWDLpkGieyvdmJcW5DDK28C/93/3zDj2r7Bj es/w== X-Gm-Message-State: APjAAAUiCklwo4WhBHWqjh1qubvzrhMSBbfbrbVhoZAm6n3nH2T31UK5 /0OrR8YFnyPyNUig/xQoRd3cIA== X-Google-Smtp-Source: APXvYqxbdgnf51WIen5ArtHQyCo3PGoecalB+HW0svrxBvH/r+WjQ4BPoS71gIe7SLNUQ0DrTmRbWw== X-Received: by 2002:adf:ce8f:: with SMTP id r15mr76694975wrn.122.1560973227907; Wed, 19 Jun 2019 12:40:27 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 19 Jun 2019 20:40:11 +0100 Message-Id: <20190619194021.8240-8-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42a Subject: [Qemu-devel] [PATCH v1 07/17] tests/vm: run test builds on snapshot 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 , Ed Maste , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Gerd Hoffmann The build script doesn't shutdown the guest VMs properly, which results in filesystem corruption and guest boot failures sooner or later. Use the --snapshot to run builds on a snapshot, That way killing the VM doesn't corrupt the base image. Signed-off-by: Gerd Hoffmann Tested-by: Thomas Huth Acked-by: Ed Maste Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20190617043858.8290-4-kraxel@redhat.com> [AJB: added tags] Signed-off-by: Alex Benn=C3=A9e --- tests/vm/Makefile.include | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index c59411bee0..276b870216 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -57,6 +57,7 @@ vm-build-%: $(IMAGES_DIR)/%.img $(if $(V),--verbose) \ --image "$<" \ $(if $(BUILD_TARGET),--build-target $(BUILD_TARGET)) \ + --snapshot \ --build-qemu $(SRC_PATH) -- \ $(if $(TARGET_LIST),--target-list=3D$(TARGET_LIST)) \ $(if $(EXTRA_CONFIGURE_OPTS),$(EXTRA_CONFIGURE_OPTS)), \ --=20 2.20.1 From nobody Tue Nov 11 03:17:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560974245; cv=none; d=zoho.com; s=zohoarc; b=bx2d3w/3bcYGtTY/QwDIHN+H/rhCL7MMtAdMvnFcLMFm4b04D+9RUnVpPnA4z1327STS0QiaMiqdJAADGgmRPKx+qnc6TZ1yf2XrP/AC77CGsRD4lvAldYhTHC/8Vd4I2e2uiVDTmCsnfYRp/o6iIMAPYvPq8WYuOF+Naz2JSeA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560974245; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=XPPAW9sETduxZJ0ooFzD4w+7btkzMy95F7Mgcr+ef2Q=; b=KHKFQKPtKscvwoAU5YCMrrbi7+Nm2FV6qXOFT60+E8rwxnWCYXdpEOsfMvWQhUIvQqiYt1MGHB9IbfcUeMo1KmQGGjOnx8shatN3lSy3dfK3ZEoW1z/coeodBQTHKpQzrkrMsu5SCbRql0wy13UCpEl3ZVAaGSJTsNdtnxOQ55c= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560974245278830.1306850004602; Wed, 19 Jun 2019 12:57:25 -0700 (PDT) Received: from localhost ([::1]:41510 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdghw-0003Jy-7v for importer@patchew.org; Wed, 19 Jun 2019 15:57:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53971) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgRe-0006AW-IM for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdgRc-0000Al-Io for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:34 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:39008) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdgRa-00007A-Pr for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:30 -0400 Received: by mail-wr1-x42e.google.com with SMTP id x4so487840wrt.6 for ; Wed, 19 Jun 2019 12:40:29 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id t14sm14845097wrr.33.2019.06.19.12.40.23 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jun 2019 12:40:26 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 210121FF98; Wed, 19 Jun 2019 20:40:22 +0100 (BST) 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=XPPAW9sETduxZJ0ooFzD4w+7btkzMy95F7Mgcr+ef2Q=; b=rxqFVkAIueAr1gkdbJPVfgsA4HfIDUpegE4dnUx3mBtXWfbr0IC8WBqkHqj0+0DUfL 3xk+Lp/BZVqSgKAO83vlk1r6L2j1LxOJ9rVoIvNkUkGsWYnukmkYG043FT/8WZAN1xnt gqdxmT8X6XSJrssBodM3SBLPtv7V1w7Vi/HybQaxA+kXV2opOzOhaRY1sirQxEBTO89S WhxvT5WKTuhwIwyFEWdi4nsjTkPPM4miy8uKDeJdibAG8jW1IAMTlOUm3y+e9wr+kg6B RpmqTPnET2VCqx/Uan99kQcqwDoGMN/HRjOPWuFHOsLZOBwCPCNkfSbPKK68V22qde7B k2Rw== 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=XPPAW9sETduxZJ0ooFzD4w+7btkzMy95F7Mgcr+ef2Q=; b=PecIkEs8iO/0gZIte8x554+nhZ9giTU2gGnh8gvZMQ793gzMflCs0j087D7W6h3EBy aieqvcNosqACOmC3G+B5DHYp1ZCtbPOFqMexTGZ0SCAMt881YKJ4bu2sQAAkj4L7F9Wh 3T1krZ8odLJ/ACYQephpBo6WQj8orb2ikRA3/SvTGzOiCpf2AMMUNN/XAr1Lf8suEBpC BSwXbKythm9ul/VEoCvlxR19H+8S5bSa3JslCxEsoqTwIdAoe7SaJgGvuwYOgTLB6LAF rSQxdZWMk6GfVNVYu/Ub28BXRurwjUPun1N5t0ooZAEJYSM00K5rhMya1vyfLsfDS0HM Jdyw== X-Gm-Message-State: APjAAAUPKaMAuiImXAAasdeVqiOtO4of1MFWAZlrQVUp7z6bTc7XkXrf UMSnA0tzI6FNrTMcj6M/JEXCWw== X-Google-Smtp-Source: APXvYqyQJ3F7R6BDKj086DqngrKCLhq7ddVn56j56JTw3h0u7Oe+LDHahgzuem3IpXko//D6dOOH5g== X-Received: by 2002:a5d:618d:: with SMTP id j13mr10421354wru.195.1560973228499; Wed, 19 Jun 2019 12:40:28 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 19 Jun 2019 20:40:12 +0100 Message-Id: <20190619194021.8240-9-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42e Subject: [Qemu-devel] [PATCH v1 08/17] tests/vm: proper guest shutdown 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=20Benn=C3=A9e?= , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Gerd Hoffmann When not running in snapshot mode ask the guest to poweroff and wait for this to finish instead of simply quitting qemu, so the guest can flush pending updates to disk. Signed-off-by: Gerd Hoffmann Tested-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20190617043858.8290-5-kraxel@redhat.com> [AJB: added tags] Signed-off-by: Alex Benn=C3=A9e --- tests/vm/basevm.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 395eefaec9..f27178f3c7 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -51,6 +51,8 @@ class BaseVM(object): name =3D "#base" # The guest architecture, to be overridden by subclasses arch =3D "#arch" + # command to halt the guest, can be overridden by subclasses + poweroff =3D "poweroff" def __init__(self, debug=3DFalse, vcpus=3DNone): self._guest =3D None self._tmpdir =3D os.path.realpath(tempfile.mkdtemp(prefix=3D"vm-te= st-", @@ -202,6 +204,10 @@ class BaseVM(object): def wait(self): self._guest.wait() =20 + def graceful_shutdown(self): + self.ssh_root(self.poweroff) + self._guest.wait() + def qmp(self, *args, **kwargs): return self._guest.qmp(*args, **kwargs) =20 @@ -278,11 +284,13 @@ def main(vmcls): traceback.print_exc() return 2 =20 - if args.interactive: - if vm.ssh(*cmd) =3D=3D 0: - return 0 + exitcode =3D 0 + if vm.ssh(*cmd) !=3D 0: + exitcode =3D 3 + if exitcode !=3D 0 and args.interactive: vm.ssh() - return 3 - else: - if vm.ssh(*cmd) !=3D 0: - return 3 + + if not args.snapshot: + vm.graceful_shutdown() + + return exitcode --=20 2.20.1 From nobody Tue Nov 11 03:17:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560974042; cv=none; d=zoho.com; s=zohoarc; b=mzs9BLpgqPEiXCVMUEmKsH57f9GGPeZji40HKIN8L6rVrDviH6obvMcX2zkPNOZEZSTl/U1ATRUGbziJmnsRwSy6D5zNy86hdkQo9/5dLzBmb4zTbI2ZQ+1w8EgUvIupQwSSMpS162hyv5HGUEfw/228M5MJ0K6oeWcEwmDedlg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560974042; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ARkcebMpISH50aw23FUa04C3Oh1jK41sh6r3OqpObcE=; b=l5d6US8iqJs8cixKAMMUZzwOjkUg1gp4JG/53LCcOQRiezMSRk8TDWF4Dxs0pU50NM4Ep5zx41NlwZl/TUZXesJUpdgT5mlbxBrnvYvMSNeryy/cHV9HoxJX5cuzeO6jZBuX7rKDsMOHBDEiUhygOQX2AA+ndKfDQZF2hKPwX5Q= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156097404267398.98413330972619; Wed, 19 Jun 2019 12:54:02 -0700 (PDT) Received: from localhost ([::1]:41482 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgec-000800-Ku for importer@patchew.org; Wed, 19 Jun 2019 15:53:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53975) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgRf-0006AZ-3y for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdgRc-0000As-Ji for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:34 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:36963) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdgRa-000086-Qw for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:31 -0400 Received: by mail-wr1-x432.google.com with SMTP id v14so497639wrr.4 for ; Wed, 19 Jun 2019 12:40:30 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id q193sm2271869wme.8.2019.06.19.12.40.24 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jun 2019 12:40:26 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 335AA1FF99; Wed, 19 Jun 2019 20:40:22 +0100 (BST) 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=ARkcebMpISH50aw23FUa04C3Oh1jK41sh6r3OqpObcE=; b=g3c1KA5KzxMalCXecUFEgbFY2TZc7+/4CRaeus3y47wJWdOMq+XNCULHOUIj5XXxQG oJ2LIrP3N1rRf2PY8B14w1vF51S3/iF1rec6TvWmPEW43GJ9bTk6C6physJEWswcKVg5 gstdR0ZOuhzGkpgJT+q9+JwTG9Vu4KyBwKwqfjb7plmjk8jbQYo1kwXD+UvXDgV7igNa Xs3IZH5sGojGGDjh8gHxePDAKQbLCHuV9KStb5ErbzeiQXp7QejJikQ/B9fZWbx4WVc5 laTaTmMP/6ofC9LoSybNLm0OE1Er03Rd5uDZgJuOt88bk/n+7ch+ckTBCC7O5RIRKsra nBNw== 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=ARkcebMpISH50aw23FUa04C3Oh1jK41sh6r3OqpObcE=; b=TWfiE75I8j+5WGA9XzF4DHDojdrmMJSxQOUCUfszHukFBdm3j3ZjKpofIv5LWQvEuy j8uXOUsW5EY4rAs98VuSt+R7zSHtxyDzbmlSdS50OO8aH0ZLVGEOJKQAKRleN9b6Dlbk waEvv2L2OaBjQn8BV+3AVKxENCKXM/5FWZqjAltbyWIM6xYB09XHI4ugHbd0KsaRdKZJ OFzcxvsfU8uYWvYS+uM69YZBsSb/MqlOFrUhhcX/BaXafXhjvqYTAQd093cL9MeZkhlY MeAC8oD+8Iev/VE26X1lEiwSFEcrGvnM7wGEn3yM4MCgAnlPzZ8CuZR/qZRTXWqRkjdv Km/Q== X-Gm-Message-State: APjAAAVWAai/n5mJAfTRDPiCI/7IdCAKexBY+5aJXaqSSPL+lb9ZMETr R13K/6bRSfBeF+JS6lZl04XzJw== X-Google-Smtp-Source: APXvYqxn/9gU9fD/fyQWPIKvIuFNlpZzSu6sHpYuQfchSBkYk0CaxLb7GMJF2N2Qo20ZmZwYuOC4eQ== X-Received: by 2002:adf:b1ca:: with SMTP id r10mr10910899wra.156.1560973229277; Wed, 19 Jun 2019 12:40:29 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 19 Jun 2019 20:40:13 +0100 Message-Id: <20190619194021.8240-10-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::432 Subject: [Qemu-devel] [PATCH v1 09/17] tests/vm: add vm-boot-{ssh, serial}- targets 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=20Benn=C3=A9e?= , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Gerd Hoffmann For testing/troubleshooting convenience. make vm-boot-serial- Boot guest, with the serial console on stdio. make vm-boot-ssh- Boot guest, login via ssh. Signed-off-by: Gerd Hoffmann Tested-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20190617043858.8290-6-kraxel@redhat.com> [AJB: added tags] Signed-off-by: Alex Benn=C3=A9e --- tests/vm/Makefile.include | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index 276b870216..a61c236b8e 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -20,6 +20,10 @@ vm-test: @echo " vm-build-all - Build QEMU in all VMs" @echo " vm-clean-all - Clean up VM images" @echo + @echo "For trouble-shooting:" + @echo " vm-boot-serial- - Boot guest, serial console on = stdio" + @echo " vm-boot-ssh- - Boot guest and login via ssh" + @echo @echo "Special variables:" @echo " BUILD_TARGET=3Dfoo - Override the build target" @echo " TARGET_LIST=3Da,b,c - Override target list in builds" @@ -63,3 +67,18 @@ vm-build-%: $(IMAGES_DIR)/%.img $(if $(EXTRA_CONFIGURE_OPTS),$(EXTRA_CONFIGURE_OPTS)), \ " VM-BUILD $*") =20 +vm-boot-serial-%: $(IMAGES_DIR)/%.img + qemu-system-x86_64 -enable-kvm -m 4G -smp 2 -nographic \ + -drive if=3Dnone,id=3Dvblk,cache=3Dwriteback,file=3D"$<" \ + -netdev user,id=3Dvnet \ + -device virtio-blk-pci,drive=3Dvblk \ + -device virtio-net-pci,netdev=3Dvnet \ + || true + +vm-boot-ssh-%: $(IMAGES_DIR)/%.img + $(call quiet-command, \ + $(SRC_PATH)/tests/vm/$* \ + --image "$<" \ + --interactive \ + false, \ + " VM-BOOT-SSH $*") || true --=20 2.20.1 From nobody Tue Nov 11 03:17:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560973371; cv=none; d=zoho.com; s=zohoarc; b=iJzXeMmA7lJ1Ogx0SEhS6z3wGFYBRxHBraQVPbsIa+gBy9syuqktB/Xsw+R+rrC51ykCYduMri8gc87SG1c6cq1PY8+QqY+nn+iz1ToHFc8uyT/6vPIiHsfMMS7wFDaKqMsmRjRbRA/lAbVOCT3jylHa6C/hm/akJJfaxyzcWY8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560973371; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=L6XVojZ9d06YYw7Qa0xt+OkZV+Iz6HolpHL92sjbbUE=; b=aEG9YGwIzQxg3yqT8n2EpE0sJvKL7IYrYmkU0pZZKRGxtUvzZjLB9dL9zANyHspacSjSQkDDPe89GJnPQzugeYVQNMd56FH1gOeIiZjcoLGGO57vvCnZfxiwaSNtW6YEJvcHOXng/XuGiYYU+y2lFlucaSDC5XtOtl9wHmXetdI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560973371864501.8604912543983; Wed, 19 Jun 2019 12:42:51 -0700 (PDT) Received: from localhost ([::1]:41424 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgTn-0007u4-Lb for importer@patchew.org; Wed, 19 Jun 2019 15:42:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53976) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgRf-0006Aa-4E for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdgRc-0000BF-P3 for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:34 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:35085) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdgRc-00008r-I1 for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:32 -0400 Received: by mail-wm1-x329.google.com with SMTP id c6so723874wml.0 for ; Wed, 19 Jun 2019 12:40:31 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id o8sm19763322wrj.71.2019.06.19.12.40.24 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jun 2019 12:40:27 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4687D1FF9A; Wed, 19 Jun 2019 20:40:22 +0100 (BST) 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=L6XVojZ9d06YYw7Qa0xt+OkZV+Iz6HolpHL92sjbbUE=; b=SMXD36BfIHTjJWHy9gfisDuwrT/MWMlDBAWWvldMH67j0POs+IOigPjdaJb1R8c/yV 1pnrQiqU/YcilMGhjQ9ObG85L5cZalaVUvNvkoVHEkYqoZ/jUppI55jvWOWX1BXcC7nY iXnWD3IYZi7rw4bXLSTxFxLgt5fRANOmYr6EPWJ1+AAXGIWF8zGwV19Afi8FCS/IN0rZ PVQ7JQUWGRPkKQu+/+CJ36rT03gYCEV0T20S7zb04pX6k4rvvm90w1yNcrFBVfKidFpJ QDGd7XCGJEAAJ9egPvG85Q3MlobVtvXVCJkXppgarFpiHzm0icVkUwjVDeaJLM+x5+zR AyBA== 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=L6XVojZ9d06YYw7Qa0xt+OkZV+Iz6HolpHL92sjbbUE=; b=oWdpqS6GKN8Y/AvfJSFmdGiZW/UwX3aMG39qMiZ1z0OII7ydcA/VQQcZ263MMIquQ4 wX5FLYJn/ty/5OGZC9xKjxHxK5C24CjtEVdcI+XcieGIFKzPJFdDMzRNhP5nZpiDRIAm E15DJLnBcRoGgJu0PxtaiAyj2pLjKNtzJcBl/6rSZ+SfD25FjyeIu9kGWT+VxNTpAanc sb++511A2K0vVSkh+6PoocSlDpKY31D6hWqXFNx061zWXwztxERhvOQW1hHhtd/N/EjN JkZI7ZKE+mu6RPFesE3H9F8+eo3Sw3rzrDOn+OH8i5lKu1hrMte2bKsalmo/k4FqLKcK Kbdg== X-Gm-Message-State: APjAAAU4n1mvwIN6MzdnmzRWlPZLxJfAaSvRPTQEaTlYZyxsA+KVTlm3 hgdOfraCkeFQk62lWat16JXpeQ== X-Google-Smtp-Source: APXvYqwmJEwF2wrI6fznHj7HQukUNz6DJSFELiZnnSGtFzCqA5MHkXZ+Uha92zXvMZOYEVJLN6rm6Q== X-Received: by 2002:a1c:a848:: with SMTP id r69mr9323555wme.12.1560973229821; Wed, 19 Jun 2019 12:40:29 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 19 Jun 2019 20:40:14 +0100 Message-Id: <20190619194021.8240-11-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::329 Subject: [Qemu-devel] [PATCH v1 10/17] tests/vm: serial console support helpers 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=20Benn=C3=A9e?= , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Gerd Hoffmann Add a bunch of helpers to talk to the guest using the serial console. Also drop the hard-coded -serial parameter for the vm so QEMUMachine.set_console() actually works. Signed-off-by: Gerd Hoffmann Tested-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20190617043858.8290-7-kraxel@redhat.com> [AJB: added tags] Signed-off-by: Alex Benn=C3=A9e --- tests/vm/basevm.py | 86 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 83 insertions(+), 3 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index f27178f3c7..592a344773 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -2,10 +2,11 @@ # # VM testing base class # -# Copyright 2017 Red Hat Inc. +# Copyright 2017-2019 Red Hat Inc. # # Authors: # Fam Zheng +# Gerd Hoffmann # # This code is licensed under the GPL version 2 or later. See # the COPYING file in the top-level directory. @@ -13,7 +14,9 @@ =20 from __future__ import print_function import os +import re import sys +import socket import logging import time import datetime @@ -79,8 +82,7 @@ class BaseVM(object): "-cpu", "max", "-netdev", "user,id=3Dvnet,hostfwd=3D:127.0.0.1:0-:22", "-device", "virtio-net-pci,netdev=3Dvnet", - "-vnc", "127.0.0.1:0,to=3D20", - "-serial", "file:%s" % os.path.join(self._tmpdir, "serial.out"= )] + "-vnc", "127.0.0.1:0,to=3D20"] if vcpus and vcpus > 1: self._args +=3D ["-smp", "%d" % vcpus] if kvm_available(self.arch): @@ -162,6 +164,8 @@ class BaseVM(object): logging.debug("QEMU args: %s", " ".join(args)) qemu_bin =3D os.environ.get("QEMU", "qemu-system-" + self.arch) guest =3D QEMUMachine(binary=3Dqemu_bin, args=3Dargs) + guest.set_machine('pc') + guest.set_console() try: guest.launch() except: @@ -184,6 +188,82 @@ class BaseVM(object): raise Exception("Cannot find ssh port from 'info usernet':\n%s= " % \ usernet_info) =20 + def console_init(self, timeout =3D 120): + vm =3D self._guest + vm.console_socket.settimeout(timeout) + + def console_log(self, text): + for line in re.split("[\r\n]", text): + # filter out terminal escape sequences + line =3D re.sub("\x1b\[[0-9;?]*[a-zA-Z]", "", line) + line =3D re.sub("\x1b\([0-9;?]*[a-zA-Z]", "", line) + # replace unprintable chars + line =3D re.sub("\x1b", "", line) + line =3D re.sub("[\x00-\x1f]", ".", line) + line =3D re.sub("[\x80-\xff]", ".", line) + if line =3D=3D "": + continue + # log console line + sys.stderr.write("con recv: %s\n" % line) + + def console_wait(self, expect): + vm =3D self._guest + output =3D "" + while True: + try: + chars =3D vm.console_socket.recv(1) + except socket.timeout: + sys.stderr.write("console: *** read timeout ***\n") + sys.stderr.write("console: waiting for: '%s'\n" % expect) + sys.stderr.write("console: line buffer:\n") + sys.stderr.write("\n") + self.console_log(output.rstrip()) + sys.stderr.write("\n") + raise + output +=3D chars.decode("latin1") + if expect in output: + break + if "\r" in output or "\n" in output: + lines =3D re.split("[\r\n]", output) + output =3D lines.pop() + if self.debug: + self.console_log("\n".join(lines)) + if self.debug: + self.console_log(output) + + def console_send(self, command): + vm =3D self._guest + if self.debug: + logline =3D re.sub("\n", "", command) + logline =3D re.sub("[\x00-\x1f]", ".", logline) + sys.stderr.write("con send: %s\n" % logline) + for char in list(command): + vm.console_socket.send(char.encode("utf-8")) + time.sleep(0.01) + + def console_wait_send(self, wait, command): + self.console_wait(wait) + self.console_send(command) + + def console_ssh_init(self, prompt, user, pw): + sshkey_cmd =3D "echo '%s' > .ssh/authorized_keys\n" % SSH_PUB_KEY.= rstrip() + self.console_wait_send("login:", "%s\n" % user) + self.console_wait_send("Password:", "%s\n" % pw) + self.console_wait_send(prompt, "mkdir .ssh\n") + self.console_wait_send(prompt, sshkey_cmd) + self.console_wait_send(prompt, "chmod 755 .ssh\n") + self.console_wait_send(prompt, "chmod 644 .ssh/authorized_key= s\n") + + def console_sshd_config(self, prompt): + self.console_wait(prompt) + self.console_send("echo 'PermitRootLogin yes' >> /etc/ssh/sshd_con= fig\n") + for var in self.envvars: + self.console_wait(prompt) + self.console_send("echo 'AcceptEnv %s' >> /etc/ssh/sshd_config= \n" % var) + + def print_step(self, text): + sys.stderr.write("### %s ...\n" % text) + def wait_ssh(self, seconds=3D300): starttime =3D datetime.datetime.now() endtime =3D starttime + datetime.timedelta(seconds=3Dseconds) --=20 2.20.1 From nobody Tue Nov 11 03:17:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560974247; cv=none; d=zoho.com; s=zohoarc; b=akuAZ/l91M5qQciWsW2dntn+/u9goBiXQesZHY8Uyh+hqYTpd465kQ/9bTc14oumZuvBaF6GCn/C9QPXRtAKn8fiacWnx6bXEQthQAJf7CW68CU0W2LYEGgrYbVQNyZqxW8eRaFuuPQVCIpFetCCcI75w6cUzyPJc29TBCpDubQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560974247; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=3soHcxEWb8Oo7T3dyQPwcUMo7qCQ9tsZ0YvPTKHGaVI=; b=Bz1ePXVItTD+ig+rTLLwpr/uRsT+u4BageNbUq5jBJudqWOdDx8cxYYC3UT54r4qmK7hDC8DXeRG/UVwTHPWZQnX1Ejs03IOhc1Byw/hx3aLyJBKjPB059CDDwavSWGYxa5KY63KnXj9rSa1+qOAjz2Sob361oxuTZKAEWjlb5g= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560974247322617.2273919379054; Wed, 19 Jun 2019 12:57:27 -0700 (PDT) Received: from localhost ([::1]:41512 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdghy-0003Ns-A6 for importer@patchew.org; Wed, 19 Jun 2019 15:57:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56002) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgYu-0003vp-Ci for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:48:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdgYn-00068A-Eb for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:47:59 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:38003) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdgYk-0005cI-Sn for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:47:55 -0400 Received: by mail-wr1-x436.google.com with SMTP id d18so512176wrs.5 for ; Wed, 19 Jun 2019 12:47:22 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 11sm2929838wmd.23.2019.06.19.12.47.18 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jun 2019 12:47:18 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5A0791FF9B; Wed, 19 Jun 2019 20:40:22 +0100 (BST) 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=3soHcxEWb8Oo7T3dyQPwcUMo7qCQ9tsZ0YvPTKHGaVI=; b=CyTVKeqhbbV4p2Rf4mMdXfImygY3yvfvHBDCn1MWTpivITX3Q/ITsjB74nMpx0gzz0 cjg5AAy/Vk03gq9Sr8S2UvxrJYOhmP3degDIi6Cvcb3vGVfWtJDlbefxZ/YAxRmkeYVQ JpPVVkdJz4Nf6JhE68eH895ICPmiKtUU3++iHtNV98UXAiJrMMOADt8rkfikgDmUe8Ow /drTn+MNjsj24gVmxY2mqA+4zPriEPCIcMai/jlxepeJQCkQy5UvCrb6bQkxoJBSPiYq dheTWmAXQMOTt/6ZuW6kt7/J/GCkP/wxkvL9uP26pE6Y4cSMw5RD+gdz/Acthwi+3Ifb O2Sg== 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=3soHcxEWb8Oo7T3dyQPwcUMo7qCQ9tsZ0YvPTKHGaVI=; b=pnMTgypGL4Mq9gQntBiJOxI0cTjHZhuTTThCtFKWJN/PGHU034X4JU31/SVrZB2QRN PoBYyIuU7vtMNheur8LRvWkQhXFYDNhpIpa5/l3uYOm47tXwSVTe9wKai+5MKGuaNvl1 UFWSV+vO69vpniD7fMn6rwPzL4GuY9q7uVV+L7FhzK7DHzMyJb/a3a4l92H2u08oq5rI ntTUuGmrEYYQksUwveKRRqJ4vwfuZd8r0NsNk+4jx5s1rW6hCIRLnLnhPtGnZk+Ny9AI wnBFBcqRKE7TXB0pJUk+IiaFZp0Jcsg4SdIR0L3KwydB4sajvMLliadfet6kokcsfBA0 tSkg== X-Gm-Message-State: APjAAAV2ge/GFzPmrLeOk9zbmyS4Yyoa928LHDkN92IwyOqBhm7PsR9H kRYAOcUu52Z5Q1XPjmnYExXcQg== X-Google-Smtp-Source: APXvYqz7tqJCIvCqChug9LYAO57isP5JJSX9Gbz9l/r5jHdnByRjAwb8lqIhHpyKRHEwy6xmmqenGg== X-Received: by 2002:adf:9dcc:: with SMTP id q12mr19243243wre.6.1560973641075; Wed, 19 Jun 2019 12:47:21 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 19 Jun 2019 20:40:15 +0100 Message-Id: <20190619194021.8240-12-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::436 Subject: [Qemu-devel] [PATCH v1 11/17] tests/vm: openbsd autoinstall, using serial console 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=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann , Brad Smith Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Gerd Hoffmann Instead of fetching the prebuilt image from patchew download the install iso and prepare the image locally. Install to disk, using the serial console. Create qemu user, configure ssh login. Install packages needed for qemu builds. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20190617043858.8290-8-kraxel@redhat.com> [AJB: added tags] Signed-off-by: Alex Benn=C3=A9e --- tests/vm/openbsd | 161 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 148 insertions(+), 13 deletions(-) diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 28c7d25e29..b92c39f89a 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -2,10 +2,11 @@ # # OpenBSD VM image # -# Copyright 2017 Red Hat Inc. +# Copyright 2017-2019 Red Hat Inc. # # Authors: # Fam Zheng +# Gerd Hoffmann # # This code is licensed under the GPL version 2 or later. See # the COPYING file in the top-level directory. @@ -13,32 +14,166 @@ =20 import os import sys +import socket import subprocess import basevm =20 class OpenBSDVM(basevm.BaseVM): name =3D "openbsd" arch =3D "x86_64" + + link =3D "https://cdn.openbsd.org/pub/OpenBSD/6.5/amd64/install65.iso" + csum =3D "38d1f8cadd502f1c27bf05c5abde6cc505dd28f3f34f8a941048ff9a54f9= f608" + size =3D "20G" + pkgs =3D [ + # tools + "git", + "pkgconf", + "bzip2", "xz", + + # gnu tools + "bash", + "gmake", + "gsed", + "bison", + + # libs: usb + "libusb1", + + # libs: crypto + "gnutls", + + # libs: images + "jpeg", + "png", + + # libs: ui + "sdl2", + "gtk+3", + "libxkbcommon", + ] + BUILD_SCRIPT =3D """ set -e; - rm -rf /var/tmp/qemu-test.* - cd $(mktemp -d /var/tmp/qemu-test.XXXXXX); + rm -rf /home/qemu/qemu-test.* + cd $(mktemp -d /home/qemu/qemu-test.XXXXXX); + mkdir src build; cd src; tar -xf /dev/rsd1c; - ./configure --cc=3Dx86_64-unknown-openbsd6.1-gcc-4.9.4 --python=3D= python2.7 {configure_opts}; - gmake --output-sync -j{jobs} {verbose}; - # XXX: "gmake check" seems to always hang or fail - #gmake --output-sync -j{jobs} check {verbose}; + cd ../build + ../src/configure --cc=3Dcc --python=3Dpython3 {configure_opts}; + gmake --output-sync -j{jobs} {target} {verbose}; """ + poweroff =3D "halt -p" =20 def build_image(self, img): - cimg =3D self._download_with_cache("http://download.patchew.org/op= enbsd-6.1-amd64.img.xz", - sha256sum=3D'8c6cedc483e602cfee5e04f0406c64eb99138495e8ca5= 80bc0293bcf0640c1bf') - img_tmp_xz =3D img + ".tmp.xz" + self.print_step("Downloading install iso") + cimg =3D self._download_with_cache(self.link, sha256sum=3Dself.csu= m) img_tmp =3D img + ".tmp" - sys.stderr.write("Extracting the image...\n") - subprocess.check_call(["ln", "-f", cimg, img_tmp_xz]) - subprocess.check_call(["xz", "--keep", "-dvf", img_tmp_xz]) + iso =3D img + ".install.iso" + + self.print_step("Preparing iso and disk image") + subprocess.check_call(["cp", "-f", cimg, iso]) + subprocess.check_call(["qemu-img", "create", "-f", "qcow2", + img_tmp, self.size]) + + self.print_step("Booting installer") + self.boot(img_tmp, extra_args =3D [ + "-bios", "pc-bios/bios-256k.bin", + "-machine", "graphics=3Doff", + "-cdrom", iso + ]) + self.console_init() + self.console_wait_send("boot>", "set tty com0\n") + self.console_wait_send("boot>", "\n") + + # pre-install configuration + self.console_wait_send("(I)nstall", "i\n") + self.console_wait_send("Terminal type", "xterm\n") + self.console_wait_send("System hostname", "openbsd\n") + self.console_wait_send("Which network interface", "vio0\n") + self.console_wait_send("IPv4 address", "dhcp\n") + self.console_wait_send("IPv6 address", "none\n") + self.console_wait_send("Which network interface", "done\n") + self.console_wait_send("DNS domain name", "localnet\n") + self.console_wait("Password for root account") + self.console_send("%s\n" % self.ROOT_PASS) + self.console_wait("Password for root account") + self.console_send("%s\n" % self.ROOT_PASS) + self.console_wait_send("Start sshd(8)", "yes\n") + self.console_wait_send("X Window System", "\n") + self.console_wait_send("xenodm", "\n") + self.console_wait_send("console to com0", "\n") + self.console_wait_send("Which speed", "\n") + + self.console_wait("Setup a user") + self.console_send("%s\n" % self.GUEST_USER) + self.console_wait("Full name") + self.console_send("%s\n" % self.GUEST_USER) + self.console_wait("Password") + self.console_send("%s\n" % self.GUEST_PASS) + self.console_wait("Password") + self.console_send("%s\n" % self.GUEST_PASS) + + self.console_wait_send("Allow root ssh login", "yes\n") + self.console_wait_send("timezone", "UTC\n") + self.console_wait_send("root disk", "\n") + self.console_wait_send("(W)hole disk", "\n") + self.console_wait_send("(A)uto layout", "\n") + self.console_wait_send("Location of sets", "cd0\n") + self.console_wait_send("Pathname to the sets", "\n") + self.console_wait_send("Set name(s)", "\n") + self.console_wait_send("without verification", "yes\n") + + self.print_step("Installation started now, this will take a while") + self.console_wait_send("Location of sets", "done\n") + + self.console_wait("successfully completed") + self.print_step("Installation finished, rebooting") + self.console_wait_send("(R)eboot", "reboot\n") + + # setup qemu user + prompt =3D "$" + self.console_ssh_init(prompt, self.GUEST_USER, self.GUEST_PASS) + self.console_wait_send(prompt, "exit\n") + + # setup root user + prompt =3D "openbsd#" + self.console_ssh_init(prompt, "root", self.ROOT_PASS) + self.console_sshd_config(prompt) + + # setup virtio-blk #1 (tarfile) + self.console_wait(prompt) + self.console_send("echo 'chmod 666 /dev/rsd1c' >> /etc/rc.local\n") + + # enable w+x for /home + self.console_wait(prompt) + self.console_send("sed -i -e '/home/s/rw,/rw,wxallowed,/' /etc/fst= ab\n") + + # tweak datasize limit + self.console_wait(prompt) + self.console_send("sed -i -e 's/\\(datasize[^=3D]*\\)=3D[^:]*/\\1= =3Dinfinity/' /etc/login.conf\n") + + # use http (be proxy cache friendly) + self.console_wait(prompt) + self.console_send("sed -i -e 's/https/http/' /etc/installurl\n") + + self.print_step("Configuration finished, rebooting") + self.console_wait_send(prompt, "reboot\n") + self.console_wait("login:") + self.wait_ssh() + + self.print_step("Installing packages") + self.ssh_root_check("pkg_add %s\n" % " ".join(self.pkgs)) + + # shutdown + self.ssh_root(self.poweroff) + self.wait() + + if os.path.exists(img): + os.remove(img) os.rename(img_tmp, img) + os.remove(iso) + self.print_step("All done") =20 if __name__ =3D=3D "__main__": sys.exit(basevm.main(OpenBSDVM)) --=20 2.20.1 From nobody Tue Nov 11 03:17:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560974701; cv=none; d=zoho.com; s=zohoarc; b=FSKU8NdAVf/ePdltwSjWaBlXk/0QgTYVxYVwPoQQbddocBQjMUfgHWDObjGSK6MLTjWHV+xrWlhJU9W2wRLPCb2tFsY6OdYhBXH1lpCvEtC+LrxmnCptf1Sv3S/de6L/QWAp1HNL4onh+nsdeCKBeV55gVc1HM/YttQZ4ZEZUYU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560974701; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=iMCV1pDp/0RdCyrr4HygA4HO+17huZdMnbc+nwmxn6o=; b=ijqETeVhGazFtVf6ZhqInwj9HiMuyERqE20zgRSDpt0qN8R/ErOndnHUz/0JRH/iO9RmE1u04dcRxnG1OWfIpCcI/W41IFpl1rs6/8MLoCLF9yRNqZBpjoX9Oh6giLJilNSHqD9PTf6gOZ4MGPM0HTL+HvO9vYluaDPYtR9J1TA= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560974701621113.74788769387692; Wed, 19 Jun 2019 13:05:01 -0700 (PDT) Received: from localhost ([::1]:41602 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgpI-0000jO-LQ for importer@patchew.org; Wed, 19 Jun 2019 16:05:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55987) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgYp-0003vZ-T5 for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:48:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdgYk-00066A-SG for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:47:57 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:46368) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdgYi-0005aY-SW for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:47:53 -0400 Received: by mail-wr1-x435.google.com with SMTP id n4so458320wrw.13 for ; Wed, 19 Jun 2019 12:47:20 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 32sm38584306wra.35.2019.06.19.12.47.18 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jun 2019 12:47:18 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6DE491FF9C; Wed, 19 Jun 2019 20:40:22 +0100 (BST) 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=iMCV1pDp/0RdCyrr4HygA4HO+17huZdMnbc+nwmxn6o=; b=n5NMR8S0IaqUZP0JCP7N97Nu3QEEqkIKnt4rlGAHww4kSwGQScCStX3HnvP0qxzVjD jSUEr6r1NWu81pCWlI5/byXi5Hi9WCKso194FfWM7SQESPYIH68WPB1x9B0H4DUGe0a9 M784/7Mxn23v2yt1dVy+UAdPnSRgj9D5hdIpDl8SxaLHA2iebbW0CMjkXnWqZC7l31WC PcRWN2jTRGKoCziJHbG35Cvs9j+rHmwle+I2CNDloYS/KLmiLdKQGf0yvc5RlFqacUKc 2+AIB/gxXqGHLGR0NzHZ5NEteK52THmPXpBVr/mi+rk+R0ip4AGrYPZNMCbwouB+mmuE stzA== 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=iMCV1pDp/0RdCyrr4HygA4HO+17huZdMnbc+nwmxn6o=; b=hl5/YwdbMnpBin1/9bTVdWaNSKpCuJIzyGCv+OD2NacyFt4+mgkPGRPnzjCGWKXTtn U7/MZMCZRrDSiDP0WIa1no/PRzbm3QT61mpCKyR5M4IEaKwOxxYg6WuNn9V8t4k8ygaP Rd6u0j3zbqbjogsgPUw4Xljv/1FtPL+EMPQBglZLcqAQVZwBHZHUyILuFStWHVtI6RTW uMtZHaTWD0tk71fe8xaak3EOP1fxID1GNUimaKQadXxGMd+s95PN+mf7NjJBtfixj32M 45msqiJEhzSe4M0BZwq9YIYwCEx8s0c1Zv2+QEBDzLsJgXwUf6lQzciSUxnsraxk280h 1CrA== X-Gm-Message-State: APjAAAUcd+zb2/Ti8Cd/0qkeIeaeQDwPXKfw6QpsoWiJERydbZBocoJf VhXyjttWiznZIDDarnrilX/GzQ== X-Google-Smtp-Source: APXvYqwOorwY3r6Z8yTRfNVMH/ZCCmmrDL9EKF5RYYfIFLN7Mj22zTA8QioXQc6xCIBNl3/uzgVi0A== X-Received: by 2002:a5d:4fc8:: with SMTP id h8mr550940wrw.124.1560973639157; Wed, 19 Jun 2019 12:47:19 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 19 Jun 2019 20:40:16 +0100 Message-Id: <20190619194021.8240-13-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::435 Subject: [Qemu-devel] [PATCH v1 12/17] tests/vm: freebsd autoinstall, using serial console 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=20Benn=C3=A9e?= , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Gerd Hoffmann Instead of fetching the prebuilt image from patchew download the install iso and prepare the image locally. Install to disk, using the serial console. Create qemu user, configure ssh login. Install packages needed for qemu builds. Note that freebsd package downloads are delivered as non-cachable content, so I had to configure squid with "ignore-no-store ignore-private ignore-reload" for pkgmir.geo.freebsd.org to make the caching actually work. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Thomas Huth Message-Id: <20190617043858.8290-9-kraxel@redhat.com> --- tests/vm/freebsd | 182 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 172 insertions(+), 10 deletions(-) diff --git a/tests/vm/freebsd b/tests/vm/freebsd index 091be1a065..2a19461a90 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -2,41 +2,203 @@ # # FreeBSD VM image # -# Copyright 2017 Red Hat Inc. +# Copyright 2017-2019 Red Hat Inc. # # Authors: # Fam Zheng +# Gerd Hoffmann # # This code is licensed under the GPL version 2 or later. See # the COPYING file in the top-level directory. # =20 import os +import re import sys +import time +import socket import subprocess import basevm =20 class FreeBSDVM(basevm.BaseVM): name =3D "freebsd" arch =3D "x86_64" + + link =3D "https://download.freebsd.org/ftp/releases/ISO-IMAGES/12.0/Fr= eeBSD-12.0-RELEASE-amd64-disc1.iso.xz" + csum =3D "1d40015bea89d05b8bd13e2ed80c40b522a9ec1abd8e7c8b80954fb485fb= 99db" + size =3D "20G" + pkgs =3D [ + # build tools + "git", + "pkgconf", + "bzip2", + + # gnu tools + "bash", + "gmake", + "gsed", + "flex", "bison", + + # libs: crypto + "gnutls", + + # libs: images + "jpeg-turbo", + "png", + + # libs: ui + "sdl2", + "gtk3", + "libxkbcommon", + + # libs: opengl + "libepoxy", + "mesa-libs", + ] + BUILD_SCRIPT =3D """ set -e; - rm -rf /var/tmp/qemu-test.* - cd $(mktemp -d /var/tmp/qemu-test.XXXXXX); + rm -rf /home/qemu/qemu-test.* + cd $(mktemp -d /home/qemu/qemu-test.XXXXXX); + mkdir src build; cd src; tar -xf /dev/vtbd1; - ./configure {configure_opts}; + cd ../build + ../src/configure --python=3Dpython3.6 {configure_opts}; gmake --output-sync -j{jobs} {target} {verbose}; """ =20 + def console_boot_serial(self): + self.console_wait_send("Autoboot", "3") + self.console_wait_send("OK", "set console=3Dcomconsole\n") + self.console_wait_send("OK", "boot\n") + def build_image(self, img): - cimg =3D self._download_with_cache("http://download.patchew.org/fr= eebsd-11.1-amd64.img.xz", - sha256sum=3D'adcb771549b37bc63826c501f05121a206ed3d9f55f49= 145908f7e1432d65891') - img_tmp_xz =3D img + ".tmp.xz" + self.print_step("Downloading install iso") + cimg =3D self._download_with_cache(self.link, sha256sum=3Dself.csu= m) img_tmp =3D img + ".tmp" - sys.stderr.write("Extracting the image...\n") - subprocess.check_call(["ln", "-f", cimg, img_tmp_xz]) - subprocess.check_call(["xz", "--keep", "-dvf", img_tmp_xz]) + iso =3D img + ".install.iso" + iso_xz =3D iso + ".xz" + + self.print_step("Preparing iso and disk image") + subprocess.check_call(["cp", "-f", cimg, iso_xz]) + subprocess.check_call(["xz", "-dvf", iso_xz]) + subprocess.check_call(["qemu-img", "create", "-f", "qcow2", + img_tmp, self.size]) + + self.print_step("Booting installer") + self.boot(img_tmp, extra_args =3D [ + "-bios", "pc-bios/bios-256k.bin", + "-machine", "graphics=3Doff", + "-cdrom", iso + ]) + self.console_init() + self.console_boot_serial() + self.console_wait_send("Console type", "xterm\n") + + # pre-install configuration + self.console_wait_send("Welcome", "\n") + self.console_wait_send("Keymap Selection", "\n") + self.console_wait_send("Set Hostname", "freebsd\n") + self.console_wait_send("Distribution Select", "\n") + self.console_wait_send("Partitioning", "\n") + self.console_wait_send("Partition", "\n") + self.console_wait_send("Scheme", "\n") + self.console_wait_send("Editor", "f") + self.console_wait_send("Confirmation", "c") + + self.print_step("Installation started now, this will take a while") + + # post-install configuration + self.console_wait("New Password:") + self.console_send("%s\n" % self.ROOT_PASS) + self.console_wait("Retype New Password:") + self.console_send("%s\n" % self.ROOT_PASS) + + self.console_wait_send("Network Configuration", "\n") + self.console_wait_send("IPv4", "y") + self.console_wait_send("DHCP", "y") + self.console_wait_send("IPv6", "n") + self.console_wait_send("Resolver", "\n") + + self.console_wait_send("Time Zone Selector", "a\n") + self.console_wait_send("Confirmation", "y") + self.console_wait_send("Time & Date", "\n") + self.console_wait_send("Time & Date", "\n") + + self.console_wait_send("System Configuration", "\n") + self.console_wait_send("System Hardening", "\n") + + # qemu user + self.console_wait_send("Add User Accounts", "y") + self.console_wait("Username") + self.console_send("%s\n" % self.GUEST_USER) + self.console_wait("Full name") + self.console_send("%s\n" % self.GUEST_USER) + self.console_wait_send("Uid", "\n") + self.console_wait_send("Login group", "\n") + self.console_wait_send("Login group", "\n") + self.console_wait_send("Login class", "\n") + self.console_wait_send("Shell", "\n") + self.console_wait_send("Home directory", "\n") + self.console_wait_send("Home directory perm", "\n") + self.console_wait_send("Use password", "\n") + self.console_wait_send("Use an empty password", "\n") + self.console_wait_send("Use a random password", "\n") + self.console_wait("Enter password:") + self.console_send("%s\n" % self.GUEST_PASS) + self.console_wait("Enter password again:") + self.console_send("%s\n" % self.GUEST_PASS) + self.console_wait_send("Lock out", "\n") + self.console_wait_send("OK", "yes\n") + self.console_wait_send("Add another user", "no\n") + + self.console_wait_send("Final Configuration", "\n") + self.console_wait_send("Manual Configuration", "\n") + self.console_wait_send("Complete", "\n") + + self.print_step("Installation finished, rebooting") + self.console_boot_serial() + + # setup qemu user + prompt =3D "$" + self.console_ssh_init(prompt, self.GUEST_USER, self.GUEST_PASS) + self.console_wait_send(prompt, "exit\n") + + # setup root user + prompt =3D "root@freebsd:~ #" + self.console_ssh_init(prompt, "root", self.ROOT_PASS) + self.console_sshd_config(prompt) + + # setup serial console + self.console_wait(prompt) + self.console_send("echo 'console=3Dcomconsole' >> /boot/loader.con= f\n") + + # setup boot delay + self.console_wait(prompt) + self.console_send("echo 'autoboot_delay=3D1' >> /boot/loader.conf\= n") + + # setup virtio-blk #1 (tarfile) + self.console_wait(prompt) + self.console_send("echo 'chmod 666 /dev/vtbd1' >> /etc/rc.local\n") + + self.print_step("Configuration finished, rebooting") + self.console_wait_send(prompt, "reboot\n") + self.console_wait("login:") + self.wait_ssh() + + self.print_step("Installing packages") + self.ssh_root_check("pkg install -y %s\n" % " ".join(self.pkgs)) + + # shutdown + self.ssh_root(self.poweroff) + self.console_wait("Uptime:") + self.wait() + + if os.path.exists(img): + os.remove(img) os.rename(img_tmp, img) + os.remove(iso) + self.print_step("All done") =20 if __name__ =3D=3D "__main__": sys.exit(basevm.main(FreeBSDVM)) --=20 2.20.1 From nobody Tue Nov 11 03:17:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560974149; cv=none; d=zoho.com; s=zohoarc; b=fLULZkSo8hXj35rocKv3/jwNW4i4jdigvrZK2PmHuzJ8cxEMwyg3UTg52fVB8m/bd8YH1m26SKVQZJJIugqTxb4/vip08RSYUy4MEqVax1t6+sUOmtQ6hTqUsKXe8iA2c55AuvNHdZR2PT0u99dXOfBNovmtAwb6wJrCFjfyGM0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560974149; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ldUVv4HTWoARPMqPf3QzxXqOvU9Z7IK4lhIlDlw1SdY=; b=alrQ8ncuup9Of39EfvXCse2ynXBCGiEWIXwvQUjRlzpawhhdPZGg5kyowy7xlNCBYQtPTy8pMjK5R4S/p2fExAzl0nXEm/1fyVhL57GzyF+eCvK7i10tHZhxYbwKiDP1cLWGdrZ+I9Ovgvz4N2zw5qWbZAPO+TxoaDOLHrYTO00= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156097414945050.99882887456192; Wed, 19 Jun 2019 12:55:49 -0700 (PDT) Received: from localhost ([::1]:41486 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdggL-00013a-HL for importer@patchew.org; Wed, 19 Jun 2019 15:55:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55996) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgYt-0003vk-2q for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:48:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdgYm-00067H-19 for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:47:59 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:37436) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdgYk-0005cj-JO for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:47:54 -0400 Received: by mail-wm1-x344.google.com with SMTP id f17so726637wme.2 for ; Wed, 19 Jun 2019 12:47:22 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id q193sm2283841wme.8.2019.06.19.12.47.18 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jun 2019 12:47:21 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 825451FF87; Wed, 19 Jun 2019 20:40:22 +0100 (BST) 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=ldUVv4HTWoARPMqPf3QzxXqOvU9Z7IK4lhIlDlw1SdY=; b=oPM1XFjFzZsdkSubeLX9Sws7wmCPsZgO+Z3iM3+cS+lzWom94UKCDiYAZpSiUg1pWF +gbokVPf+IqfbRLL27TE9dORPiT+QewwBzsTYdRI27QHXyaDNhRiw4ZBCLENepPrC1BT i3LngIqFQ9JHQXYWI3WEC7vzVENMMECFLi73kdmUM31Sf4Utd4VMaYnWLzp92xOZPmfz kdb2SUQmt6UpcwZQLse3cyDnfk89rNgPSuiU2xqV3aQ7AWMWcoTg4FVjleapAhcGNtw8 kBc7a/U1F+DngFxHGWv2EsxDabrxdmlZCWIFA2lSX4HtP1rptyVky8CdVlsnS6UBpJ31 aiPw== 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=ldUVv4HTWoARPMqPf3QzxXqOvU9Z7IK4lhIlDlw1SdY=; b=BZpXJa4bhYJUzkPoCepDUsSRzGZTxi8KJHmXYQfVpLrywdkihFnjUX8ApMjCAiVb89 B7tPKSKB/zDmsPSgH2558prI2mpf7VtLXjyhILT/rOu3BQmpnlpdc9MP9awC9HhpYZ3U AXNaY7feU5c+0pSZg4L02ooSpXaEDj616HBh6Ah3pZPuRetNWjxzd9O9gSFNXBaTO0OM 86oNWAJYiLCQqi8yGJ7lDSpfLypcRCaYkdp+aya0nU7hN6l5AZHFnohYWHrWDoeIQaDD es8s/VXOgvjGeMbvAqW3OiMQWPyvi5jQhkveJvdaeOfvnNfMKKIlUVPrwguBFySn4L0W nvPA== X-Gm-Message-State: APjAAAXabFKQ2euFwdKfXRdzHzTjNHfOZBB8UjfbUVh3ZgceFjpAP3BP IkRkxR5bPkEUnlgIks1D8c586A== X-Google-Smtp-Source: APXvYqwI3w0EsxsmVrLUL5vrkb2gG2QopxbYh/RmW/qp4s3uFvBhSNi1IOUHq4W04i8ceEBmxRIXHw== X-Received: by 2002:a7b:c7c2:: with SMTP id z2mr8983195wmk.147.1560973641798; Wed, 19 Jun 2019 12:47:21 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 19 Jun 2019 20:40:17 +0100 Message-Id: <20190619194021.8240-14-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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] [PATCH v1 13/17] tests/vm: netbsd autoinstall, using serial console 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?= , Kamil Rytarowski , Gerd Hoffmann , Kamil Rytarowski , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Gerd Hoffmann Instead of fetching the prebuilt image from patchew download the install iso and prepare the image locally. Install to disk, using the serial console. Create qemu user, configure ssh login. Install packages needed for qemu builds. Signed-off-by: Gerd Hoffmann Reviewed-by: Kamil Rytarowski Tested-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20190617043858.8290-10-kraxel@redhat.com> [AJB: added tags] Signed-off-by: Alex Benn=C3=A9e --- tests/vm/netbsd | 189 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 179 insertions(+), 10 deletions(-) diff --git a/tests/vm/netbsd b/tests/vm/netbsd index ee9eaeab50..be59a2c1da 100755 --- a/tests/vm/netbsd +++ b/tests/vm/netbsd @@ -2,10 +2,11 @@ # # NetBSD VM image # -# Copyright 2017 Red Hat Inc. +# Copyright 2017-2019 Red Hat Inc. # # Authors: # Fam Zheng +# Gerd Hoffmann # # This code is licensed under the GPL version 2 or later. See # the COPYING file in the top-level directory. @@ -13,30 +14,198 @@ =20 import os import sys +import time import subprocess import basevm =20 class NetBSDVM(basevm.BaseVM): name =3D "netbsd" arch =3D "x86_64" + + link =3D "https://cdn.netbsd.org/pub/NetBSD/NetBSD-8.0/images/NetBSD-8= .0-amd64.iso" + size =3D "20G" + pkgs =3D [ + # tools + "git-base", + "pkgconf", + "xz", + "python37", + + # gnu tools + "bash", + "gmake", + "gsed", + "flex", "bison", + + # libs: crypto + "gnutls", + + # libs: images + "jpeg", + "png", + + # libs: ui + "SDL2", + "gtk3+", + "libxkbcommon", + ] + BUILD_SCRIPT =3D """ set -e; - rm -rf /var/tmp/qemu-test.* - cd $(mktemp -d /var/tmp/qemu-test.XXXXXX); + rm -rf /home/qemu/qemu-test.* + cd $(mktemp -d /home/qemu/qemu-test.XXXXXX); + mkdir src build; cd src; tar -xf /dev/rld1a; - ./configure --python=3Dpython2.7 {configure_opts}; + cd ../build + ../src/configure --python=3Dpython3.7 --disable-opengl {configure_= opts}; gmake --output-sync -j{jobs} {target} {verbose}; """ + poweroff =3D "/sbin/poweroff" =20 def build_image(self, img): - cimg =3D self._download_with_cache("http://download.patchew.org/ne= tbsd-7.1-amd64.img.xz", - sha256sum=3D'b633d565b0eac3d02015= cd0c81440bd8a7a8df8512615ac1ee05d318be015732') - img_tmp_xz =3D img + ".tmp.xz" + cimg =3D self._download_with_cache(self.link) img_tmp =3D img + ".tmp" - sys.stderr.write("Extracting the image...\n") - subprocess.check_call(["ln", "-f", cimg, img_tmp_xz]) - subprocess.check_call(["xz", "--keep", "-dvf", img_tmp_xz]) + iso =3D img + ".install.iso" + + self.print_step("Preparing iso and disk image") + subprocess.check_call(["cp", "-f", cimg, iso]) + subprocess.check_call(["qemu-img", "create", "-f", "qcow2", + img_tmp, self.size]) + + self.print_step("Booting installer") + self.boot(img_tmp, extra_args =3D [ + "-bios", "pc-bios/bios-256k.bin", + "-machine", "graphics=3Doff", + "-cdrom", iso + ]) + self.console_init() + self.console_wait("Primary Bootstrap") + + # serial console boot menu output doesn't work for some + # reason, so we have to fly blind ... + for char in list("5consdev com0\n"): + time.sleep(0.2) + self.console_send(char) + self.console_wait("") + self.console_wait_send("> ", "boot\n") + + self.console_wait_send("Terminal type", "xterm\n") + self.console_wait_send("a: Installation messages", "a\n") + self.console_wait_send("b: US-English", "b\n") + self.console_wait_send("a: Install NetBSD", "a\n") + self.console_wait("Shall we continue?") + self.console_wait_send("b: Yes", "b\n") + + self.console_wait_send("a: ld0", "a\n") + self.console_wait_send("a: This is the correct", "a\n") + self.console_wait_send("b: Use the entire disk", "b\n") + self.console_wait("NetBSD bootcode") + self.console_wait_send("a: Yes", "a\n") + self.console_wait_send("b: Use existing part", "b\n") + self.console_wait_send("x: Partition sizes ok", "x\n") + self.console_wait_send("for your NetBSD disk", "\n") + self.console_wait("Shall we continue?") + self.console_wait_send("b: Yes", "b\n") + + self.console_wait_send("b: Use serial port com0", "b\n") + self.console_wait_send("f: Set serial baud rate", "f\n") + self.console_wait_send("a: 9600", "a\n") + self.console_wait_send("x: Exit", "x\n") + + self.console_wait_send("a: Full installation", "a\n") + self.console_wait_send("a: CD-ROM", "a\n") + + self.print_step("Installation started now, this will take a while") + self.console_wait_send("Hit enter to continue", "\n") + + self.console_wait_send("d: Change root password", "d\n") + self.console_wait_send("a: Yes", "a\n") + self.console_wait("New password:") + self.console_send("%s\n" % self.ROOT_PASS) + self.console_wait("New password:") + self.console_send("%s\n" % self.ROOT_PASS) + self.console_wait("Retype new password:") + self.console_send("%s\n" % self.ROOT_PASS) + + self.console_wait_send("o: Add a user", "o\n") + self.console_wait("username") + self.console_send("%s\n" % self.GUEST_USER) + self.console_wait("to group wheel") + self.console_wait_send("a: Yes", "a\n") + self.console_wait_send("a: /bin/sh", "a\n") + self.console_wait("New password:") + self.console_send("%s\n" % self.GUEST_PASS) + self.console_wait("New password:") + self.console_send("%s\n" % self.GUEST_PASS) + self.console_wait("Retype new password:") + self.console_send("%s\n" % self.GUEST_PASS) + + self.console_wait_send("a: Configure network", "a\n") + self.console_wait_send("a: vioif0", "a\n") + self.console_wait_send("Network media type", "\n") + self.console_wait("autoconfiguration") + self.console_wait_send("a: Yes", "a\n") + self.console_wait_send("DNS domain", "localnet\n") + self.console_wait("Are they OK?") + self.console_wait_send("a: Yes", "a\n") + self.console_wait("installed in /etc") + self.console_wait_send("a: Yes", "a\n") + + self.console_wait_send("e: Enable install", "e\n") + proxy =3D os.environ.get("http_proxy") + if not proxy is None: + self.console_wait_send("f: Proxy", "f\n") + self.console_wait("Proxy") + self.console_send("%s\n" % proxy) + self.console_wait_send("x: Install pkgin", "x\n") + self.console_init(1200) + self.console_wait_send("Hit enter to continue", "\n") + self.console_init() + + self.console_wait_send("g: Enable sshd", "g\n") + self.console_wait_send("x: Finished conf", "x\n") + self.console_wait_send("Hit enter to continue", "\n") + + self.print_step("Installation finished, rebooting") + self.console_wait_send("d: Reboot the computer", "d\n") + + # setup qemu user + prompt =3D "localhost$" + self.console_ssh_init(prompt, self.GUEST_USER, self.GUEST_PASS) + self.console_wait_send(prompt, "exit\n") + + # setup root user + prompt =3D "localhost#" + self.console_ssh_init(prompt, "root", self.ROOT_PASS) + self.console_sshd_config(prompt) + + # setup virtio-blk #1 (tarfile) + self.console_wait(prompt) + self.console_send("echo 'chmod 666 /dev/rld1a' >> /etc/rc.local\n") + + # turn off mprotect (conflicts with tcg) + self.console_wait(prompt) + self.console_send("echo security.pax.mprotect.enabled=3D0 >> /etc/= sysctl.conf\n") + + self.print_step("Configuration finished, rebooting") + self.console_wait_send(prompt, "reboot\n") + self.console_wait("login:") + self.wait_ssh() + + self.print_step("Installing packages") + self.ssh_root_check("pkgin update\n") + self.ssh_root_check("pkgin -y install %s\n" % " ".join(self.pkgs)) + + # shutdown + self.ssh_root(self.poweroff) + self.console_wait("entering state S5") + self.wait() + + if os.path.exists(img): + os.remove(img) os.rename(img_tmp, img) + os.remove(iso) + self.print_step("All done") =20 if __name__ =3D=3D "__main__": sys.exit(basevm.main(NetBSDVM)) --=20 2.20.1 From nobody Tue Nov 11 03:17:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560974054; cv=none; d=zoho.com; s=zohoarc; b=C+mepgfb/4qk20bH1kpNXlT29Qm0gDP3PR9k83dVpI/BMONmUjygUIeeiyNFSdg+0U/zsnmqlFlsPoduOWfANV5+sHUL2r7yCkRix9yuALgeHDP1jfTNaulqOSNh5KXon/AGkXdL8aV7RclNSFD351Qxk0dyQtq37g8yJUgHFwU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560974054; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=oDQCgUljExCFYtLLEJJpwccg9/K7BchyPzoArUB8z3c=; b=L17h3scvD8YWupPGgsHyoe7wRlNg+mxo49hP6WCPeJ1Ia6J/tB6+Vnczaki423qugSfpiQxSHuTFG1fTMbXyyc1CKCRe9tH6pGD8gcWJKeri5QPSB5y8pxSrGU+FXd0/tSFxXYfPbmHFV8DwE6Rp6ydPyA4GZPzKt7scdoZ+RBM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560974054181730.5227146563209; Wed, 19 Jun 2019 12:54:14 -0700 (PDT) Received: from localhost ([::1]:41484 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgej-00081P-FJ for importer@patchew.org; Wed, 19 Jun 2019 15:54:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53989) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgRg-0006BE-Gv for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdgRc-0000BM-Sf for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:36 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:39577) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdgRc-00009C-K2 for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:40:32 -0400 Received: by mail-wm1-x343.google.com with SMTP id z23so697948wma.4 for ; Wed, 19 Jun 2019 12:40:31 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id c6sm3754300wma.25.2019.06.19.12.40.25 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jun 2019 12:40:27 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 98ABA1FF9D; Wed, 19 Jun 2019 20:40:22 +0100 (BST) 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=oDQCgUljExCFYtLLEJJpwccg9/K7BchyPzoArUB8z3c=; b=cKsvZfdCdGbDgxILtJOdXnLM8qVBC/JxJINBFxUByZRvsCBiFiuL5oKdUGcH0SyNUD nfFty59Xl+QfF1+Ih/9nIc0yCwk1JufbypLVNtmLJ7rcUzJbxeVLjYyro3+5Ity8bO/Y SoT9rnJZ/O/Lf3Ofeja1f+7iMFYY+u1ARPj3c58iszx3O8JqjE27LdznGYFFR1L6F4gm z6axjLq6N8Z7Nn0VGCuqYePKWnqXDWzX7A64+IGX2kNcFzV+i2NPE/uDC0Q5s4KjSQDP kwu6Vliq5ZlwU1mNjSaijn9Pjf7ubwLPBgUf/cvszpHQsfR/fG8sEe5f+Pkhh/RlILx9 dRkw== 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=oDQCgUljExCFYtLLEJJpwccg9/K7BchyPzoArUB8z3c=; b=SjErezmqtLc7Bd5sgVcWQvJ3BBSrbATRgUEf7s0lm/5TJxNAoi0YbIOznTo0FGjJ7s baIaYCW2K25LE9V9UuJWa23yrGOfVFxL1VYonxyb7AWFcr/BjQ+22HPdfUp72QevPGj1 sm6a6GZKRv4091FBylD0+gpEEGNdXSTq014/6+Tl3Xg9V6ZfMfjDFCEu1ovhI3FkeByc /pFpc07F4YNsoIv2kKLGGex2KOp2GqCgYPV60+tLzrqVDGvxFMhcA9JC5Pb738NtmGTF zp0ETQ3DTfMDkBFQ5/aQknwpw1o3WYHGAaBybC1qWyV+qCMBnV6XPnHPIy5UNHs2zJDn Xkgg== X-Gm-Message-State: APjAAAUnqI+/1viUdh5jWiK5L1H6mYIHmiznITOD7NPkRpAq3vM5O4lL 5jW6fkpuHMG/T/X1jwpl3ect3w== X-Google-Smtp-Source: APXvYqz/5v65wwXArGB+upmifIXUdDgbAQBmYkRo80UpR1ZWJE2Cd1vMl6fiR1iIHYiH2Toxpld1tg== X-Received: by 2002:a1c:35c2:: with SMTP id c185mr9505604wma.58.1560973230281; Wed, 19 Jun 2019 12:40:30 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 19 Jun 2019 20:40:18 +0100 Message-Id: <20190619194021.8240-15-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 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::343 Subject: [Qemu-devel] [PATCH v1 14/17] tests/vm: fedora autoinstall, using serial console 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?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Gerd Hoffmann Download the install iso and prepare the image locally. Install to disk, using the serial console. Create qemu user, configure ssh login. Install packages needed for qemu builds. Yes, we have docker images for fedora. But for trouble-shooting it might be helpful to have a vm too. When vm builds fail you can use it to figure whenever the vm setup or the guest os is the problem. Signed-off-by: Gerd Hoffmann Tested-by: Thomas Huth Message-Id: <20190617043858.8290-11-kraxel@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/vm/Makefile.include | 3 +- tests/vm/basevm.py | 9 +- tests/vm/fedora | 189 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 199 insertions(+), 2 deletions(-) create mode 100755 tests/vm/fedora diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index a61c236b8e..809b80e2e5 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -2,7 +2,7 @@ =20 .PHONY: vm-build-all vm-clean-all =20 -IMAGES :=3D ubuntu.i386 freebsd netbsd openbsd centos +IMAGES :=3D ubuntu.i386 freebsd netbsd openbsd centos fedora IMAGES_DIR :=3D $(HOME)/.cache/qemu-vm/images IMAGE_FILES :=3D $(patsubst %, $(IMAGES_DIR)/%.img, $(IMAGES)) =20 @@ -16,6 +16,7 @@ vm-test: @echo " vm-build-netbsd - Build QEMU in NetBSD VM" @echo " vm-build-openbsd - Build QEMU in OpenBSD VM" @echo " vm-build-centos - Build QEMU in CentOS VM, with = Docker" + @echo " vm-build-fedora - Build QEMU in Fedora VM" @echo "" @echo " vm-build-all - Build QEMU in all VMs" @echo " vm-clean-all - Clean up VM images" diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 592a344773..3d717da498 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -206,7 +206,7 @@ class BaseVM(object): # log console line sys.stderr.write("con recv: %s\n" % line) =20 - def console_wait(self, expect): + def console_wait(self, expect, expectalt =3D None): vm =3D self._guest output =3D "" while True: @@ -215,6 +215,8 @@ class BaseVM(object): except socket.timeout: sys.stderr.write("console: *** read timeout ***\n") sys.stderr.write("console: waiting for: '%s'\n" % expect) + if not expectalt is None: + sys.stderr.write("console: waiting for: '%s' (alt)\n" = % expectalt) sys.stderr.write("console: line buffer:\n") sys.stderr.write("\n") self.console_log(output.rstrip()) @@ -223,6 +225,8 @@ class BaseVM(object): output +=3D chars.decode("latin1") if expect in output: break + if not expectalt is None and expectalt in output: + break if "\r" in output or "\n" in output: lines =3D re.split("[\r\n]", output) output =3D lines.pop() @@ -230,6 +234,9 @@ class BaseVM(object): self.console_log("\n".join(lines)) if self.debug: self.console_log(output) + if not expectalt is None and expectalt in output: + return False + return True =20 def console_send(self, command): vm =3D self._guest diff --git a/tests/vm/fedora b/tests/vm/fedora new file mode 100755 index 0000000000..e8fa5bf0d2 --- /dev/null +++ b/tests/vm/fedora @@ -0,0 +1,189 @@ +#!/usr/bin/env python +# +# Fedora VM image +# +# Copyright 2019 Red Hat Inc. +# +# Authors: +# Gerd Hoffmann +# +# This code is licensed under the GPL version 2 or later. See +# the COPYING file in the top-level directory. +# + +import os +import re +import sys +import time +import socket +import subprocess +import basevm + +class FedoraVM(basevm.BaseVM): + name =3D "fedora" + arch =3D "x86_64" + + base =3D "http://dl.fedoraproject.org/pub/fedora/linux/releases/30/" + link =3D base + "Server/x86_64/iso/Fedora-Server-netinst-x86_64-30-1.2= .iso" + repo =3D base + "Server/x86_64/os/" + full =3D base + "Everything/x86_64/os/" + csum =3D "5e4eac4566d8c572bfb3bcf54b7d6c82006ec3c6c882a2c9235c6d3494d7= b100" + size =3D "20G" + pkgs =3D [ + # tools + 'git-core', + 'flex', 'bison', + 'gcc', 'binutils', 'make', + + # perl + 'perl-Test-Harness', + + # libs: usb + '"pkgconfig(libusb-1.0)"', + '"pkgconfig(libusbredirparser-0.5)"', + + # libs: crypto + '"pkgconfig(gnutls)"', + + # libs: ui + '"pkgconfig(sdl2)"', + '"pkgconfig(gtk+-3.0)"', + '"pkgconfig(ncursesw)"', + + # libs: audio + '"pkgconfig(libpulse)"', + '"pkgconfig(alsa)"', + ] + + BUILD_SCRIPT =3D """ + set -e; + rm -rf /home/qemu/qemu-test.* + cd $(mktemp -d /home/qemu/qemu-test.XXXXXX); + mkdir src build; cd src; + tar -xf /dev/vdb; + cd ../build + ../src/configure --python=3Dpython3 {configure_opts}; + gmake --output-sync -j{jobs} {target} {verbose}; + """ + + def build_image(self, img): + self.print_step("Downloading install iso") + cimg =3D self._download_with_cache(self.link, sha256sum=3Dself.csu= m) + img_tmp =3D img + ".tmp" + iso =3D img + ".install.iso" + + self.print_step("Preparing iso and disk image") + subprocess.check_call(["cp", "-f", cimg, iso]) + subprocess.check_call(["qemu-img", "create", "-f", "qcow2", + img_tmp, self.size]) + + self.print_step("Booting installer") + self.boot(img_tmp, extra_args =3D [ + "-bios", "pc-bios/bios-256k.bin", + "-machine", "graphics=3Doff", + "-cdrom", iso + ]) + self.console_init(300) + self.console_wait("installation process.") + time.sleep(0.3) + self.console_send("\t") + time.sleep(0.3) + self.console_send(" console=3DttyS0") + proxy =3D os.environ.get("http_proxy") + if not proxy is None: + self.console_send(" proxy=3D%s" % proxy) + self.console_send(" inst.proxy=3D%s" % proxy) + self.console_send(" inst.repo=3D%s" % self.repo) + self.console_send("\n") + + self.console_wait_send("2) Use text mode", "2\n") + + self.console_wait_send("5) [!] Installation Dest", "5\n") + self.console_wait_send("1) [x]", "c\n") + self.console_wait_send("2) [ ] Use All Space", "2\n") + self.console_wait_send("2) [x] Use All Space", "c\n") + self.console_wait_send("1) [ ] Standard Part", "1\n") + self.console_wait_send("1) [x] Standard Part", "c\n") + + self.console_wait_send("7) [!] Root password", "7\n") + self.console_wait("Password:") + self.console_send("%s\n" % self.ROOT_PASS) + self.console_wait("Password (confirm):") + self.console_send("%s\n" % self.ROOT_PASS) + + self.console_wait_send("8) [ ] User creation", "8\n") + self.console_wait_send("1) [ ] Create user", "1\n") + self.console_wait_send("3) User name", "3\n") + self.console_wait_send("ENTER:", "%s\n" % self.GUEST_USER) + self.console_wait_send("4) [ ] Use password", "4\n") + self.console_wait_send("5) Password", "5\n") + self.console_wait("Password:") + self.console_send("%s\n" % self.GUEST_PASS) + self.console_wait("Password (confirm):") + self.console_send("%s\n" % self.GUEST_PASS) + self.console_wait_send("7) Groups", "c\n") + + while True: + good =3D self.console_wait("3) [x] Installation", + "3) [!] Installation") + self.console_send("r\n") + if good: + break + time.sleep(10) + + while True: + good =3D self.console_wait("4) [x] Software", + "4) [!] Software") + self.console_send("r\n") + if good: + break + time.sleep(10) + self.console_send("r\n" % self.GUEST_PASS) + + self.console_wait_send("'b' to begin install", "b\n") + + self.print_step("Installation started now, this will take a while") + + self.console_wait_send("Installation complete", "\n") + self.print_step("Installation finished, rebooting") + + # setup qemu user + prompt =3D " ~]$" + self.console_ssh_init(prompt, self.GUEST_USER, self.GUEST_PASS) + self.console_wait_send(prompt, "exit\n") + + # setup root user + prompt =3D " ~]#" + self.console_ssh_init(prompt, "root", self.ROOT_PASS) + self.console_sshd_config(prompt) + + # setup virtio-blk #1 (tarfile) + self.console_wait(prompt) + self.console_send("echo 'KERNEL=3D=3D\"vdb\" MODE=3D\"666\"' >> %s= \n" % + "/etc/udev/rules.d/99-qemu.rules") + + self.print_step("Configuration finished, rebooting") + self.console_wait_send(prompt, "reboot\n") + self.console_wait("login:") + self.wait_ssh() + + self.print_step("Installing packages") + self.ssh_root_check("rm -vf /etc/yum.repos.d/fedora*.repo\n") + self.ssh_root_check("echo '[fedora]' >> /etc/yum.repos.d/qemu.repo= \n") + self.ssh_root_check("echo 'baseurl=3D%s' >> /etc/yum.repos.d/qemu.= repo\n" % self.full) + self.ssh_root_check("echo 'gpgcheck=3D0' >> /etc/yum.repos.d/qemu.= repo\n") + self.ssh_root_check("dnf install -y %s\n" % " ".join(self.pkgs)) + + # shutdown + self.ssh_root(self.poweroff) + self.console_wait("sleep state S5") + self.wait() + + if os.path.exists(img): + os.remove(img) + os.rename(img_tmp, img) + os.remove(iso) + self.print_step("All done") + +if __name__ =3D=3D "__main__": + sys.exit(basevm.main(FedoraVM)) --=20 2.20.1 From nobody Tue Nov 11 03:17:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560974512; cv=none; d=zoho.com; s=zohoarc; b=KjJSHFLWsGcs3nYq0oiQ4g7IAwXzPDXpnXnDIu5rPZJWP4eT7Q9nTULjoyFNHlPSog2y1MiiFzVgy6I6cVlBINm1JMqblqIp791cNCyD7ZPjzXbqoqf/KahhQmVZ5wG0WtpnhkLCcCk2FHTtMSj1ruHvM2L0ja8mF5Ekb8zukQk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560974512; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=onoeKhH8i7/jHDfnhI6V24OKwHYPamArShy5EWC2B6w=; b=KEhvm3/Btkj5KOMPNBSptEwFcsZ/RDugQHfVwB/PN+4CTrKIkx8OcSdT393VYWG6pBNJNenMNLwZN8mW1oKMYT2TY7Dp/T7DkCiAuCnaxF6NaatDAWm0ZivlGUhIUJVX6m69cGEx/rKhWDYpkVuS/3yHoXB5UmnobKAfOXYv1RM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560974512697230.1532317330766; Wed, 19 Jun 2019 13:01:52 -0700 (PDT) Received: from localhost ([::1]:41564 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgmF-0006sW-Pu for importer@patchew.org; Wed, 19 Jun 2019 16:01:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55966) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgYo-0003v4-4w for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:48:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdgYk-00065D-BO for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:47:55 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:35640) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdgYi-0005bC-C7 for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:47:52 -0400 Received: by mail-wr1-x435.google.com with SMTP id m3so534237wrv.2 for ; Wed, 19 Jun 2019 12:47:20 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id n14sm16674768wra.75.2019.06.19.12.47.18 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jun 2019 12:47:18 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AEB0A1FF9E; Wed, 19 Jun 2019 20:40:22 +0100 (BST) 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=onoeKhH8i7/jHDfnhI6V24OKwHYPamArShy5EWC2B6w=; b=bPLYOztDZhjrRxVwKgFe5togLrKirPuJkAAU9VtDd3RNium9uKaD3Exmu1IZXJZgd8 AXqvng71GAQh1hD6LLMEJgNL2dLMY3NrKkwmzyflPzsE33FM8tyrhRX/L4qi82+YI9UN TkPCuzftqXfoCLPXler9X0GGLGWADYeWGiHN5Lr4DD8JxSXC64v0iCXI3ILgUgqLbpcB LfBUhKX+P70E3eTASlWga+g1KVnpT8jXbh+E86GSDfO24SgrZh7gG59VXTyqQi0grKc+ Cami+ocTN32GmC/8r908V/5LB7+kF1hNR9MlCMzDvUhORdHJOj5I9d9XZSuRLOV+HyUD qVBg== 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=onoeKhH8i7/jHDfnhI6V24OKwHYPamArShy5EWC2B6w=; b=jUzx4MpOIgDwG00NYiYbLY4EYxd02nEVQROOwmfOwsFYW66/LDPJ+7IMaHMhbWQQXa Al9kCuxdYeicgoQgeiq2/F0Mpp15eP+597gtLHgmfqTdcpxfxcOCFyTjevzbjgIsRgf8 D/xdeAYJx7cemqm/QkJYM26/H7QuQvLUlFP1HQ9Dlh6GdpVFR7/530uCzuDm9Xm/204o 231qD9WJGmPMWY4/VhO9U6N59i95N2PeHV9TTXWPDEtzyhe/bkOM2V2L8am0ujMi9FPf UfeAw3L81pdqz5cIbiwMrQVY2fEm9IkzPrPyPuNVdeGfD5bd8SDf1fiR/o1lF+ALFDUJ tCUQ== X-Gm-Message-State: APjAAAU8OdY/dSJlEVGRY+4xdf6fqXtsVfzcoQAn5Jt9d1a/8f4t1nqB sr/8vNDLtTJuD681gO5gSkea4A== X-Google-Smtp-Source: APXvYqy1KrB5hQO+mR9wPB/Ic6QtSsz9KNRxaP966bWFOWM/JhvJfogsvb/8adkmG4xDmwcge3Hqng== X-Received: by 2002:adf:da47:: with SMTP id r7mr44177wrl.56.1560973639809; Wed, 19 Jun 2019 12:47:19 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 19 Jun 2019 20:40:19 +0100 Message-Id: <20190619194021.8240-16-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::435 Subject: [Qemu-devel] [PATCH v1 15/17] tests/vm: ubuntu.i386: apt proxy setup 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=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Gerd Hoffmann Configure apt proxy so package downloads can be cached and can pass firewalls. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20190617043858.8290-12-kraxel@redhat.com> --- tests/vm/ubuntu.i386 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386 index 3ea459ee20..38f740eabf 100755 --- a/tests/vm/ubuntu.i386 +++ b/tests/vm/ubuntu.i386 @@ -51,6 +51,10 @@ class UbuntuX86VM(basevm.BaseVM): " ssh-authorized-keys:\n", " - %s\n" % basevm.SSH_PUB_KEY, "locale: en_US.UTF-8\n"]) + proxy =3D os.environ.get("http_proxy") + if not proxy is None: + udata.writelines(["apt:\n", + " proxy: %s" % proxy]) udata.close() subprocess.check_call(["genisoimage", "-output", "cloud-init.iso", "-volid", "cidata", "-joliet", "-rock", --=20 2.20.1 From nobody Tue Nov 11 03:17:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560974803; cv=none; d=zoho.com; s=zohoarc; b=D6G//AMo5qQ8OOmt8rNOcKdXTCVuIRRjF4FZGcGordT3sQ1W25NZitLHRY+aJ/WLSB/CoGAoKxQt6rU9u7uzXHMXplud0g8A9KR4w8pS+4MeebZgW7lQ94LP13k1ADa4x7xrvgOzLEb0DDAy/9vS8visdFaB+ds3RwUEpQC0t+g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560974803; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=z4VvhhuchSdMT3GYoRhtK0sFOye981rDs7adl9IorKk=; b=DKk+/+s6DCJ98LnsP8t5R6gAi3JDoqBgEMWF2mlKXyXsAUggd8P9RVgnBujc/wxFGZQfdP1CbQtkwm0eGzsU42kl8ILM439+R7HbIKqVFaZwiU+NaWY5WZcmqmXAA4bXFKopX50W/Y3Nd6h5eV8thS/fYW+ytQUibklyK4DCnks= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560974803466932.6579959485387; Wed, 19 Jun 2019 13:06:43 -0700 (PDT) Received: from localhost ([::1]:41610 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgqr-0001um-G1 for importer@patchew.org; Wed, 19 Jun 2019 16:06:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56122) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgZA-000459-2T for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:48:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdgZ8-0006mI-Aw for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:48:19 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:44734) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdgZ7-0005bR-Di for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:48:17 -0400 Received: by mail-wr1-x443.google.com with SMTP id r16so477367wrl.11 for ; Wed, 19 Jun 2019 12:47:21 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id v27sm36544731wrv.45.2019.06.19.12.47.18 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jun 2019 12:47:18 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C12681FF9F; Wed, 19 Jun 2019 20:40:22 +0100 (BST) 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=z4VvhhuchSdMT3GYoRhtK0sFOye981rDs7adl9IorKk=; b=XToJjNX3ocCDt98L335DOJbdH5DcmpT4Wv3EJ7NaA5aW84SC4mHOnv544EdzrCbsec rh1xDOwYq9Hfvb/2hjP3c32q9P2ED5wIoZedJiU93bkY1xa/labgXITJBU3pu7LPwGBi fEJaw2ET/JzDuyMaQkq98D6IoQHDHPy+06j1lGOKzP4IV6J+vRNoqDz35oI2wP/L6p1h O+2jzCLIgspbDFvWOdGUeex1qkuhyzMgnQ/JLOoh/YZUm895NsYU3Am0xcvzundGpzHD nTRrlGEM9jzmuWfGVED3E+j1OoQmHKzi/fazISkZ8PIFKKEaAeTPpA7pzD2F80EMflmJ QbLQ== 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=z4VvhhuchSdMT3GYoRhtK0sFOye981rDs7adl9IorKk=; b=FLi6zaxC8lakKWZWiYth5W1Y4mFcOcIn+cMJUrRUVof6oIyfZkxmhd5ZrRaiHE3ALb nje35DEQjh+8BdNL4rzGLTmpfbVuZXzG++fA2nGCVBmJpfvDxza5OMs8OTvt/tBNVzmL KkQ1ht+aF1wtU7DE6zit/61YIcOUrtfkRkUXi+P5FqeFPZWO1EpQ7d0nfwzi3RLONhzs 5zI06zB1PyN9PpllDEWVrxK24jQwxJOo2zT88DnqHoNgOrWQF3siwQRMeK1mghW5+wPF 4mvfPwX1564GgspwBl9hdZ0fBg1B1ASDfVKb4YttB0z7RnpNjLtuiObh6B/sjqiGGVoi 2qUQ== X-Gm-Message-State: APjAAAXa1zqvhrrj3Ru+sEedDy2m//HHYT6oEanpK+2zBBYxQeml48PX LWTY6NTal0AQyTZQgZRwbuhI/w== X-Google-Smtp-Source: APXvYqyEBv3Hk8f4FqT1Xa3oSGAD/frdrKs0Rc2eeCRumzSV7mmIO0FxTWlteVyMNnWQ9CDrmjb7oA== X-Received: by 2002:adf:db12:: with SMTP id s18mr34656917wri.335.1560973640305; Wed, 19 Jun 2019 12:47:20 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 19 Jun 2019 20:40:20 +0100 Message-Id: <20190619194021.8240-17-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 Subject: [Qemu-devel] [PATCH v1 16/17] .travis.yml: default the --disable-system build to --static 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?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) It's fairly common to build qemu-user binaries with --static linking so the binary can be copied around without libraries. Enable --static in the default qemu-user build to cover this. There are other qemu-user builds that use dynamic linking so they should catch any problems there. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index aeb9b211cd..9750dc905c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -80,7 +80,7 @@ script: matrix: include: - env: - - CONFIG=3D"--disable-system" + - CONFIG=3D"--disable-system --static" =20 =20 # we split the system builds as it takes a while to build them all --=20 2.20.1 From nobody Tue Nov 11 03:17:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560974415; cv=none; d=zoho.com; s=zohoarc; b=fy7wtOhVtnC2BSE20pXWlJcfkxsw7qyhxrdjIy0DIuKpmunOX2fIjyAtw+LXt1xbzfIxl1HYuwoiNuYDdods0EP6wVj1SxD4KfWYDHTbBSbNmZGK3eoBNbMNitxfRlF2p7D+zWmWA5QJA56ghwt3K5FPw/I4nWwynAwyu48yMPk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560974415; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=tCyaA/37lVkaqonlS+tvjCwQYalKW2S3rd3JDUZadC8=; b=Zm1l5CPT5pUjD686rQF1IjcXF6IynKLay7QU9FlxUaC4j75sicui8NzVYkJ8MX0yGNsiDJIFGvvI9rZDP8WMx6RXrVYKIrJLwUTxLqdZefiX3y4JXQQU+Ki2yvP8w4Jr6m8o+kFhyItqpaZQRALqQaKFrUQ4cf+GEODYZt+ueh0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560974415488791.460776948453; Wed, 19 Jun 2019 13:00:15 -0700 (PDT) Received: from localhost ([::1]:41556 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgkd-0006NO-4F for importer@patchew.org; Wed, 19 Jun 2019 16:00:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55980) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdgYp-0003v7-7P for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:48:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdgYk-00066T-TB for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:47:56 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:54961) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdgYj-0005aH-RU for qemu-devel@nongnu.org; Wed, 19 Jun 2019 15:47:54 -0400 Received: by mail-wm1-x344.google.com with SMTP id g135so687321wme.4 for ; Wed, 19 Jun 2019 12:47:20 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id n3sm14517578wro.59.2019.06.19.12.47.18 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jun 2019 12:47:18 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D39391FFA3; Wed, 19 Jun 2019 20:40:22 +0100 (BST) 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=tCyaA/37lVkaqonlS+tvjCwQYalKW2S3rd3JDUZadC8=; b=BNSXM843/luvjaSm/D1+syXE24C/jWC2fPMxHBn9sYEedIJWsvmFBJKD8WMek9QjRC 3DxU0dOHRI2/23vFwpHRb+mSVN6Nzo21ONg/s7GjvcSOjnBvWs9m773qTGBxmSJAGU/i R+76orE0tGdUlPKn8vpR5TywQYnqR37fT5YBvPF9O0IJpeTVUu/EdWyTd7HZKWsWpzZA /0bv6Bc2AAYTjRp6q6JDQGJD/MgUMJa2AJ6cGFpF/gQcquTZD8tR6YaDjSfplQbzrfoe TqANVBYhRXIINu7cokFklOViFnI4ESzQHFshBjjxe4ljekXKbjsO5//Lr2SUbENOKirI M8Cw== 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=tCyaA/37lVkaqonlS+tvjCwQYalKW2S3rd3JDUZadC8=; b=i+4qMdefog8uLG6tR3QO+0UN5+JkiMse36KKDch/op21frJr7CXOZY79Jp/EkWjYLZ z53nME2WTlduJ5xGVok1piQbo4gR7IFF5VNYOriY4oJVAa4qp7LqccS6wScLNliHm5Pr e/F206BJ07RH8N+acqSPAD2axNN9/6JFt9Ol/c52q9iHMYCDBQg95wzmzZdA2YphUDFJ 4plDF8Ok/JkJnRpk36ulcdpQIKUVcIz4IQczoWgTORRqUG2WBhgErRv9aI3F9wS3fypP c3IvzFD3jaKAlOJ9UM8N0VPcGSOGdasWUj/c+69wPV4gWRBA9+ZWGruq0BlIceulpC0B 8LJg== X-Gm-Message-State: APjAAAWJ8DLBV1NEenveZ6nSY2ejlt8DU3VJuDRmPUgwAURqNTmyO1lQ JY28Qz1avMsymjP64W2O5XHx3A== X-Google-Smtp-Source: APXvYqzWSqWq3szr/ylBQ/p9EMY+KRcvy6QAlQRAEFTSqYqj9pSTkQCSohDKbqboocJkFGUfohBC/g== X-Received: by 2002:a1c:9c8a:: with SMTP id f132mr9606393wme.29.1560973638685; Wed, 19 Jun 2019 12:47:18 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 19 Jun 2019 20:40:21 +0100 Message-Id: <20190619194021.8240-18-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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] [PATCH v1 17/17] .travis.yml: force a brew update for MacOS builds 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?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) It looks like the Travis image package databases are out of date causing the build to error with: Error: Your Homebrew is outdated. Please run `brew update`. Error: Kernel.exit Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 9750dc905c..a891ce2485 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,6 +43,7 @@ addons: - glib - pixman - gnu-sed + update: true =20 =20 # The channel name "irc.oftc.net#qemu" is encrypted against qemu/qemu --=20 2.20.1