]> Git Repo - qemu.git/blame - tests/acceptance/empty_cpu_model.py
tests/docker: Install Sphinx in the Fedora image
[qemu.git] / tests / acceptance / empty_cpu_model.py
CommitLineData
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 <[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.
10import subprocess
11from avocado_qemu import Test
12
13class 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.040891 seconds and 4 git commands to generate.