diff mbox series

[v4,20/32] tests/functional: update tuxruntest to use uncompress utility

Message ID 20250108121054.1126164-21-alex.bennee@linaro.org (mailing list archive)
State New
Headers show
Series testing/next: functional tests, qtest clocks, vm and keymaps (pre-PR-FINAL) | expand

Commit Message

Alex Bennée Jan. 8, 2025, 12:10 p.m. UTC
Use the utility functions to reduce code duplication.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/functional/qemu_test/tuxruntest.py | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

Comments

Thomas Huth Jan. 8, 2025, 2:09 p.m. UTC | #1
On 08/01/2025 13.10, Alex Bennée wrote:
> Use the utility functions to reduce code duplication.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   tests/functional/qemu_test/tuxruntest.py | 12 +-----------
>   1 file changed, 1 insertion(+), 11 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/tests/functional/qemu_test/tuxruntest.py b/tests/functional/qemu_test/tuxruntest.py
index 7227a83757..41a4945a14 100644
--- a/tests/functional/qemu_test/tuxruntest.py
+++ b/tests/functional/qemu_test/tuxruntest.py
@@ -73,17 +73,7 @@  def fetch_tuxrun_assets(self, kernel_asset, rootfs_asset, dtb_asset=None):
         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)