Import QEMU upstream snapshot d2e570c
Upstream: https://gitlab.com/qemu-project/qemu.git Upstream-Commit: d2e570cc0f97b936902a5b1b86b73c0f5998b475
This commit is contained in:
commit
cf256aa081
11315 files changed
+3598369
No files matched your search
+24
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Check for crash when using empty -cpu option
|
||||
#
|
||||
# Copyright (c) 2019 Red Hat, Inc.
|
||||
#
|
||||
# Author:
|
||||
# Eduardo Habkost <[email protected]>
|
||||
#
|
||||
# This work is licensed under the terms of the GNU GPL, version 2 or
|
||||
# later. See the COPYING file in the top-level directory.
|
||||
from qemu_test import QemuSystemTest
|
||||
|
||||
class EmptyCPUModel(QemuSystemTest):
|
||||
def test(self):
|
||||
self.vm.add_args('-S', '-display', 'none', '-machine', 'none', '-cpu', '')
|
||||
self.vm.set_qmp_monitor(enabled=False)
|
||||
self.vm.launch()
|
||||
self.vm.wait()
|
||||
self.assertEqual(self.vm.exitcode(), 1, "QEMU exit code should be 1")
|
||||
self.assertRegex(self.vm.get_log(), r'-cpu option cannot be empty')
|
||||
|
||||
if __name__ == '__main__':
|
||||
QemuSystemTest.main()
|
||||
Reference in new issue
Block a user