* [PULL v2 0/9] s390x and test patches 2025-01-21
@ 2025-01-22 8:01 Thomas Huth
2025-01-22 8:01 ` [PULL v2 1/9] tests/functional: Convert the kvm_xen_guest avocado test Thomas Huth
2025-01-22 16:30 ` [PULL v2 0/9] s390x and test patches 2025-01-21 Stefan Hajnoczi
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Huth @ 2025-01-22 8:01 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Hajnoczi
Hi Stefan!
The following changes since commit d6430c17d7113d3c38480dc34e59d00b0504e2f7:
Merge tag 'pull-riscv-to-apply-20250119-1' of https://github.com/alistair23/qemu into staging (2025-01-19 08:55:46 -0500)
are available in the Git repository at:
https://gitlab.com/thuth/qemu.git tags/pull-request-2025-01-21v2
for you to fetch changes up to 9744ceb94bf963ed42685c7d28024a77de2fbe78:
pc-bios: Update the s390 bios images with the recent changes (2025-01-22 08:28:49 +0100)
----------------------------------------------------------------
* Fix bugs related to the new "boot order" feature in the s390-ccw bios
* Fix crash that occurs when introspecting older s390-virtio-ccw machines
* Fix error in pbkdf code on fast machines (e.g. s390x with crypto adapter)
* Convert kvm_xen_guest avocado test to the functional framework
v2: Replace cancel() with skipTest() in the first patch
----------------------------------------------------------------
Daniel P. Berrangé (1):
crypto: fix bogus error benchmarking pbkdf on fast machines
Jared Rossi (1):
pc-bios/s390-ccw: Abort IPL on invalid loadparm
Philippe Mathieu-Daudé (1):
MAINTAINERS: Remove myself as Avocado Framework reviewer
Thomas Huth (6):
tests/functional: Convert the kvm_xen_guest avocado test
hw/s390x: Fix crash that occurs when inspecting older versioned machines types
pc-bios/s390-ccw/virtio: Add a function to reset a virtio device
pc-bios/s390-ccw: Fix boot problem with virtio-net devices
pc-bios/s390-ccw/netmain: Fix error messages with regards to the TFTP server
pc-bios: Update the s390 bios images with the recent changes
MAINTAINERS | 3 +-
pc-bios/s390-ccw/virtio.h | 2 +
crypto/pbkdf.c | 15 +++-
hw/s390x/s390-virtio-ccw.c | 15 ++--
pc-bios/s390-ccw/bootmap.c | 15 ++--
pc-bios/s390-ccw/netmain.c | 52 +++++++-----
pc-bios/s390-ccw/virtio-net.c | 5 ++
pc-bios/s390-ccw/virtio.c | 7 +-
pc-bios/s390-ccw.img | Bin 79608 -> 96000 bytes
tests/functional/meson.build | 2 +
.../test_x86_64_kvm_xen.py} | 89 ++++++++++++---------
11 files changed, 128 insertions(+), 77 deletions(-)
rename tests/{avocado/kvm_xen_guest.py => functional/test_x86_64_kvm_xen.py} (61%)
mode change 100644 => 100755
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PULL v2 1/9] tests/functional: Convert the kvm_xen_guest avocado test
2025-01-22 8:01 [PULL v2 0/9] s390x and test patches 2025-01-21 Thomas Huth
@ 2025-01-22 8:01 ` Thomas Huth
2025-01-22 16:30 ` [PULL v2 0/9] s390x and test patches 2025-01-21 Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2025-01-22 8:01 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Hajnoczi, David Woodhouse
Use the serial console to execute the commands in the guest instead
of using ssh since we don't have ssh support in the functional
framework yet.
Acked-by: David Woodhouse <dwmw@amazon.co.uk>
Message-ID: <20250113082516.57894-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
MAINTAINERS | 2 +-
tests/functional/meson.build | 2 +
.../test_x86_64_kvm_xen.py} | 89 +++++++++++--------
3 files changed, 55 insertions(+), 38 deletions(-)
rename tests/{avocado/kvm_xen_guest.py => functional/test_x86_64_kvm_xen.py} (61%)
mode change 100644 => 100755
diff --git a/MAINTAINERS b/MAINTAINERS
index 846b81e3ec..94834b7876 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -489,7 +489,7 @@ S: Supported
F: include/system/kvm_xen.h
F: target/i386/kvm/xen*
F: hw/i386/kvm/xen*
-F: tests/avocado/kvm_xen_guest.py
+F: tests/functional/test_x86_64_kvm_xen.py
Guest CPU Cores (other accelerators)
------------------------------------
diff --git a/tests/functional/meson.build b/tests/functional/meson.build
index cf80924ddc..b7719ab85f 100644
--- a/tests/functional/meson.build
+++ b/tests/functional/meson.build
@@ -44,6 +44,7 @@ test_timeouts = {
'riscv64_tuxrun' : 120,
's390x_ccw_virtio' : 420,
'sh4_tuxrun' : 240,
+ 'x86_64_kvm_xen' : 180,
}
tests_generic_system = [
@@ -244,6 +245,7 @@ tests_x86_64_system_thorough = [
'netdev_ethtool',
'virtio_gpu',
'x86_64_hotplug_cpu',
+ 'x86_64_kvm_xen',
'x86_64_tuxrun',
]
diff --git a/tests/avocado/kvm_xen_guest.py b/tests/functional/test_x86_64_kvm_xen.py
old mode 100644
new mode 100755
similarity index 61%
rename from tests/avocado/kvm_xen_guest.py
rename to tests/functional/test_x86_64_kvm_xen.py
index f8cb458d5d..0298c96c2e
--- a/tests/avocado/kvm_xen_guest.py
+++ b/tests/functional/test_x86_64_kvm_xen.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python3
+#
# KVM Xen guest functional tests
#
# Copyright © 2021 Red Hat, Inc.
@@ -13,19 +15,12 @@
from qemu.machine import machine
-from avocado_qemu import LinuxSSHMixIn
-from avocado_qemu import QemuSystemTest
-from avocado_qemu import wait_for_console_pattern
+from qemu_test import QemuSystemTest, Asset, exec_command_and_wait_for_pattern
+from qemu_test import wait_for_console_pattern
-class KVMXenGuest(QemuSystemTest, LinuxSSHMixIn):
- """
- :avocado: tags=arch:x86_64
- :avocado: tags=machine:q35
- :avocado: tags=accel:kvm
- :avocado: tags=kvm_xen_guest
- """
+class KVMXenGuest(QemuSystemTest):
- KERNEL_DEFAULT = 'printk.time=0 root=/dev/xvda console=ttyS0'
+ KERNEL_DEFAULT = 'printk.time=0 root=/dev/xvda console=ttyS0 quiet'
kernel_path = None
kernel_params = None
@@ -33,14 +28,15 @@ class KVMXenGuest(QemuSystemTest, LinuxSSHMixIn):
# Fetch assets from the kvm-xen-guest subdir of my shared test
# images directory on fileserver.linaro.org where you can find
# build instructions for how they where assembled.
- def get_asset(self, name, sha1):
- base_url = ('https://fileserver.linaro.org/s/'
- 'kE4nCFLdQcoBF9t/download?'
- 'path=%2Fkvm-xen-guest&files=' )
- url = base_url + name
- # use explicit name rather than failing to neatly parse the
- # URL into a unique one
- return self.fetch_asset(name=name, locations=(url), asset_hash=sha1)
+ ASSET_KERNEL = Asset(
+ ('https://fileserver.linaro.org/s/kE4nCFLdQcoBF9t/download?'
+ 'path=%2Fkvm-xen-guest&files=bzImage'),
+ 'ec0ad7bb8c33c5982baee0a75505fe7dbf29d3ff5d44258204d6307c6fe0132a')
+
+ ASSET_ROOTFS = Asset(
+ ('https://fileserver.linaro.org/s/kE4nCFLdQcoBF9t/download?'
+ 'path=%2Fkvm-xen-guest&files=rootfs.ext4'),
+ 'b11045d649006c649c184e93339aaa41a8fe20a1a86620af70323252eb29e40b')
def common_vm_setup(self):
# We also catch lack of KVM_XEN support if we fail to launch
@@ -51,10 +47,8 @@ def common_vm_setup(self):
self.vm.add_args("-accel", "kvm,xen-version=0x4000a,kernel-irqchip=split")
self.vm.add_args("-smp", "2")
- self.kernel_path = self.get_asset("bzImage",
- "367962983d0d32109998a70b45dcee4672d0b045")
- self.rootfs = self.get_asset("rootfs.ext4",
- "f1478401ea4b3fa2ea196396be44315bab2bb5e4")
+ self.kernel_path = self.ASSET_KERNEL.fetch()
+ self.rootfs = self.ASSET_ROOTFS.fetch()
def run_and_check(self):
self.vm.add_args('-kernel', self.kernel_path,
@@ -68,10 +62,10 @@ def run_and_check(self):
self.vm.launch()
except machine.VMLaunchFailure as e:
if "Xen HVM guest support not present" in e.output:
- self.cancel("KVM Xen support is not present "
- "(need v5.12+ kernel with CONFIG_KVM_XEN)")
+ self.skipTest("KVM Xen support is not present "
+ "(need v5.12+ kernel with CONFIG_KVM_XEN)")
elif "Property 'kvm-accel.xen-version' not found" in e.output:
- self.cancel("QEMU not built with CONFIG_XEN_EMU support")
+ self.skipTest("QEMU not built with CONFIG_XEN_EMU support")
else:
raise e
@@ -79,10 +73,11 @@ def run_and_check(self):
console_pattern = 'Starting dropbear sshd: OK'
wait_for_console_pattern(self, console_pattern, 'Oops')
self.log.info('sshd ready')
- self.ssh_connect('root', '', False)
- self.ssh_command('cat /proc/cmdline')
- self.ssh_command('dmesg | grep -e "Grant table initialized"')
+ exec_command_and_wait_for_pattern(self, 'cat /proc/cmdline', 'xen')
+ exec_command_and_wait_for_pattern(self, 'dmesg | grep "Grant table"',
+ 'Grant table initialized')
+ wait_for_console_pattern(self, '#', 'Oops')
def test_kvm_xen_guest(self):
"""
@@ -94,7 +89,9 @@ def test_kvm_xen_guest(self):
self.kernel_params = (self.KERNEL_DEFAULT +
' xen_emul_unplug=ide-disks')
self.run_and_check()
- self.ssh_command('grep xen-pirq.*msi /proc/interrupts')
+ exec_command_and_wait_for_pattern(self,
+ 'grep xen-pirq.*msi /proc/interrupts',
+ 'virtio0-output')
def test_kvm_xen_guest_nomsi(self):
"""
@@ -106,7 +103,9 @@ def test_kvm_xen_guest_nomsi(self):
self.kernel_params = (self.KERNEL_DEFAULT +
' xen_emul_unplug=ide-disks pci=nomsi')
self.run_and_check()
- self.ssh_command('grep xen-pirq.* /proc/interrupts')
+ exec_command_and_wait_for_pattern(self,
+ 'grep xen-pirq.* /proc/interrupts',
+ 'virtio0')
def test_kvm_xen_guest_noapic_nomsi(self):
"""
@@ -118,7 +117,9 @@ def test_kvm_xen_guest_noapic_nomsi(self):
self.kernel_params = (self.KERNEL_DEFAULT +
' xen_emul_unplug=ide-disks noapic pci=nomsi')
self.run_and_check()
- self.ssh_command('grep xen-pirq /proc/interrupts')
+ exec_command_and_wait_for_pattern(self,
+ 'grep xen-pirq /proc/interrupts',
+ 'virtio0')
def test_kvm_xen_guest_vapic(self):
"""
@@ -130,8 +131,13 @@ def test_kvm_xen_guest_vapic(self):
self.kernel_params = (self.KERNEL_DEFAULT +
' xen_emul_unplug=ide-disks')
self.run_and_check()
- self.ssh_command('grep xen-pirq /proc/interrupts')
- self.ssh_command('grep PCI-MSI /proc/interrupts')
+ exec_command_and_wait_for_pattern(self,
+ 'grep xen-pirq /proc/interrupts',
+ 'acpi')
+ wait_for_console_pattern(self, '#')
+ exec_command_and_wait_for_pattern(self,
+ 'grep PCI-MSI /proc/interrupts',
+ 'virtio0-output')
def test_kvm_xen_guest_novector(self):
"""
@@ -143,7 +149,9 @@ def test_kvm_xen_guest_novector(self):
' xen_emul_unplug=ide-disks' +
' xen_no_vector_callback')
self.run_and_check()
- self.ssh_command('grep xen-platform-pci /proc/interrupts')
+ exec_command_and_wait_for_pattern(self,
+ 'grep xen-platform-pci /proc/interrupts',
+ 'fasteoi')
def test_kvm_xen_guest_novector_nomsi(self):
"""
@@ -156,7 +164,9 @@ def test_kvm_xen_guest_novector_nomsi(self):
' xen_emul_unplug=ide-disks pci=nomsi' +
' xen_no_vector_callback')
self.run_and_check()
- self.ssh_command('grep xen-platform-pci /proc/interrupts')
+ exec_command_and_wait_for_pattern(self,
+ 'grep xen-platform-pci /proc/interrupts',
+ 'IO-APIC')
def test_kvm_xen_guest_novector_noapic(self):
"""
@@ -168,4 +178,9 @@ def test_kvm_xen_guest_novector_noapic(self):
' xen_emul_unplug=ide-disks' +
' xen_no_vector_callback noapic')
self.run_and_check()
- self.ssh_command('grep xen-platform-pci /proc/interrupts')
+ exec_command_and_wait_for_pattern(self,
+ 'grep xen-platform-pci /proc/interrupts',
+ 'XT-PIC')
+
+if __name__ == '__main__':
+ QemuSystemTest.main()
--
2.48.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PULL v2 0/9] s390x and test patches 2025-01-21
2025-01-22 8:01 [PULL v2 0/9] s390x and test patches 2025-01-21 Thomas Huth
2025-01-22 8:01 ` [PULL v2 1/9] tests/functional: Convert the kvm_xen_guest avocado test Thomas Huth
@ 2025-01-22 16:30 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2025-01-22 16:30 UTC (permalink / raw)
To: Thomas Huth; +Cc: qemu-devel, Stefan Hajnoczi
[-- Attachment #1: Type: text/plain, Size: 116 bytes --]
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any user-visible changes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-22 16:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-22 8:01 [PULL v2 0/9] s390x and test patches 2025-01-21 Thomas Huth
2025-01-22 8:01 ` [PULL v2 1/9] tests/functional: Convert the kvm_xen_guest avocado test Thomas Huth
2025-01-22 16:30 ` [PULL v2 0/9] s390x and test patches 2025-01-21 Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).