tests: relax jemalloc heap address regex for portability (#3460)

The previous pattern assumed addresses beginning with 0x7ffff and a limited
hex-length, which caused jemalloc heap tests to fail on some systems where
extents are mapped at addresses like 0x7ec7... with more digits.

Relax the regex to 0x[0-9a-fA-F]{6,16} so we still validate that a hex address
is printed, but support different virtual address layouts and jemalloc mappings.
pull/3182/head^2
Abdullah 5 days ago committed by GitHub
parent 8d1adc2a1e
commit 632ae3d9e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -512,7 +512,9 @@ def test_heuristic_fail_gracefully(start_binary, is_multi_threaded):
##
HEAP_JEMALLOC_EXTENT_INFO = get_binary("heap_jemalloc_extent_info.out")
HEAP_JEMALLOC_HEAP = get_binary("heap_jemalloc_heap.out")
re_match_valid_address = r"0x7ffff[0-9a-fA-F]{6,9}"
# Relax address regex to accept different virtual address layouts (ASLR / jemalloc mappings).
# Old pattern assumed addresses starting with 0x7ffff and a limited digit count which fails on some hosts.
re_match_valid_address = r"0x[0-9a-fA-F]{6,16}"
def test_jemalloc_find_extent(start_binary):

Loading…
Cancel
Save