mirror of https://github.com/Nonannet/copapy.git
exclude non-stencil functions in the test "test_start_end_function"
This commit is contained in:
parent
0212fa77a3
commit
b7d5f3a129
|
|
@ -19,11 +19,18 @@ def test_start_end_function():
|
||||||
|
|
||||||
if symbol.relocations and symbol.relocations[-1].symbol.info == 'STT_NOTYPE':
|
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)
|
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():
|
def test_aux_functions():
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue