From b7d5f3a1297bd9812138066d64d18f6224054670 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Tue, 3 Mar 2026 14:47:53 +0100 Subject: [PATCH] exclude non-stencil functions in the test "test_start_end_function" --- tests/test_stencil_db.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/test_stencil_db.py b/tests/test_stencil_db.py index 0ef40e4..7e762bd 100644 --- a/tests/test_stencil_db.py +++ b/tests/test_stencil_db.py @@ -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 - start, end = get_stencil_position(symbol) + if symbol.section: + function_size = symbol.section.fields['sh_size'] # len(symbol.data) excludes nop after the function - assert start >= 0 and end >= start and end <= len(symbol.data) + print('-', sym_name, get_stencil_position(symbol), function_size) + + start, end = get_stencil_position(symbol) + + assert (start >= 0 and end >= start and end <= function_size) def test_aux_functions():