def METHOD_NAME(self, mt, dev_type_name):
    mt['device'] = dev_type_name # Only for the debug() call.
    logger = logging.getLogger('machine')
    logger.debug(mt)
    with QEMUMachine(self.qemu_bin) as vm:
        vm.set_machine(mt["name"])
        vm.add_args('-nodefaults')
        for s in VM_DEV_PARAMS[dev_type_name]:
            vm.add_args(s)
        try:
            vm.launch()
            query_ok, props, error = self.query_virtqueue(vm, dev_type_name)
        except:
            query_ok = False
            error = sys.exc_info()[0]
    if not query_ok:
        self.fail('machine type {0}: {1}'.format(mt['name'], error))
    for prop_name, prop_val in props.items():
        expected_val = mt[prop_name]
        self.assertEqual(expected_val, prop_val)