Skip to content

Commit dc26a2c

Browse files
committed
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) <[email protected]>" [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 <[email protected]>
2 parents 3214bec + ae0aef5 commit dc26a2c

35 files changed

+463
-182
lines changed

.gitlab-ci.d/cirrus/freebsd-14.vars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake'
1111
NINJA='/usr/local/bin/ninja'
1212
PACKAGING_COMMAND='pkg'
1313
PIP3='/usr/local/bin/pip'
14-
PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk-vnc gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson mtools ncurses nettle ninja opencv pixman pkgconf png py311-numpy py311-pillow py311-pip py311-pyyaml py311-sphinx py311-sphinx_rtd_theme py311-tomli python3 rpm2cpio rust rust-bindgen-cli sdl2 sdl2_image snappy sndio socat spice-protocol tesseract usbredir virglrenderer vte3 xorriso zstd'
14+
PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache4 cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk-vnc gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson mtools ncurses nettle ninja opencv pixman pkgconf png py311-numpy py311-pillow py311-pip py311-pyyaml py311-sphinx py311-sphinx_rtd_theme py311-tomli python3 rpm2cpio rust rust-bindgen-cli sdl2 sdl2_image snappy sndio socat spice-protocol tesseract usbredir virglrenderer vte3 xorriso zstd'
1515
PYPI_PKGS=''
1616
PYTHON='/usr/local/bin/python3'

MAINTAINERS

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,6 +1288,7 @@ F: include/hw/intc/goldfish_pic.h
12881288
F: include/hw/intc/m68k_irqc.h
12891289
F: include/hw/misc/virt_ctrl.h
12901290
F: docs/specs/virt-ctlr.rst
1291+
F: tests/functional/test_m68k_tuxrun.py
12911292

12921293
MicroBlaze Machines
12931294
-------------------
@@ -4151,7 +4152,6 @@ M: Alex Bennée <[email protected]>
41514152
T: git https://gitlab.com/stsquad/qemu testing/next
41524153
M: Philippe Mathieu-Daudé <[email protected]>
41534154
M: Thomas Huth <[email protected]>
4154-
R: Wainer dos Santos Moschetta <[email protected]>
41554155
S: Maintained
41564156
F: .github/workflows/lockdown.yml
41574157
F: .gitlab-ci.yml
@@ -4197,7 +4197,6 @@ Integration Testing with the Avocado framework
41974197
W: https://trello.com/b/6Qi1pxVn/avocado-qemu
41984198
R: Cleber Rosa <[email protected]>
41994199
R: Philippe Mathieu-Daudé <[email protected]>
4200-
R: Wainer dos Santos Moschetta <[email protected]>
42014200
S: Odd Fixes
42024201
F: tests/avocado/
42034202

pc-bios/keymaps/meson.build

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,18 @@ else
3939
native_qemu_keymap = qemu_keymap
4040
endif
4141

42+
keymap_targets = []
4243
if native_qemu_keymap.found()
43-
t = []
4444
foreach km, args: keymaps
4545
# generate with qemu-kvm
46-
t += custom_target(km,
47-
build_by_default: true,
48-
output: km,
49-
command: [native_qemu_keymap, '-f', '@OUTPUT@', args.split()],
50-
install: have_system,
51-
install_dir: qemu_datadir / 'keymaps')
46+
keymap_targets += custom_target(km,
47+
build_by_default: true,
48+
output: km,
49+
command: [native_qemu_keymap, '-f', '@OUTPUT@', args.split()],
50+
install: have_system,
51+
install_dir: qemu_datadir / 'keymaps')
5252
endforeach
53-
54-
alias_target('update-keymaps', t)
53+
alias_target('update-keymaps', keymap_targets)
5554
else
5655
install_data(keymaps.keys(), install_dir: qemu_datadir / 'keymaps')
5756
endif

