diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-02-27 11:25:10 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-02-28 13:35:56 -0800 |
commit | 66c1a568703fd1e14b544da6a1dd9f34e4cc9cd1 (patch) | |
tree | 1e0833648d7ce3a2358710ef9ba255e33a61b0ad /t/t0090-cache-tree.sh | |
parent | The sixth batch (diff) | |
download | tgif-66c1a568703fd1e14b544da6a1dd9f34e4cc9cd1.tar.xz |
test-lib: add GIT_SAN_OPTIONS, inherit [AL]SAN_OPTIONS
Change our ASAN_OPTIONS and LSAN_OPTIONS to set defaults for those
variables, rather than punting out entirely if we already have them in
the environment.
We want to take any user-provided settings over our own, but we can do
that by prepending our defaults to the variable. The libsanitizer
options parsing has "last option wins" semantics.
It's now possible to do e.g.:
LSAN_OPTIONS=report_objects=1 ./t0006-date.sh
And not have the "report_objects=1" setting overwrite our sensible
default of "abort_on_error=1", but by prepending to the list we ensure
that:
LSAN_OPTIONS=report_objects=1:abort_on_error=0 ./t0006-date.sh
Will take the desired "abort_on_error=0" over our default.
See b0f4c9087e1 (t: support clang/gcc AddressSanitizer, 2014-12-08)
for the original pattern being altered here, and
85b81b35ff9 (test-lib: set LSAN_OPTIONS to abort by default,
2017-09-05) for when LSAN_OPTIONS was added in addition to the
then-existing ASAN_OPTIONS.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0090-cache-tree.sh')
0 files changed, 0 insertions, 0 deletions