import re


def check_failure(test_result):
    """
    Return True if a failure was found.

    :param test_result: test result log.
    :return: True if failure found, false otherwise.
    """
    fail_regexes = ["Confirmed ! The contract is suicidal !",
                    "Confirmed ! The contract is prodigal !",
                    "Leak vulnerability found!",
                    "Locking vulnerability found!",
                    "The code does not have CALL/SUICIDE/DELEGATECALL/CALLCODE thus is greedy !"]
    for fail_regex in fail_regexes:
        if re.search(fail_regex, test_result, re.IGNORECASE):
            return True
    return False