exclude non-stencil functions in the test "test_start_end_function"

This commit is contained in:
Nicolas 2026-03-03 14:47:53 +01:00
parent 0212fa77a3
commit b7d5f3a129
1 changed files with 10 additions and 3 deletions

View File

@ -19,11 +19,18 @@ def test_start_end_function():
if symbol.relocations and symbol.relocations[-1].symbol.info == 'STT_NOTYPE':
print('-', sym_name, get_stencil_position(symbol), len(symbol.data))
if symbol.section and symbol.section.name == '.text':
print('SKIP', sym_name, '(Aux function, not a stencil)')
continue
if symbol.section:
function_size = symbol.section.fields['sh_size'] # len(symbol.data) excludes nop after the function
print('-', sym_name, get_stencil_position(symbol), function_size)
start, end = get_stencil_position(symbol)
assert start >= 0 and end >= start and end <= len(symbol.data)
assert (start >= 0 and end >= start and end <= function_size)
def test_aux_functions():