config_tools: update condition for bootargs error check

add bootargs error check only when kernel type is KERNEL_BZIMAGE.

Tracked-On: #5689

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
This commit is contained in:
Shuang Zheng 2021-02-02 15:08:04 +00:00 committed by wenlingz
parent f44fb6856b
commit bc5e472185

View File

@ -446,9 +446,9 @@ def main(args):
PASSTHROUGH_PTCT = False
kern_args = common.get_leaf_tag_map(scenario, "os_config", "bootargs")
vm_type = common.get_leaf_tag_map(scenario, "vm_type")
kern_type = common.get_leaf_tag_map(scenario, "os_config", "kern_type")
for vm_id, passthru_devices in dict_passthru_devices.items():
if kern_args[int(vm_id)].find('reboot=acpi') == -1 and vm_type[int(vm_id)] not in ['SAFETY_VM']:
if kern_args[int(vm_id)].find('reboot=acpi') == -1 and kern_type[int(vm_id)] in ['KERNEL_BZIMAGE']:
emsg = "you need to specify 'reboot=acpi' in scenario file's bootargs for VM{}".format(vm_id)
print(emsg)
err_dic['vm,bootargs'] = emsg