[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 19/25] tests/avocado: s390x cpu topology test socket full
From: |
Thomas Huth |
Subject: |
[PULL 19/25] tests/avocado: s390x cpu topology test socket full |
Date: |
Wed, 18 Oct 2023 15:07:10 +0200 |
From: Pierre Morel <pmorel@linux.ibm.com>
This test verifies that QMP set-cpu-topology does not accept
to overload a socket.
Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20231016183925.2384704-20-nsg@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/avocado/s390_topology.py | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/tests/avocado/s390_topology.py b/tests/avocado/s390_topology.py
index 3661048f4c..a63c2b2923 100644
--- a/tests/avocado/s390_topology.py
+++ b/tests/avocado/s390_topology.py
@@ -338,3 +338,29 @@ def test_dedicated(self):
self.guest_set_dispatching('0');
self.check_topology(0, 0, 0, 0, 'high', True)
self.check_polarization("horizontal")
+
+
+ def test_socket_full(self):
+ """
+ This test verifies that QEMU does not accept to overload a socket.
+ The socket-id 0 on book-id 0 already contains CPUs 0 and 1 and can
+ not accept any new CPU while socket-id 0 on book-id 1 is free.
+
+ :avocado: tags=arch:s390x
+ :avocado: tags=machine:s390-ccw-virtio
+ """
+ self.kernel_init()
+ self.vm.add_args('-smp',
+ '3,drawers=2,books=2,sockets=3,cores=2,maxcpus=24')
+ self.vm.launch()
+ self.wait_until_booted()
+
+ self.system_init()
+
+ res = self.vm.qmp('set-cpu-topology',
+ {'core-id': 2, 'socket-id': 0, 'book-id': 0})
+ self.assertEqual(res['error']['class'], 'GenericError')
+
+ res = self.vm.qmp('set-cpu-topology',
+ {'core-id': 2, 'socket-id': 0, 'book-id': 1})
+ self.assertEqual(res['return'], {})
--
2.41.0
- [PULL 09/25] qapi/s390x/cpu topology: set-cpu-topology qmp command, (continued)
- [PULL 09/25] qapi/s390x/cpu topology: set-cpu-topology qmp command, Thomas Huth, 2023/10/18
- [PULL 12/25] qapi/s390x/cpu topology: CPU_POLARIZATION_CHANGE QAPI event, Thomas Huth, 2023/10/18
- [PULL 17/25] tests/avocado: s390x cpu topology entitlement tests, Thomas Huth, 2023/10/18
- [PULL 13/25] qapi/s390x/cpu topology: add query-s390x-cpu-polarization command, Thomas Huth, 2023/10/18
- [PULL 21/25] tests/avocado: s390x cpu topology bad move, Thomas Huth, 2023/10/18
- [PULL 24/25] target/s390x/kvm: Simplify the GPRs, ACRs, CRs and prefix synchronization code, Thomas Huth, 2023/10/18
- [PULL 22/25] hw/s390x: Clean up global variable shadowing in quiesce_powerdown_req(), Thomas Huth, 2023/10/18
- [PULL 15/25] tests/avocado: s390x cpu topology core, Thomas Huth, 2023/10/18
- [PULL 14/25] docs/s390x/cpu topology: document s390x cpu topology, Thomas Huth, 2023/10/18
- [PULL 18/25] tests/avocado: s390x cpu topology test dedicated CPU, Thomas Huth, 2023/10/18
- [PULL 19/25] tests/avocado: s390x cpu topology test socket full,
Thomas Huth <=
- [PULL 20/25] tests/avocado: s390x cpu topology dedicated errors, Thomas Huth, 2023/10/18
- [PULL 23/25] target/s390x/kvm: Turn KVM_CAP_SYNC_REGS into a hard requirement, Thomas Huth, 2023/10/18
- [PULL 25/25] tests/qtest/migration-test: Disable the analyze-migration.py test on s390x, Thomas Huth, 2023/10/18
- [PULL 16/25] tests/avocado: s390x cpu topology polarization, Thomas Huth, 2023/10/18