diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2025-01-12 10:43:01 -0500 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2025-01-12 10:43:01 -0500 |
commit | dc26a2cd9cb68152d8528fa907346370d28bd240 (patch) | |
tree | fbfaad54aebc7e75b03ca02113c44c4cece86659 /tests/functional/qemu_test | |
parent | 3214bec13d8d4c40f707d21d8350d04e4123ae97 (diff) | |
parent | ae0aef5e761ad6425c634f3d83b8cc5b52d1ce0a (diff) | |
download | qemu-dc26a2cd9cb68152d8528fa907346370d28bd240.zip qemu-dc26a2cd9cb68152d8528fa907346370d28bd240.tar.gz qemu-dc26a2cd9cb68152d8528fa907346370d28bd240.tar.bz2 |
Merge tag 'pull-10.0-testing-updates-110125-1' of https://gitlab.com/stsquad/qemu into staging
Testing updates for 10.0
- update the tuxrun images to the latest baseline
- add the m68k tuxrun test
- ensure qtest checks the result of clock_step operations
- introduce new ztsd helper to functional tests
- ensure aarch64_virt test exits early when no TCG
- add new test to exercise virtio-vulkan
- bump libvirt-ci to latest version
- move riscv64 cross container from sid to trixie
- remove workaround from mips containers now upstream updated
- fix VM tests to use correct path for local QEMU binary
- add ability to get a root debug shell on VM images
- add keymap dependency to vnc tests
- remove retiring maintainers from avocado and dockerfiles
# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmeCYB4ACgkQ+9DbCVqe
# KkRS5Qf/V0rQ1OAxjK+/xrUPB84AYA4gwgInPzcENbQ0Oqkn2rnkEkyMlxC6AMd0
# H8AmARy/mkSivm6ZaKqhz0Xhw0rblU2ZtGMUp3Xw47fwVDJZY1Pvr8vXxPySiHGW
# 7GmiHJzOh+tDcY0TO2biCNFmiJJ2az2STIQDS6YX4QRJOU26qsfbIMXOoqDnUACo
# 2e5MDgRtVFuD3/6J1SpQxGnBE79mPMkCN0gqqfn0x6W9EqsVlqB3MfHEIp5/b+Tt
# Gfx8gi8HrKHUua01rjnxXyZPqrrAZ2zRo4bN1vLSJmqLN1X+yPYNEXCjOtM4f9uk
# g3PA76X1kX1MFMLMPkCefKFCxI5nsQ==
# =+yCJ
# -----END PGP SIGNATURE-----
# gpg: Signature made Sat 11 Jan 2025 07:12:14 EST
# gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44
* tag 'pull-10.0-testing-updates-110125-1' of https://gitlab.com/stsquad/qemu: (32 commits)
MAINTAINERS: Remove myself from reviewers
dockerfiles: Remove 'MAINTAINER' entry in debian-tricore-cross.docker
pc-bios: ensure keymaps dependencies set vnc tests
tests/vm: allow interactive login as root
tests/vm: partially un-tabify help output
tests/vm: fix build_path based path
tests/lcitool: remove temp workaround for debian mips64el
tests/docker: move riscv64 cross container from sid to trixie
tests/lcitool: bump to latest version of libvirt-ci
tests/functional: extend test_aarch64_virt with vulkan test
tests/functional: bail aarch64_virt tests early if missing TCG
tests/functional: remove unused kernel_command_line
tests/functional: update tuxruntest to use uncompress utility
tests/functional: add zstd support to uncompress utility
tests/functional: remove hacky sleep from the tests
system/qtest: properly feedback results of clock_[step|set]
tests/qtest: remove clock_steps from virtio tests
tests/functional/aarch64: add tests for FEAT_RME
tests/functional: update the x86_64 tuxrun tests
tests/functional: update the sparc64 tuxrun tests
...
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/functional/qemu_test')
-rw-r--r-- | tests/functional/qemu_test/tuxruntest.py | 12 | ||||
-rw-r--r-- | tests/functional/qemu_test/uncompress.py | 24 |
2 files changed, 25 insertions, 11 deletions
diff --git a/tests/functional/qemu_test/tuxruntest.py b/tests/functional/qemu_test/tuxruntest.py index 7227a83..41a4945 100644 --- a/tests/functional/qemu_test/tuxruntest.py +++ b/tests/functional/qemu_test/tuxruntest.py @@ -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) diff --git a/tests/functional/qemu_test/uncompress.py b/tests/functional/qemu_test/uncompress.py index 6d02ded..76dcf22 100644 --- a/tests/functional/qemu_test/uncompress.py +++ b/tests/functional/qemu_test/uncompress.py @@ -10,8 +10,10 @@ import gzip import lzma import os +import stat import shutil from urllib.parse import urlparse +from subprocess import check_call, CalledProcessError from .asset import Asset @@ -38,6 +40,24 @@ def lzma_uncompress(xz_path, output_path): os.remove(output_path) raise + +def zstd_uncompress(zstd_path, output_path): + if os.path.exists(output_path): + return + + try: + check_call(['zstd', "-f", "-d", zstd_path, + "-o", output_path]) + except CalledProcessError as e: + os.remove(output_path) + raise Exception( + f"Unable to decompress zstd file {zstd_path} with {e}") from e + + # zstd copies source archive permissions for the output + # file, so must make this writable for QEMU + os.chmod(output_path, stat.S_IRUSR | stat.S_IWUSR) + + ''' @params compressed: filename, Asset, or file-like object to uncompress @params uncompressed: filename to uncompress into @@ -59,6 +79,8 @@ def uncompress(compressed, uncompressed, format=None): lzma_uncompress(str(compressed), uncompressed) elif format == "gz": gzip_uncompress(str(compressed), uncompressed) + elif format == "zstd": + zstd_uncompress(str(compressed), uncompressed) else: raise Exception(f"Unknown compression format {format}") @@ -79,5 +101,7 @@ def guess_uncompress_format(compressed): return "xz" elif ext == ".gz": return "gz" + elif ext in [".zstd", ".zst"]: + return 'zstd' else: raise Exception(f"Unknown compression format for {compressed}") |