system/qtest.c

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ static void *qtest_server_send_opaque;
7878
* let you adjust the value of the clock (monotonically). All the commands
7979
* return the current value of the clock in nanoseconds.
8080
*
81+
* If the commands FAIL then time wasn't advanced which is likely
82+
* because the machine was in a paused state or no timer events exist
83+
* in the future. This will cause qtest to abort and the test will
84+
* need to check its assumptions.
85+
*
8186
* .. code-block:: none
8287
*
8388
* > clock_step
@@ -710,7 +715,8 @@ static void qtest_process_command(CharBackend *chr, gchar **words)
710715
qtest_sendf(chr, "OK little\n");
711716
}
712717
} else if (qtest_enabled() && strcmp(words[0], "clock_step") == 0) {
713-
int64_t ns;
718+
int64_t old_ns = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
719+
int64_t ns, new_ns;
714720

715721
if (words[1]) {
716722
int ret = qemu_strtoi64(words[1], NULL, 0, &ns);
@@ -719,11 +725,10 @@ static void qtest_process_command(CharBackend *chr, gchar **words)
719725
ns = qemu_clock_deadline_ns_all(QEMU_CLOCK_VIRTUAL,
720726
QEMU_TIMER_ATTR_ALL);
721727
}
722-
qemu_clock_advance_virtual_time(
723-
qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + ns);
728+
new_ns = qemu_clock_advance_virtual_time(old_ns + ns);
724729
qtest_send_prefix(chr);
725-
qtest_sendf(chr, "OK %"PRIi64"\n",
726-
(int64_t)qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL));
730+
qtest_sendf(chr, "%s %"PRIi64"\n",
731+
new_ns > old_ns ? "OK" : "FAIL", new_ns);
727732
} else if (strcmp(words[0], "module_load") == 0) {
728733
Error *local_err = NULL;
729734
int rv;
@@ -740,16 +745,16 @@ static void qtest_process_command(CharBackend *chr, gchar **words)
740745
qtest_sendf(chr, "FAIL\n");
741746
}
742747
} else if (qtest_enabled() && strcmp(words[0], "clock_set") == 0) {
743-
int64_t ns;
748+
int64_t ns, new_ns;
744749
int ret;
745750

746751
g_assert(words[1]);
747752
ret = qemu_strtoi64(words[1], NULL, 0, &ns);
748753
g_assert(ret == 0);
749-
qemu_clock_advance_virtual_time(ns);
754+
new_ns = qemu_clock_advance_virtual_time(ns);
750755
qtest_send_prefix(chr);
751-
qtest_sendf(chr, "OK %"PRIi64"\n",
752-
(int64_t)qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL));
756+
qtest_sendf(chr, "%s %"PRIi64"\n",
757+
new_ns == ns ? "OK" : "FAIL", new_ns);
753758
} else if (process_command_cb && process_command_cb(chr, words)) {
754759
/* Command got consumed by the callback handler */
755760
} else {

tests/docker/dockerfiles/debian-mips64el-cross.docker

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,18 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
9393
libcmocka-dev:mips64el \
9494
libcurl4-gnutls-dev:mips64el \
9595
libdaxctl-dev:mips64el \
96+
libdrm-dev:mips64el \
97+
libepoxy-dev:mips64el \
9698
libfdt-dev:mips64el \
9799
libffi-dev:mips64el \
98100
libfuse3-dev:mips64el \
101+
libgbm-dev:mips64el \
99102
libgcrypt20-dev:mips64el \
100103
libglib2.0-dev:mips64el \
101104
libglusterfs-dev:mips64el \
102105
libgnutls28-dev:mips64el \
106+
libgtk-3-dev:mips64el \
107+
libgtk-vnc-2.0-dev:mips64el \
103108
libibverbs-dev:mips64el \
104109
libiscsi-dev:mips64el \
105110
libjemalloc-dev:mips64el \
@@ -119,6 +124,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
119124
librbd-dev:mips64el \
120125
librdmacm-dev:mips64el \
121126
libsasl2-dev:mips64el \
127+
libsdl2-dev:mips64el \
128+
libsdl2-image-dev:mips64el \
122129
libseccomp-dev:mips64el \
123130
libselinux1-dev:mips64el \
124131
libslirp-dev:mips64el \
@@ -134,6 +141,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
134141
libusb-1.0-0-dev:mips64el \
135142
libusbredirhost-dev:mips64el \
136143
libvdeplug-dev:mips64el \
144+
libvirglrenderer-dev:mips64el \
145+
libvte-2.91-dev:mips64el \
137146
libxdp-dev:mips64el \
138147
libzstd-dev:mips64el \
139148
nettle-dev:mips64el \

tests/docker/dockerfiles/debian-riscv64-cross.docker

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# THIS FILE WAS AUTO-GENERATED
22
#
3-
# $ lcitool dockerfile --layers all --cross-arch riscv64 debian-sid qemu-minimal
3+
# $ lcitool dockerfile --layers all --cross-arch riscv64 debian-13 qemu-minimal
44
#
55
# https://gitlab.com/libvirt/libvirt-ci
66

7-
FROM docker.io/library/debian:sid-slim
7+
FROM docker.io/library/debian:trixie-slim
88

99
RUN export DEBIAN_FRONTEND=noninteractive && \
1010
apt-get update && \

tests/docker/dockerfiles/debian-tricore-cross.docker

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
#
1212
FROM docker.io/library/debian:11-slim
1313

14-
MAINTAINER Philippe Mathieu-Daudé <[email protected]>
15-
1614
RUN apt update && \
1715
DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
1816
DEBIAN_FRONTEND=noninteractive eatmydata apt install -yy \

tests/functional/meson.build

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ endif
1313
test_timeouts = {
1414
'aarch64_aspeed' : 600,
1515
'aarch64_raspi4' : 480,
16+
'aarch64_rme_virt' : 1200,
17+
'aarch64_rme_sbsaref' : 1200,
1618
'aarch64_sbsaref_alpine' : 720,
1719
'aarch64_sbsaref_freebsd' : 720,
1820
'aarch64_tuxrun' : 240,
@@ -60,6 +62,8 @@ tests_aarch64_system_thorough = [
6062
'aarch64_aspeed',
6163
'aarch64_raspi3',
6264
'aarch64_raspi4',
65+
'aarch64_rme_virt',
66+
'aarch64_rme_sbsaref',
6367
'aarch64_sbsaref',
6468
'aarch64_sbsaref_alpine',
6569
'aarch64_sbsaref_freebsd',
@@ -116,6 +120,7 @@ tests_m68k_system_thorough = [
116120
'm68k_mcf5208evb',
117121
'm68k_nextcube',
118122
'm68k_q800',
123+
'm68k_tuxrun',
119124
]
120125

121126
tests_microblaze_system_thorough = [

tests/functional/qemu_test/tuxruntest.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,7 @@ def fetch_tuxrun_assets(self, kernel_asset, rootfs_asset, dtb_asset=None):
7373
Fetch the TuxBoot assets.
7474
"""
7575
kernel_image = kernel_asset.fetch()
76-
disk_image_zst = rootfs_asset.fetch()
77-
78-
disk_image = self.scratch_file("rootfs.ext4")
79-
80-
check_call(['zstd', "-f", "-d", disk_image_zst,
81-
"-o", disk_image],
82-
stdout=DEVNULL, stderr=DEVNULL)
83-
# zstd copies source archive permissions for the output
84-
# file, so must make this writable for QEMU
85-
os.chmod(disk_image, stat.S_IRUSR | stat.S_IWUSR)
86-
76+
disk_image = self.uncompress(rootfs_asset)
8777
dtb = dtb_asset.fetch() if dtb_asset is not None else None
8878

8979
return (kernel_image, disk_image, dtb)

tests/functional/qemu_test/uncompress.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
import gzip
1111
import lzma
1212
import os
13+
import stat
1314
import shutil
1415
from urllib.parse import urlparse
16+
from subprocess import check_call, CalledProcessError
1517

1618
from .asset import Asset
1719

@@ -38,6 +40,24 @@ def lzma_uncompress(xz_path, output_path):
3840
os.remove(output_path)
3941
raise
4042

43+
44+
def zstd_uncompress(zstd_path, output_path):
45+
if os.path.exists(output_path):
46+
return
47+
48+
try:
49+
check_call(['zstd', "-f", "-d", zstd_path,
50+
"-o", output_path])
51+
except CalledProcessError as e:
52+
os.remove(output_path)
53+
raise Exception(
54+
f"Unable to decompress zstd file {zstd_path} with {e}") from e
55+
56+
# zstd copies source archive permissions for the output
57+
# file, so must make this writable for QEMU
58+
os.chmod(output_path, stat.S_IRUSR | stat.S_IWUSR)
59+
60+
4161
'''
4262
@params compressed: filename, Asset, or file-like object to uncompress
4363
@params uncompressed: filename to uncompress into
@@ -59,6 +79,8 @@ def uncompress(compressed, uncompressed, format=None):
5979
lzma_uncompress(str(compressed), uncompressed)
6080
elif format == "gz":
6181
gzip_uncompress(str(compressed), uncompressed)
82+
elif format == "zstd":
83+
zstd_uncompress(str(compressed), uncompressed)
6284
else:
6385
raise Exception(f"Unknown compression format {format}")
6486

@@ -79,5 +101,7 @@ def guess_uncompress_format(compressed):
79101
return "xz"
80102
elif ext == ".gz":
81103
return "gz"
104+
elif ext in [".zstd", ".zst"]:
105+
return 'zstd'
82106
else:
83107
raise Exception(f"Unknown compression format for {compressed}")

0 commit comments

Comments
 (0)