qemu-kvm/kvm-tests-functional-add-tests-for-SCLP-event-CPI.patch
Miroslav Rezanina 9a3e1e2331 * Mon Nov 03 2025 Miroslav Rezanina <mrezanin@redhat.com> - 10.1.0-4
- kvm-qapi-machine-s390x-add-QAPI-event-SCLP_CPI_INFO_AVAI.patch [RHEL-104009 RHEL-105823 RHEL-73008]
- kvm-tests-functional-add-tests-for-SCLP-event-CPI.patch [RHEL-104009 RHEL-105823 RHEL-73008]
- kvm-redhat-Add-new-rhel9.8.0-and-rhel10.2.0-machine-type.patch [RHEL-104009 RHEL-105823 RHEL-73008]
- kvm-vfio-rename-field-to-num_initial_regions.patch [RHEL-118810]
- kvm-vfio-only-check-region-info-cache-for-initial-region.patch [RHEL-118810]
- kvm-arm-create-new-rhel-10.2-specific-virt-machine-type.patch [RHEL-105826 RHEL-105828]
- kvm-arm-create-new-rhel-9.8-specific-virt-machine-type.patch [RHEL-105826 RHEL-105828]
- kvm-x86-create-new-rhel-10.2-specific-pc-q35-machine-typ.patch [RHEL-105826 RHEL-105828]
- kvm-x86-create-new-rhel-9.8-specific-pc-q35-machine-type.patch [RHEL-105826 RHEL-105828]
- kvm-rh-enable-CONFIG_USB_STORAGE_BOT.patch [RHEL-101929]
- Resolves: RHEL-104009
  ([IBM 10.2 FEAT] KVM: Enhance machine type definition to include CPI and PCI passthru capabilities (qemu))
- Resolves: RHEL-105823
  (Add new -rhel10.2.0 machine type to qemu-kvm [s390x])
- Resolves: RHEL-73008
  ([IBM 10.2 FEAT] KVM: Implement Control Program Identification (qemu))
- Resolves: RHEL-118810
  ([RHEL 10.2] Windows 11 VM fails to boot up with ramfb='on' with QEMU 10.1)
- Resolves: RHEL-105826
  (Add new -rhel10.2.0 machine type to qemu-kvm [aarch64])
- Resolves: RHEL-105828
  (Add new -rhel10.2.0 machine type to qemu-kvm [x86_64])
- Resolves: RHEL-101929
  (enable 'usb-bot' device for proper support of USB CD-ROM drives via libvirt  )
2025-11-03 13:29:51 +01:00

77 lines
3.4 KiB
Diff

From c8082b70cdd198a4a5236ca0543e2653663fb1d4 Mon Sep 17 00:00:00 2001
From: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Date: Thu, 16 Oct 2025 14:17:08 +0200
Subject: [PATCH 02/10] tests/functional: add tests for SCLP event CPI
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
RH-Author: Thomas Huth <thuth@redhat.com>
RH-MergeRequest: 412: Add -rhel9.8.0 and -rhel10.2.0 s390x machine types and enable the CPI feature
RH-Jira: RHEL-104009 RHEL-105823 RHEL-73008
RH-Acked-by: Cédric Le Goater <clg@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
RH-Commit: [2/3] 7ff3e50bf038921d4514db88ef147ba92f960780 (thuth/qemu-kvm-cs)
JIRA: https://issues.redhat.com/browse/RHEL-73008
Add tests for SCLP event type Control-Program Identification.
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Suggested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Reviewed-by Thomas Huth <thuth@redhat.com>
Message-ID: <20251016121708.334133-2-shalini@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit bc436b739c3c8683ef5e8c22391952dcaa95242e)
---
tests/functional/test_s390x_ccw_virtio.py | 26 +++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/tests/functional/test_s390x_ccw_virtio.py b/tests/functional/test_s390x_ccw_virtio.py
index 453711aa0f..0455337856 100755
--- a/tests/functional/test_s390x_ccw_virtio.py
+++ b/tests/functional/test_s390x_ccw_virtio.py
@@ -15,6 +15,7 @@
import tempfile
from qemu_test import QemuSystemTest, Asset
+from qemu_test import exec_command
from qemu_test import exec_command_and_wait_for_pattern
from qemu_test import wait_for_console_pattern
@@ -270,5 +271,30 @@ def test_s390x_fedora(self):
'while ! (dmesg -c | grep Start.virtcrypto_remove) ; do'
' sleep 1 ; done', 'Start virtcrypto_remove.')
+ # Test SCLP event Control-Program Identification (CPI)
+ cpi = '/sys/firmware/cpi/'
+ sclpcpi = '/machine/sclp/s390-sclp-event-facility/sclpcpi'
+ self.log.info("Test SCLP event CPI")
+ exec_command(self, 'echo TESTVM > ' + cpi + 'system_name')
+ exec_command(self, 'echo LINUX > ' + cpi + 'system_type')
+ exec_command(self, 'echo TESTPLEX > ' + cpi + 'sysplex_name')
+ exec_command(self, 'echo 0x001a000000060b00 > ' + cpi + 'system_level')
+ exec_command_and_wait_for_pattern(self,
+ 'echo 1 > ' + cpi + 'set', ':/#')
+ try:
+ event = self.vm.event_wait('SCLP_CPI_INFO_AVAILABLE')
+ except TimeoutError:
+ self.fail('Timed out waiting for the SCLP_CPI_INFO_AVAILABLE event')
+ ts = self.vm.cmd('qom-get', path=sclpcpi, property='timestamp')
+ self.assertNotEqual(ts, 0)
+ name = self.vm.cmd('qom-get', path=sclpcpi, property='system_name')
+ self.assertEqual(name.strip(), 'TESTVM')
+ typ = self.vm.cmd('qom-get', path=sclpcpi, property='system_type')
+ self.assertEqual(typ.strip(), 'LINUX')
+ sysplex = self.vm.cmd('qom-get', path=sclpcpi, property='sysplex_name')
+ self.assertEqual(sysplex.strip(), 'TESTPLEX')
+ level = self.vm.cmd('qom-get', path=sclpcpi, property='system_level')
+ self.assertEqual(level, 0x001a000000060b00)
+
if __name__ == '__main__':
QemuSystemTest.main()
--
2.47.3