Skip to contentSkip to conversation

t/lib-httpd: pass LSAN_OPTIONS through apache

PATCH In review Jeff King 2 participants 2 messages May 7, 2019

lore
Share & tools
lore

Jeff King

author
#0 lore raw

PATCH 1/1 t/lib-httpd: pass LSAN_OPTIONS through apache

Just as we instruct Apache to pass through ASAN_OPTIONS (so that server-side Git programs it spawns will respect our options while running the tests), we should do the same with LSAN_OPTIONS. Otherwise trying to collect a list of leaks like:

export LSAN_OPTIONS=exitcode=0:log_path=/tmp/lsan make SANITIZE=leak test

won't work for http tests (the server-side programs won't log their leaks to the right place, and they'll prematurely die, producing a spurious test failure).

---
Found this after giving similar advice in

https://public-inbox.org/git/[email protected]/

 t/lib-httpd/apache.conf | 1 +
 1 file changed, 1 insertion(+)
t/lib-httpd/apache.conf +1 -0
index 06a81b54c7..5c1c86c193 100644
@@ -76,6 +76,7 @@ PassEnv GIT_VALGRIND
 PassEnv GIT_VALGRIND_OPTIONS
 PassEnv GNUPGHOME
 PassEnv ASAN_OPTIONS
+PassEnv LSAN_OPTIONS
 PassEnv GIT_TRACE
 PassEnv GIT_CONFIG_NOSYSTEM
 PassEnv GIT_TEST_SIDEBAND_ALL
Signature · 1 line
2.21.0.1314.g224b191707
#1 lore raw
Quoted 35 lines · Jeff King

Just as we instruct Apache to pass through ASAN_OPTIONS (so that server-side Git programs it spawns will respect our options while running the tests), we should do the same with LSAN_OPTIONS. Otherwise trying to collect a list of leaks like:

export LSAN_OPTIONS=exitcode=0:log_path=/tmp/lsan make SANITIZE=leak test

won't work for http tests (the server-side programs won't log their leaks to the right place, and they'll prematurely die, producing a spurious test failure).

---
Found this after giving similar advice in

https://public-inbox.org/git/[email protected]/

 t/lib-httpd/apache.conf | 1 +
 1 file changed, 1 insertion(+)
t/lib-httpd/apache.conf +1 -0
index 06a81b54c7..5c1c86c193 100644
@@ -76,6 +76,7 @@ PassEnv GIT_VALGRIND
 PassEnv GIT_VALGRIND_OPTIONS
 PassEnv GNUPGHOME
 PassEnv ASAN_OPTIONS
+PassEnv LSAN_OPTIONS
 PassEnv GIT_TRACE
 PassEnv GIT_CONFIG_NOSYSTEM
 PassEnv GIT_TEST_SIDEBAND_ALL
Signature · 1 line
2.21.0.1314.g224b191707

Looks good to me.