]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
tests/functional: update tuxruntest to use uncompress utility
authorAlex Bennée <alex.bennee@linaro.org>
Wed, 8 Jan 2025 12:10:42 +0000 (12:10 +0000)
committerAlex Bennée <alex.bennee@linaro.org>
Fri, 10 Jan 2025 11:18:32 +0000 (11:18 +0000)
Use the utility functions to reduce code duplication.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20250108121054.1126164-21-alex.bennee@linaro.org>

tests/functional/qemu_test/tuxruntest.py

index 7227a83757f529d5474abce885ce8b8dc66eeadd..41a4945a14f5d934db66859528bcdb048569eb66 100644 (file)
@@ -73,17 +73,7 @@ class TuxRunBaselineTest(QemuSystemTest):
         Fetch the TuxBoot assets.
         """
         kernel_image =  kernel_asset.fetch()
-        disk_image_zst = rootfs_asset.fetch()
-
-        disk_image = self.scratch_file("rootfs.ext4")
-
-        check_call(['zstd', "-f", "-d", disk_image_zst,
-                    "-o", disk_image],
-                   stdout=DEVNULL, stderr=DEVNULL)
-        # zstd copies source archive permissions for the output
-        # file, so must make this writable for QEMU
-        os.chmod(disk_image, stat.S_IRUSR | stat.S_IWUSR)
-
+        disk_image = self.uncompress(rootfs_asset)
         dtb = dtb_asset.fetch() if dtb_asset is not None else None
 
         return (kernel_image, disk_image, dtb)