Skip to content

Commit c0d36f6

Browse files
authored
Use code-section relative offsets in test_emsymbolizer (#17582)
This means that test is robust against changes to other sections that come before the code section. Specifically it should allow this binaryen change to roll in: WebAssembly/binaryen#4871
1 parent 9e49fb3 commit c0d36f6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/test_other.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8642,17 +8642,17 @@ def test_emsymbolizer(self):
86428642

86438643
def get_addr(address):
86448644
return self.run_process(
8645-
[emsymbolizer, 'test_dwarf.wasm', address], stdout=PIPE).stdout
8645+
[emsymbolizer, 'test_dwarf.wasm', '-tcode', address], stdout=PIPE).stdout
86468646

86478647
# Check a location in foo(), not inlined.
86488648
# If the output binary size changes use `wasm-objdump -d` on the binary
86498649
# look for the offset of the first call to `out_to_js`.
8650-
self.assertIn('test_dwarf.c:6:3', get_addr('0x10d'))
8650+
self.assertIn('test_dwarf.c:6:3', get_addr('0x8'))
86518651
# Check that both bar (inlined) and main (inlinee) are in the output,
86528652
# as described by the DWARF.
86538653
# TODO: consider also checking the function names once the output format
86548654
# stabilizes more
8655-
self.assertRegex(get_addr('0x124').replace('\n', ''),
8655+
self.assertRegex(get_addr('0x1f').replace('\n', ''),
86568656
'test_dwarf.c:13:3.*test_dwarf.c:18:3')
86578657

86588658
def test_separate_dwarf(self):

0 commit comments

Comments
 (0)