diff options
| author | Brian Potchik <brian@vector35.com> | 2021-01-22 19:13:00 -0500 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2021-01-22 19:13:00 -0500 |
| commit | bbec616bb1d026a83f50a39c6e531faed637e201 (patch) | |
| tree | 6352911e32d8edc09afbba9b6b678a3054eed55d | |
| parent | 1537fbe8746803ee9024954bd75f09e7a8a3138e (diff) | |
Enable HLIL mapping unit tests.
| -rw-r--r-- | suite/testcommon.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/suite/testcommon.py b/suite/testcommon.py index 33300de7..9ab24e7b 100644 --- a/suite/testcommon.py +++ b/suite/testcommon.py @@ -194,8 +194,7 @@ class BinaryViewTestBuilder(Builder): retinfo.append("Function: {:x} Instruction: {:x} ADDR->LLILS: {}".format(func.start, ins.address, str(sorted(list(map(str, func.get_llils_at(ins.address))))))) retinfo.append("Function: {:x} Instruction: {:x} LLIL->MLIL: {}".format(func.start, ins.address, str(ins.mlil))) retinfo.append("Function: {:x} Instruction: {:x} LLIL->MLILS: {}".format(func.start, ins.address, str(sorted(list(map(str, ins.mlils)))))) - # TODO figure out the LLIL->HLIL instability - #retinfo.append("Function: {:x} Instruction: {:x} LLIL->HLIL: {}".format(func.start, ins.address, str(ins.hlil))) + retinfo.append("Function: {:x} Instruction: {:x} LLIL->HLIL: {}".format(func.start, ins.address, str(ins.hlil))) retinfo.append("Function: {:x} Instruction: {:x} Mapped MLIL: {}".format(func.start, ins.address, str(ins.mapped_medium_level_il))) retinfo.append("Function: {:x} Instruction: {:x} Value: {}".format(func.start, ins.address, str(ins.value))) retinfo.append("Function: {:x} Instruction: {:x} Possible Values: {}".format(func.start, ins.address, str(ins.possible_values))) @@ -249,8 +248,7 @@ class BinaryViewTestBuilder(Builder): retinfo.append("Function: {:x} Instruction: {:x} Mapped MLIL instruction index: {}".format(func.source_function.start, ins.address, str(func.get_mapped_medium_level_il_instruction_index(ins.instr_index)))) retinfo.append("Function: {:x} Instruction: {:x} LLIL_SSA->MLIL: {}".format(func.source_function.start, ins.address, str(ins.mlil))) retinfo.append("Function: {:x} Instruction: {:x} LLIL_SSA->MLILS: {}".format(func.source_function.start, ins.address, str(sorted(list(map(str, ins.mlils)))))) - # TODO figure out the LLIL_SSA->HLIL instability - #retinfo.append("Function: {:x} Instruction: {:x} LLIL_SSA->HLIL: {}".format(func.source_function.start, ins.address, str(ins.hlil))) + retinfo.append("Function: {:x} Instruction: {:x} LLIL_SSA->HLIL: {}".format(func.source_function.start, ins.address, str(ins.hlil))) return fixOutput(retinfo) def test_med_il_instructions(self): @@ -262,8 +260,7 @@ class BinaryViewTestBuilder(Builder): retinfo.append("Function: {:x} Instruction: {:x} Expression type: {}".format(func.start, ins.address, str(ins.expr_type))) retinfo.append("Function: {:x} Instruction: {:x} MLIL->LLIL: {}".format(func.start, ins.address, str(ins.llil))) retinfo.append("Function: {:x} Instruction: {:x} MLIL->LLILS: {}".format(func.start, ins.address, str(sorted(list(map(str, ins.llils)))))) - # TODO figure out the MLIL->HLIL instability - #retinfo.append("Function: {:x} Instruction: {:x} MLIL->HLIL: {}".format(func.start, ins.address, str(ins.hlil))) + retinfo.append("Function: {:x} Instruction: {:x} MLIL->HLIL: {}".format(func.start, ins.address, str(ins.hlil))) retinfo.append("Function: {:x} Instruction: {:x} Value: {}".format(func.start, ins.address, str(ins.value))) retinfo.append("Function: {:x} Instruction: {:x} Possible values: {}".format(func.start, ins.address, str(ins.possible_values))) retinfo.append("Function: {:x} Instruction: {:x} Branch dependence: {}".format(func.start, ins.address, str(sorted(ins.branch_dependence.items())))) @@ -365,8 +362,7 @@ class BinaryViewTestBuilder(Builder): for hlilins in func.hlil.instructions: retinfo.append("Function: {:x} Instruction: {:x} HLIL->LLIL instruction: {}".format(func.start, hlilins.address, str(hlilins.llil))) retinfo.append("Function: {:x} Instruction: {:x} HLIL->MLIL instruction: {}".format(func.start, hlilins.address, str(hlilins.mlil))) - # TODO figure out the HLIL->MLILS instability - #retinfo.append("Function: {:x} Instruction: {:x} HLIL->MLILS instruction: {}".format(func.start, hlilins.address, str(sorted(list(map(str, hlilins.mlils)))))) + retinfo.append("Function: {:x} Instruction: {:x} HLIL->MLILS instruction: {}".format(func.start, hlilins.address, str(sorted(list(map(str, hlilins.mlils)))))) return fixOutput(retinfo) def test_functions_attributes(self): |
