gio/tests: Enable gsocketclient-slow under address santizer

The test can run properly, even though we won't do the right checks on
the preloaded library
This commit is contained in:
Marco Trevisan (Treviño)
2024-05-09 16:07:09 +02:00
parent 8032ba88d6
commit 486ad65535

View File

@@ -309,8 +309,12 @@ if host_machine.system() != 'windows'
}, },
} }
# LD_PRELOAD modules don't work so well with AddressSanitizer if have_rtld_next and glib_build_shared
if have_rtld_next and glib_build_shared and glib_sanitizers.length() == 0 asan_env = {}
if 'address' in glib_sanitizers
asan_env = {'ASAN_OPTIONS': 'verify_asan_link_order=0'}
endif
gio_tests += { gio_tests += {
'gsocketclient-slow' : { 'gsocketclient-slow' : {
'depends' : [ 'depends' : [
@@ -325,10 +329,10 @@ if host_machine.system() != 'windows'
], ],
'env' : { 'env' : {
'LD_PRELOAD': '@0@/slow-connect-preload.so'.format(meson.current_build_dir()) 'LD_PRELOAD': '@0@/slow-connect-preload.so'.format(meson.current_build_dir())
}, } + asan_env,
'installed_tests_env' : { 'installed_tests_env' : {
'LD_PRELOAD': '@0@/slow-connect-preload.so'.format(installed_tests_execdir), 'LD_PRELOAD': '@0@/slow-connect-preload.so'.format(installed_tests_execdir),
}, } + asan_env,
}, },
} }
endif endif