1 # Check for crash when using empty -cpu option
3 # Copyright (c) 2019 Red Hat, Inc.
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.
11 from avocado_qemu import Test
13 class EmptyCPUModel(Test):
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")