qemu-options: Remove the deprecated -no-hpet option
[qemu/kevin.git] / tests / avocado / hotplug_cpu.py
blob292bb43e4da0210d4049a9e4517a330af5bc8304
1 # Functional test that hotplugs a CPU and checks it on a Linux guest
3 # Copyright (c) 2021 Red Hat, Inc.
5 # Author:
6 # Cleber Rosa <crosa@redhat.com>
8 # This work is licensed under the terms of the GNU GPL, version 2 or
9 # later. See the COPYING file in the top-level directory.
11 from avocado_qemu import LinuxTest
14 class HotPlugCPU(LinuxTest):
16 def test(self):
17 """
18 :avocado: tags=arch:x86_64
19 :avocado: tags=machine:q35
20 :avocado: tags=accel:kvm
21 """
22 self.require_accelerator('kvm')
23 self.vm.add_args('-accel', 'kvm')
24 self.vm.add_args('-cpu', 'Haswell')
25 self.vm.add_args('-smp', '1,sockets=1,cores=2,threads=1,maxcpus=2')
26 self.launch_and_wait()
28 self.ssh_command('test -e /sys/devices/system/cpu/cpu0')
29 with self.assertRaises(AssertionError):
30 self.ssh_command('test -e /sys/devices/system/cpu/cpu1')
32 self.vm.cmd('device_add',
33 driver='Haswell-x86_64-cpu',
34 socket_id=0,
35 core_id=1,
36 thread_id=0)
37 self.ssh_command('test -e /sys/devices/system/cpu/cpu1')