[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 14/24] avocado_qemu: Functional test for RHBZ#1447027
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [RFC 14/24] avocado_qemu: Functional test for RHBZ#1447027 |
Date: |
Fri, 20 Apr 2018 15:19:41 -0300 |
From: Amador Pahim <address@hidden>
Fixed in commit e85c0d1.
According to the RHBZ1447027, the issue is: guest cannot boot with 240
or above vcpus when using ovmf.
Test consists in set the VM with 240 vcpus and the OVMF device to then
check whether the VM can be started.
A parameters.yaml file is provided in order to customize the OVMF files
locations. Execute with:
$ avocado run test_ovmf_with_240_vcpus.py -m \
test_ovmf_with_240_vcpus.py.data/parameters.yaml
Signed-off-by: Amador Pahim <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
tests/avocado/test_ovmf_with_240_vcpus.py | 70 ++++++++++++++++++++++
.../parameters.yaml | 2 +
2 files changed, 72 insertions(+)
create mode 100644 tests/avocado/test_ovmf_with_240_vcpus.py
create mode 100644
tests/avocado/test_ovmf_with_240_vcpus.py.data/parameters.yaml
diff --git a/tests/avocado/test_ovmf_with_240_vcpus.py
b/tests/avocado/test_ovmf_with_240_vcpus.py
new file mode 100644
index 0000000000..da688dbc76
--- /dev/null
+++ b/tests/avocado/test_ovmf_with_240_vcpus.py
@@ -0,0 +1,70 @@
+import os
+import shutil
+import sys
+
+from avocado import main
+from avocado_qemu import test
+
+
+class TestOvmfVcpus(test.QemuTest):
+ """
+ Run with:
+
+ avocado run test_ovmf_with_240_vcpus.py \
+ -m test_ovmf_with_240_vcpus.py.data/parameters.yaml
+
+ :avocado: enable
+ :avocado: tags=ovmf
+ """
+
+ def setUp(self):
+ ovmf_code_path = self.params.get('OVMF_CODE',
+
default='/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd')
+ ovmf_vars_path = self.params.get('OVMF_VARS',
+
default='/usr/share/edk2/ovmf/OVMF_VARS.fd')
+ if not ovmf_code_path or not os.path.exists(ovmf_code_path):
+ basename = os.path.basename(__file__)
+ self.cancel('OVMF_CODE file not found. Set the correct '
+ 'path on "%s.data/parameters.yaml" and run this test '
+ 'with: "avocado run %s -m %s.data/parameters.yaml"' %
+ (basename, basename, basename))
+ if not ovmf_vars_path or not os.path.exists(ovmf_vars_path):
+ basename = os.path.basename(__file__)
+ self.cancel('OVMF_VARS file not found. Set the correct '
+ 'path on "%s.data/parameters.yaml" and run this test '
+ 'with: "avocado run %s -m %s.data/parameters.yaml"' %
+ (basename, basename, basename))
+
+ ovmf_vars_tmp = os.path.join(self.workdir,
+ os.path.basename(ovmf_vars_path))
+ if not os.path.exists(ovmf_vars_tmp):
+ shutil.copy(ovmf_vars_path, self.workdir)
+
+ self.vm.args.extend(['-drive',
+ 'file=%s,if=pflash,format=raw,readonly=on,unit=0'
%
+ ovmf_code_path])
+ self.vm.args.extend(['-drive',
+ 'file=%s,if=pflash,format=raw,unit=1' %
+ ovmf_vars_tmp])
+
+ self.vm.args.extend(['-smp', '240'])
+
+ def test_run_vm(self):
+ """
+ According to the RHBZ1447027, the issue is: Guest cannot boot
+ with 240 or above vcpus when using ovmf.
+ Fixed in commit e85c0d14014514a2f0faeae5b4c23fab5b234de4.
+
+ :avocado: tags=RHBZ1447027
+ """
+
+ try:
+ self.vm.launch()
+ except Exception as details:
+ self.fail(details)
+
+ def tearDown(self):
+ self.vm.shutdown()
+
+if __name__ == "__main__":
+ avocado.main()
diff --git a/tests/avocado/test_ovmf_with_240_vcpus.py.data/parameters.yaml
b/tests/avocado/test_ovmf_with_240_vcpus.py.data/parameters.yaml
new file mode 100644
index 0000000000..79f6da1d29
--- /dev/null
+++ b/tests/avocado/test_ovmf_with_240_vcpus.py.data/parameters.yaml
@@ -0,0 +1,2 @@
+OVMF_CODE: /usr/share/edk2/ovmf/OVMF_CODE.secboot.fd
+OVMF_VARS: /usr/share/edk2/ovmf/OVMF_VARS.fd
--
2.14.3
- [Qemu-devel] [RFC 05/24] avocado_qemu: Increase the login timeout to 60s, (continued)
- [Qemu-devel] [RFC 05/24] avocado_qemu: Increase the login timeout to 60s, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 06/24] avocado_qemu: Add " " after the default prompt regexp, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 07/24] avocado_qemu: Store "arch" in VM, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 08/24] avocado_qemu: Provide defaults for user and pass, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 09/24] avocado_qemu: Ignore kernel messages on get_console, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 10/24] avocado_qemu: Add support to request image for testing, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 11/24] avocado_qemu: Fix exception name in caller, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 12/24] avocado_qemu: Improve migration error message, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 13/24] avocado_qemu: Functional test for RHBZ#1431939, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 14/24] avocado_qemu: Functional test for RHBZ#1447027,
Eduardo Habkost <=
- [Qemu-devel] [RFC 15/24] avocado_qemu: Functional test for RHBZ#1436616, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 16/24] avocado_qemu: Functional test for RHBZ1473203, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 17/24] avocado_qemu: Remove duplicate PortTracker implementation, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 19/24] avocado_qemu: Clean unneeded 'pass', Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 18/24] avocado_qemu: Simplify the installation instructions, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 20/24] avocado_qemu: Set QMP log level to INFO, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 22/24] avocado_qemu: Tests fixes, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 21/24] avocado_qemu: Introduce the add_image() VM API, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 23/24] avocado_qemu: Force vmimage distro, Eduardo Habkost, 2018/04/20