target/i386: Inline cmpxchg16b
[qemu/armbru.git] / tests / avocado / boot_linux.py
blobb3e58fa309363e42ff1f57d53f6142c1d82ca393
1 # Functional test that boots a complete Linux system via a cloud image
3 # Copyright (c) 2018-2020 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 import os
13 from avocado_qemu import LinuxTest, BUILD_DIR
15 from avocado import skipIf
18 class BootLinuxX8664(LinuxTest):
19 """
20 :avocado: tags=arch:x86_64
21 """
22 timeout = 480
24 def test_pc_i440fx_tcg(self):
25 """
26 :avocado: tags=machine:pc
27 :avocado: tags=accel:tcg
28 """
29 self.require_accelerator("tcg")
30 self.vm.add_args("-accel", "tcg")
31 self.launch_and_wait(set_up_ssh_connection=False)
33 def test_pc_i440fx_kvm(self):
34 """
35 :avocado: tags=machine:pc
36 :avocado: tags=accel:kvm
37 """
38 self.require_accelerator("kvm")
39 self.vm.add_args("-accel", "kvm")
40 self.launch_and_wait(set_up_ssh_connection=False)
42 def test_pc_q35_tcg(self):
43 """
44 :avocado: tags=machine:q35
45 :avocado: tags=accel:tcg
46 """
47 self.require_accelerator("tcg")
48 self.vm.add_args("-accel", "tcg")
49 self.launch_and_wait(set_up_ssh_connection=False)
51 def test_pc_q35_kvm(self):
52 """
53 :avocado: tags=machine:q35
54 :avocado: tags=accel:kvm
55 """
56 self.require_accelerator("kvm")
57 self.vm.add_args("-accel", "kvm")
58 self.launch_and_wait(set_up_ssh_connection=False)
61 # For Aarch64 we only boot KVM tests in CI as the TCG tests are very
62 # heavyweight. There are lighter weight distros which we use in the
63 # machine_aarch64_virt.py tests.
64 class BootLinuxAarch64(LinuxTest):
65 """
66 :avocado: tags=arch:aarch64
67 :avocado: tags=machine:virt
68 :avocado: tags=machine:gic-version=2
69 """
70 timeout = 720
72 def add_common_args(self):
73 self.vm.add_args('-bios',
74 os.path.join(BUILD_DIR, 'pc-bios',
75 'edk2-aarch64-code.fd'))
76 self.vm.add_args('-device', 'virtio-rng-pci,rng=rng0')
77 self.vm.add_args('-object', 'rng-random,id=rng0,filename=/dev/urandom')
79 @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab')
80 def test_fedora_cloud_tcg_gicv2(self):
81 """
82 :avocado: tags=accel:tcg
83 :avocado: tags=cpu:max
84 :avocado: tags=device:gicv2
85 """
86 self.require_accelerator("tcg")
87 self.vm.add_args("-accel", "tcg")
88 self.vm.add_args("-cpu", "max,lpa2=off")
89 self.vm.add_args("-machine", "virt,gic-version=2")
90 self.add_common_args()
91 self.launch_and_wait(set_up_ssh_connection=False)
93 @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab')
94 def test_fedora_cloud_tcg_gicv3(self):
95 """
96 :avocado: tags=accel:tcg
97 :avocado: tags=cpu:max
98 :avocado: tags=device:gicv3
99 """
100 self.require_accelerator("tcg")
101 self.vm.add_args("-accel", "tcg")
102 self.vm.add_args("-cpu", "max,lpa2=off")
103 self.vm.add_args("-machine", "virt,gic-version=3")
104 self.add_common_args()
105 self.launch_and_wait(set_up_ssh_connection=False)
107 def test_virt_kvm(self):
109 :avocado: tags=accel:kvm
110 :avocado: tags=cpu:host
112 self.require_accelerator("kvm")
113 self.vm.add_args("-accel", "kvm")
114 self.vm.add_args("-machine", "virt,gic-version=host")
115 self.add_common_args()
116 self.launch_and_wait(set_up_ssh_connection=False)
119 class BootLinuxPPC64(LinuxTest):
121 :avocado: tags=arch:ppc64
124 timeout = 360
126 def test_pseries_tcg(self):
128 :avocado: tags=machine:pseries
129 :avocado: tags=accel:tcg
131 self.require_accelerator("tcg")
132 self.vm.add_args("-accel", "tcg")
133 self.launch_and_wait(set_up_ssh_connection=False)
136 class BootLinuxS390X(LinuxTest):
138 :avocado: tags=arch:s390x
141 timeout = 240
143 @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab')
144 def test_s390_ccw_virtio_tcg(self):
146 :avocado: tags=machine:s390-ccw-virtio
147 :avocado: tags=accel:tcg
149 self.require_accelerator("tcg")
150 self.vm.add_args("-accel", "tcg")
151 self.launch_and_wait(set_up_ssh_connection=False)