2019-08-16 19:07:50 +02:00
|
|
|
#
|
|
|
|
# Ensure CPU die-id can be omitted on -device
|
|
|
|
#
|
|
|
|
# Copyright (c) 2019 Red Hat Inc
|
|
|
|
#
|
|
|
|
# Author:
|
|
|
|
# Eduardo Habkost <ehabkost@redhat.com>
|
|
|
|
#
|
|
|
|
# This library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
2020-11-10 19:42:22 +01:00
|
|
|
# version 2.1 of the License, or (at your option) any later version.
|
2019-08-16 19:07:50 +02:00
|
|
|
#
|
|
|
|
# This library is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# Lesser General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
|
|
# License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
|
2021-09-27 18:14:33 +02:00
|
|
|
from avocado_qemu import QemuSystemTest
|
2019-08-16 19:07:50 +02:00
|
|
|
|
2021-09-27 18:14:33 +02:00
|
|
|
class OmittedCPUProps(QemuSystemTest):
|
2019-08-16 19:07:50 +02:00
|
|
|
"""
|
|
|
|
:avocado: tags=arch:x86_64
|
2021-04-30 15:34:11 +02:00
|
|
|
:avocado: tags=cpu:qemu64
|
2019-08-16 19:07:50 +02:00
|
|
|
"""
|
|
|
|
def test_no_die_id(self):
|
|
|
|
self.vm.add_args('-nodefaults', '-S')
|
|
|
|
self.vm.add_args('-smp', '1,sockets=2,cores=2,threads=2,maxcpus=8')
|
|
|
|
self.vm.add_args('-device', 'qemu64-x86_64-cpu,socket-id=1,core-id=0,thread-id=0')
|
|
|
|
self.vm.launch()
|
2023-11-14 14:43:26 +01:00
|
|
|
self.assertEqual(len(self.vm.cmd('query-cpus-fast')), 2)
|