hw/arm/sbsa-ref: Remove unnecessary check for secure_sysmem == NULL
[qemu/ar7.git] / tests / acceptance / empty_cpu_model.py
blob3f4f663582a4e48598a3638bfec80024f72ce237
1 # Check for crash when using empty -cpu option
3 # Copyright (c) 2019 Red Hat, Inc.
5 # Author:
6 # Eduardo Habkost <ehabkost@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.
10 import subprocess
11 from avocado_qemu import Test
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")