]>
Commit | Line | Data |
---|---|---|
5b863f3e EH |
1 | # Check for crash when using empty -cpu option |
2 | # | |
3 | # Copyright (c) 2019 Red Hat, Inc. | |
4 | # | |
5 | # Author: | |
6 | # Eduardo Habkost <ehabkost@redhat.com> | |
7 | # | |
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. | |
2283b627 | 10 | from avocado_qemu import QemuSystemTest |
5b863f3e | 11 | |
2283b627 | 12 | class EmptyCPUModel(QemuSystemTest): |
5b863f3e | 13 | def test(self): |
c80c6beb WSM |
14 | self.vm.add_args('-S', '-display', 'none', '-machine', 'none', '-cpu', '') |
15 | self.vm.set_qmp_monitor(enabled=False) | |
16 | self.vm.launch() | |
17 | self.vm.wait() | |
861f724d | 18 | self.assertEqual(self.vm.exitcode(), 1, "QEMU exit code should be 1") |
c80c6beb | 19 | self.assertRegex(self.vm.get_log(), r'-cpu option cannot be empty') |