From nobody Wed Nov 19 18:38:42 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1702565024; cv=none; d=zohomail.com; s=zohoarc; b=jQTUicLe29Xnfklcmv0UDggbIbtKm1QD+3B0HCcoEMLWU6pndWLflP35aFuiRUexrGGCN6vydPUahRfqJyhCIvWN8CvCzD3KTzvR93p0duS/2A2U5JrggDvTjgRD2NL28Zrx8HAwXM9xC/a8kqj3g8T2SkbcER5dHc8kxrfOkoE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1702565024; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=1SWxyyNzlsjwPy0q/4QbwRxuffpVyZhHt3UlcyYmbr8=; b=Pb7l/t8BI5X/kyAVj56Mw9/49XdZGVkYM0n/mArTv7sQNKV7BDXs/OEvypEy8yqCTAVG62xBMx1SWxhwziIaCA1RA0YZjXszErR35OTXmZC1G+6S6t9xrHivQ4DG1w/t9eq6mOY7FAlRcw4BNhlvBabVYv5kNNogJaJZIu/cZL4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1702565024186637.150063113435; Thu, 14 Dec 2023 06:43:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rDmvQ-0002ul-UN; Thu, 14 Dec 2023 09:42:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rDmvN-0002u0-ID for qemu-devel@nongnu.org; Thu, 14 Dec 2023 09:42:53 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rDmvL-00009l-Sa for qemu-devel@nongnu.org; Thu, 14 Dec 2023 09:42:53 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-3364a5ccbb1so464234f8f.1 for ; Thu, 14 Dec 2023 06:42:50 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id j4-20020adfea44000000b00336471bc7ffsm1917888wrn.109.2023.12.14.06.42.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 06:42:49 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id A4FC25F7A7; Thu, 14 Dec 2023 14:42:48 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702564969; x=1703169769; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=1SWxyyNzlsjwPy0q/4QbwRxuffpVyZhHt3UlcyYmbr8=; b=a4CQJGMCUQZO0XoGp0Xtm7OekR5ZVr6yBwyIWX9TBVJj54vc0ZwOggwFPQoEAnnVgg SjbXZgHW18J5/rA3YkNtBcNYKTV4aNKbyO+nQxZat1KitqA1HXu3raczm6hBt8Yry1jv 8b0oZNaQDdQiiojpuITkZ5NvlMEECmutRLj9anJ+Sp2dBM4EmV2q38JX6+VKXu09dSki peOJl1xksaEK5BP55wCnTlK51t8NdzPq1C3INJMiz/mnxwODJhe4JZIw4y5CdcuEZA2O FRsu/sUaPSbUKiCua7/LCXlaElQihoqYkISYDrDtucIpcv1U4bxyRGSDPg+w+J/yNzrP hKAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702564969; x=1703169769; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1SWxyyNzlsjwPy0q/4QbwRxuffpVyZhHt3UlcyYmbr8=; b=fi4w50utfdcd5XYhtcKbgnt+PJyOLoiayQAiF48m7JhlOxA0sA345wxWbqd/Kv6ccz y/BvzuB3yQVACGApXSmYRKwM7qxdUb9E279lflNxMBZdPC0K/ujYLq7jYPJkG3TGw8Mr fsL8ihCFDsbqrK7yEid4zebZ63SXfZ9y5q6IkmQOTRav+yWxpkX/ba/+sMwCW0Rgudv5 2K0Aw8tbrGjUkDy7hjVin0YB0J1J4z6chyxX6xS/19/m1R5JMZ1Tbx66gCnw+ZKu7e/R gt6ClR26Kg5225TiOehrOD/EhUjXllSujIbEpikpxxSs5nkfo79jnlJRk9+xYI77F8Ev rGOA== X-Gm-Message-State: AOJu0Yw0uuyzGmH0EawsxQzsUrH7epytHfvAlNCVlpE5xAjHR2plCtkb iURZ2Z0uWCL9tsksvqog0nsl0g== X-Google-Smtp-Source: AGHT+IEtM4YWr1SY7BR4AadjmbL/DehKmBeFshSqCwIBI4qLY+SQ5PNZW7qIchr7zPwTRbVn9BMnuA== X-Received: by 2002:a05:6000:1b86:b0:333:5247:be11 with SMTP id r6-20020a0560001b8600b003335247be11mr5103718wru.119.1702564969390; Thu, 14 Dec 2023 06:42:49 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , David Woodhouse , Paul Durrant , Cleber Rosa , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal , Paolo Bonzini , kvm@vger.kernel.org (open list:Overall KVM CPUs) Subject: [RFC PATCH] tests/avocado: avoid a copy to support read/write rootfs Date: Thu, 14 Dec 2023 14:42:43 +0000 Message-Id: <20231214144243.36887-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1702565026738100003 While the test causes the rootfs to be updated we don't actually need to persist anything between runs. Avoid the copy by enabling "snapshot=3Don" for the drive instead. Signed-off-by: Alex Benn=C3=A9e --- tests/avocado/kvm_xen_guest.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/avocado/kvm_xen_guest.py b/tests/avocado/kvm_xen_guest.py index d73fa888ef..f30313e6cf 100644 --- a/tests/avocado/kvm_xen_guest.py +++ b/tests/avocado/kvm_xen_guest.py @@ -57,14 +57,10 @@ def common_vm_setup(self, readwrite=3DFalse): "367962983d0d32109998a70b45dcee4= 672d0b045") self.rootfs =3D self.get_asset("rootfs.ext4", "f1478401ea4b3fa2ea196396be44315bab2b= b5e4") - if readwrite: - dest =3D os.path.join(self.workdir, os.path.basename(self.root= fs)) - shutil.copy(self.rootfs, dest) - self.rootfs =3D dest =20 def run_and_check(self, readwrite=3DFalse): if readwrite: - drive =3D f"file=3D{self.rootfs},if=3Dnone,format=3Draw,id=3Dd= rv0" + drive =3D f"file=3D{self.rootfs},if=3Dnone,snapshot=3Don,forma= t=3Draw,id=3Ddrv0" else: drive =3D f"file=3D{self.rootfs},if=3Dnone,readonly=3Don,forma= t=3Draw,id=3Ddrv0" self.vm.add_args('-kernel', self.kernel_path, --=20 2.39.2