add tests for vivisect's usage of debug symbols

This commit is contained in:
Yacine Elhamer
2023-06-01 01:50:06 +01:00
parent c7b65cfe8a
commit 64ef2c8a65
2 changed files with 9 additions and 1 deletions

View File

@@ -761,6 +761,14 @@ FEATURE_PRESENCE_TESTS = sorted(
key=lambda t: (t[0], t[1]),
)
# this list should be merged into the one above (FEATURE_PRESENSE_TESTS)
# once the debug symbol functionality has been added to all backends
FEATURE_SYMTAB_FUNC_TESTS = [
("2bf18d", "function=0x4027b3,bb=0x402861,insn=0x40286d", capa.features.insn.API("__GI_connect"), True),
("2bf18d", "function=0x4027b3,bb=0x402861,insn=0x40286d", capa.features.insn.API("connect"), True),
("2bf18d", "function=0x4027b3,bb=0x402861,insn=0x40286d", capa.features.insn.API("__libc_connect"), True),
]
FEATURE_PRESENCE_TESTS_DOTNET = sorted(
[
("b9f5b", "file", Arch(ARCH_I386), True),

View File

@@ -11,7 +11,7 @@ from fixtures import *
@fixtures.parametrize(
"sample,scope,feature,expected",
fixtures.FEATURE_PRESENCE_TESTS,
fixtures.FEATURE_PRESENCE_TESTS + fixtures.FEATURE_SYMTAB_FUNC_TESTS,
indirect=["sample", "scope"],
)
def test_viv_features(sample, scope, feature, expected):