From patchwork Thu Jul 31 10:23:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 67820 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA364C87FCC for ; Thu, 31 Jul 2025 10:23:19 +0000 (UTC) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by mx.groups.io with SMTP id smtpd.web11.58640.1753957393874513409 for ; Thu, 31 Jul 2025 03:23:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=yphn5ttg; spf=pass (domain: smile.fr, ip: 209.85.128.68, mailfrom: yoann.congal@smile.fr) Received: by mail-wm1-f68.google.com with SMTP id 5b1f17b1804b1-4589b3e3820so7136535e9.3 for ; Thu, 31 Jul 2025 03:23:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1753957392; x=1754562192; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2L4vWGSA29NlOV7m5A9foDo+jjLHx7PlDN4jNYyt4aU=; b=yphn5ttgyAC/U9dfGc3eyQqMzwo3LESEAGQnbG9Yl5BJgRvfP0Jxs9G8kW01OCP7Ul tUA+oiyEBmXI7JX2SlslLS/kenQHxlSz/T82i+5N5iRKneQnlNi7UiCKYkoGbOmAu+Gp OwgrirQW8z4+LFaq2eF+NT0C4kq0Jbc6OEeKU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753957392; x=1754562192; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date: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ukwYB9vwaggJI+O17Qwoync= X-Google-Smtp-Source: AGHT+IFjLWyRQlSC4I14yjLxiut7Zwl9LuIMi/ds0rc1J7875e0XqCu296721+v6l80LtQs3ENCWxA== X-Received: by 2002:a05:600c:8b71:b0:456:161c:3d61 with SMTP id 5b1f17b1804b1-458a4f945camr10418235e9.22.1753957391959; Thu, 31 Jul 2025 03:23:11 -0700 (PDT) Received: from P-ASN-ECS-830T8C3.idf.intranet (static-css-ccs-204145.business.bouyguestelecom.com. [176.157.204.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4589536abb1sm65169445e9.4.2025.07.31.03.23.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Jul 2025 03:23:11 -0700 (PDT) From: Yoann Congal To: openembedded-core@lists.openembedded.org Cc: Yoann Congal Subject: [PATCH v4 2/4] selftest: runqemu: add tests for booting zst compressed image Date: Thu, 31 Jul 2025 12:23:01 +0200 Message-Id: <20250731102303.3513121-2-yoann.congal@smile.fr> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250731102303.3513121-1-yoann.congal@smile.fr> References: <20250731102303.3513121-1-yoann.congal@smile.fr> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 31 Jul 2025 10:23:19 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/221186 From: Yoann Congal Add a simple tests booting a compressed image given to runqemu as path and as image recipe name. Signed-off-by: Yoann Congal --- meta/lib/oeqa/selftest/cases/runqemu.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/cases/runqemu.py b/meta/lib/oeqa/selftest/cases/runqemu.py index f01e1eec66..46ca0b4480 100644 --- a/meta/lib/oeqa/selftest/cases/runqemu.py +++ b/meta/lib/oeqa/selftest/cases/runqemu.py @@ -31,7 +31,7 @@ class RunqemuTests(OESelftestTestCase): if self.td["HOST_ARCH"] in ('i586', 'i686', 'x86_64'): self.fstypes += " iso hddimg" if self.machine == "qemux86-64": - self.fstypes += " wic.vmdk wic.qcow2 wic.vdi" + self.fstypes += " wic.vmdk wic.qcow2 wic.vdi wic.zst" self.cmd_common = "runqemu nographic" kvm = oe.types.qemu_use_kvm(get_bb_var('QEMU_USE_KVM'), self.td["TARGET_ARCH"]) @@ -152,6 +152,23 @@ SYSLINUX_TIMEOUT = "10" with open(qemu.qemurunnerlog) as f: self.assertTrue(qemu.runner.logged, "Failed: %s, %s" % (cmd, f.read())) + def test_boot_compressed_wic_by_path(self): + """Test runqemu /path/to/rootfs.wic.zst""" + rootfs = "%s.wic.zst" % (self.image_link_name) + rootfs = os.path.join(self.deploy_dir_image, rootfs) + if not os.path.exists(rootfs): + self.skipTest("%s not found" % rootfs) + cmd = "%s %s snapshot" % (self.cmd_common, rootfs) + with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu: + with open(qemu.qemurunnerlog) as f: + self.assertTrue(qemu.runner.logged, "Failed: %s, %s" % (cmd, f.read())) + + def test_boot_compressed_wic_by_recipe(self): + """Test runqemu recipe-image wic.zst""" + cmd = "%s %s snapshot wic.zst" % (self.cmd_common, self.recipe) + with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu: + with open(qemu.qemurunnerlog) as f: + self.assertTrue(qemu.runner.logged, "Failed: %s, %s" % (cmd, f.read())) # This test was designed as a separate class to test that shutdown # command will shutdown qemu as expected on each qemu architecture