git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/4] test-lib: add XSAN_OPTIONS, inherit [AL]SAN_OPTIONS

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Feb 19, 2022, 02:48 UTC
Message-ID
<220219.86ley7fu3k.gmgdl@evledraar.gmail.com>
In-Reply-To
<YhBY8oD/xJZUQsj9@nand.local>
On Fri, Feb 18 2022, Taylor Blau wrote:
Show 36 quoted lines
> On Fri, Feb 18, 2022 at 03:20:41PM -0800, Junio C Hamano wrote:
>> > +# Usage (using ":" as a delimiter):
>> > +#
>> > +#	prepend_var VAR : $1
>> > +prepend_var () {
>> > +	eval "$1=$3\${$1:+$2\$$1}"
>>
>> This one is correct; the above sample, when passed ":" and "VAR" to
>> $1 and $2, will specialize into the above example.
>
>> > +}
>> > +
>> > +# If [AL]SAN is in effect we want to abort so that we notice problems.
>> > +prepend_var XSAN_OPTIONS : abort_on_error=1
>>
>> XSAN_OPTIONS stands for "options that are common to all ?SAN", I
>> guess.
>
> I was also unclear on this. Looking around in the google/sanitizers
> repository, I don't see something called "XSAN_OPTIONS" mentioned
> anywhere (neither in documentation nor in the actual source code).
>
> Is this a convenience variable that we use to store options that are
> common to both ASAN_OPTIONS and LSAN_OPTIONS? If so, I am not sure the
> extra confusion is worth it, since it only contains abort_on_error=1.
>
> I guess it makes it (along with the prepend_var function introduced by
> this patch) possible for a caller to write XSAN_OPTIONS=... into their
> environment and then run a test script and have their settings feed into
> ASAN_OPTIONS and LSAN_OPTIONS. But I don't know that callers would find
> this super useful (or, at least not dramatically more convenient than
> setting both variables).
>
> I could be wrong, and I'm obviously biased towards my own usage of the
> ASAN/LSAN builds, but to me this patch might be clearer without the
> extra variable.

Sorry, yes it's just a git.git invention to refer to "common LSAN and ASAN' things. Perhaps GIT_ASAN_AND_ASAN_COMMON or something would be much less confusing & better? Bikeshedding most welcome :)

Previous: Taylor BlauNext: Taylor Blau
Message 5 of 39 in “test-lib: improve LSAN + ASAN stack traces”
  1. 0/4 test-lib: improve LSAN + ASAN stack tracesÆvar Arnfjörð Bjarmason, Feb 18, 2022
  2. 1/4 test-lib: add XSAN_OPTIONS, inherit [AL]SAN_OPTIONSÆvar Arnfjörð Bjarmason, Feb 18, 2022
  3. Junio C HamanoFeb 18, 2022
  4. Taylor BlauFeb 19, 2022
  5. Ævar Arnfjörð BjarmasonFeb 19, 2022
  6. Taylor BlauFeb 19, 2022
  7. Ævar Arnfjörð BjarmasonFeb 19, 2022
  8. Taylor BlauFeb 19, 2022
  9. 2/4 test-lib: make $GIT_BUILD_DIR an absolute pathÆvar Arnfjörð Bjarmason, Feb 18, 2022
  10. Junio C HamanoFeb 18, 2022
  11. Ævar Arnfjörð BjarmasonFeb 19, 2022
  12. 0/4 test-lib: improve LSAN + ASAN stack tracesÆvar Arnfjörð Bjarmason, Feb 19, 2022
  13. 1/4 test-lib: add GIT_XSAN_OPTIONS, inherit [AL]SAN_OPTIONSÆvar Arnfjörð Bjarmason, Feb 19, 2022
  14. Junio C HamanoFeb 20, 2022
  15. 2/4 test-lib: correct commentary on TEST_DIRECTORY overridingÆvar Arnfjörð Bjarmason, Feb 19, 2022
  16. 3/4 test-lib: make $GIT_BUILD_DIR an absolute pathÆvar Arnfjörð Bjarmason, Feb 19, 2022
  17. 4/4 test-lib: add "fast_unwind_on_malloc=0" to LSAN_OPTIONSÆvar Arnfjörð Bjarmason, Feb 19, 2022
  18. Taylor BlauFeb 21, 2022
  19. 0/4 test-lib: improve LSAN + ASAN stack tracesÆvar Arnfjörð Bjarmason, Feb 21, 2022
  20. 1/4 test-lib: add GIT_SAN_OPTIONS, inherit [AL]SAN_OPTIONSÆvar Arnfjörð Bjarmason, Feb 21, 2022
  21. 2/4 test-lib: correct commentary on TEST_DIRECTORY overridingÆvar Arnfjörð Bjarmason, Feb 21, 2022
  22. 3/4 test-lib: make $GIT_BUILD_DIR an absolute pathÆvar Arnfjörð Bjarmason, Feb 21, 2022
  23. Taylor BlauFeb 21, 2022
  24. Ævar Arnfjörð BjarmasonFeb 21, 2022
  25. Junio C HamanoFeb 22, 2022
  26. Ævar Arnfjörð BjarmasonFeb 22, 2022
  27. Junio C HamanoFeb 23, 2022
  28. Ævar Arnfjörð BjarmasonFeb 24, 2022
  29. Junio C HamanoFeb 24, 2022
  30. 4/4 test-lib: add "fast_unwind_on_malloc=0" to LSAN_OPTIONSÆvar Arnfjörð Bjarmason, Feb 21, 2022
  31. Taylor BlauFeb 21, 2022
  32. Ævar Arnfjörð BjarmasonFeb 21, 2022
  33. Junio C HamanoFeb 21, 2022
  34. Ævar Arnfjörð BjarmasonFeb 21, 2022
  35. 0/4 test-lib: improve LSAN + ASAN stack tracesÆvar Arnfjörð Bjarmason, Feb 27, 2022
  36. 1/4 test-lib: add GIT_SAN_OPTIONS, inherit [AL]SAN_OPTIONSÆvar Arnfjörð Bjarmason, Feb 27, 2022
  37. 2/4 test-lib: correct and assert TEST_DIRECTORY overridingÆvar Arnfjörð Bjarmason, Feb 27, 2022
  38. 3/4 test-lib: make $GIT_BUILD_DIR an absolute pathÆvar Arnfjörð Bjarmason, Feb 27, 2022
  39. 4/4 test-lib: add "fast_unwind_on_malloc=0" to LSAN_OPTIONSÆvar Arnfjörð Bjarmason, Feb 27, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.