def METHOD_NAME(res):
    """
    Check blockcommit result according to active and inactive scenarios
    """
    if test_scenario == "active":
        libvirt.check_exit_status(res)
        expected_chain = test_obj.convert_expected_chain(expected_chain_index)
        check_obj.check_backingchain_from_vmxml(disk_type, test_obj.new_dev,
                                                expected_chain)
    elif test_scenario == "inactive":
        libvirt.check_exit_status(res, expect_error=True)
        libvirt.check_result(res, err_msg)