]> Git Repo - qemu.git/blob - tests/acceptance/empty_cpu_model.py
virtio-pci: Proxy for virtio-pmem
[qemu.git] / tests / acceptance / empty_cpu_model.py
1 # Check for crash when using empty -cpu option
2 #
3 # Copyright (c) 2019 Red Hat, Inc.
4 #
5 # Author:
6 #  Eduardo Habkost <[email protected]>
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.
10 import subprocess
11 from avocado_qemu import Test
12
13 class EmptyCPUModel(Test):
14     def test(self):
15         cmd = [self.qemu_bin, '-S', '-display', 'none', '-machine', 'none', '-cpu', '']
16         r = subprocess.run(cmd, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
17         self.assertEquals(r.returncode, 1, "QEMU exit code should be 1")
18         self.assertEquals(r.stdout, b'', "QEMU stdout should be empty")
19         self.assertNotEquals(r.stderr, b'', "QEMU stderr shouldn't be empty")
This page took 0.027179 seconds and 4 git commands to generate.