Run QEMU with all combinations of -machine and -device types,
check for crashes and unexpected errors.
"""
+from __future__ import print_function
import sys
import os
import argparse
from itertools import chain
-sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'scripts'))
from qemu import QEMUMachine
logger = logging.getLogger('device-crash-test')
{'device':'isa-ipmi-bt', 'expected':True}, # IPMI device requires a bmc attribute to be set
{'device':'isa-ipmi-kcs', 'expected':True}, # IPMI device requires a bmc attribute to be set
{'device':'isa-parallel', 'expected':True}, # Can't create serial device, empty char device
- {'device':'isa-serial', 'expected':True}, # Can't create serial device, empty char device
{'device':'ivshmem', 'expected':True}, # You must specify either 'shm' or 'chardev'
{'device':'ivshmem-doorbell', 'expected':True}, # You must specify a 'chardev'
{'device':'ivshmem-plain', 'expected':True}, # You must specify a 'memdev'
{'device':'pc-dimm', 'expected':True}, # 'memdev' property is not set
{'device':'pci-bridge', 'expected':True}, # Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0.
{'device':'pci-bridge-seat', 'expected':True}, # Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0.
- {'device':'pci-serial', 'expected':True}, # Can't create serial device, empty char device
- {'device':'pci-serial-2x', 'expected':True}, # Can't create serial device, empty char device
- {'device':'pci-serial-4x', 'expected':True}, # Can't create serial device, empty char device
{'device':'pxa2xx-dma', 'expected':True}, # channels value invalid
{'device':'pxb', 'expected':True}, # Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0.
{'device':'scsi-block', 'expected':True}, # drive property not set
{'device':'tpm-tis', 'expected':True}, # tpm_tis: backend driver with id (null) could not be found
{'device':'unimplemented-device', 'expected':True}, # property 'size' not specified or zero
{'device':'usb-braille', 'expected':True}, # Property chardev is required
- {'device':'usb-mtp', 'expected':True}, # x-root property must be configured
+ {'device':'usb-mtp', 'expected':True}, # rootdir property must be configured
{'device':'usb-redir', 'expected':True}, # Parameter 'chardev' is missing
{'device':'usb-serial', 'expected':True}, # Property chardev is required
{'device':'usb-storage', 'expected':True}, # drive property not set
{'exitcode':-6, 'log':r"Object .* is not an instance of type generic-pc-machine", 'loglevel':logging.ERROR},
{'exitcode':-6, 'log':r"Object .* is not an instance of type e500-ccsr", 'loglevel':logging.ERROR},
{'exitcode':-6, 'log':r"vmstate_register_with_alias_id: Assertion `!se->compat \|\| se->instance_id == 0' failed", 'loglevel':logging.ERROR},
- {'exitcode':-6, 'device':'isa-fdc', 'loglevel':logging.ERROR, 'expected':True},
- {'exitcode':-11, 'device':'isa-serial', 'loglevel':logging.ERROR, 'expected':True},
- {'exitcode':-11, 'device':'mioe3680_pci', 'loglevel':logging.ERROR, 'expected':True},
- {'exitcode':-11, 'device':'pcm3680_pci', 'loglevel':logging.ERROR, 'expected':True},
- {'exitcode':-11, 'device':'kvaser_pci', 'loglevel':logging.ERROR, 'expected':True},
# everything else (including SIGABRT and SIGSEGV) will be a fatal error:
{'exitcode':None, 'fatal':True, 'loglevel':logging.FATAL},
tc[k] = v
if len(binariesToTest(args, tc)) == 0:
- print >>sys.stderr, "No QEMU binary found"
+ print("No QEMU binary found", file=sys.stderr)
parser.print_usage(sys.stderr)
return 1