From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Taylor Blau <me@ttaylorr.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH 1/4] test-lib: add XSAN_OPTIONS, inherit [AL]SAN_OPTIONS
Date: Sat, 19 Feb 2022 04:02:23 +0100 [thread overview]
Message-ID: <220219.86czjjftde.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <YhBclvZUYcsTabye@nand.local>
On Fri, Feb 18 2022, Taylor Blau wrote:
> On Sat, Feb 19, 2022 at 03:48:42AM +0100, Ævar Arnfjörð Bjarmason wrote:
>> >> > +}
>> >> > +
>> >> > +# 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 :)
>
> Yeah, I would be fine with something like GIT_ASAN_AND_LSAN_COMMON if it
> makes things easier. I think it definitely is clearer, and does make it
> easier to add new options to both.
>
> I probably wouldn't ever tweak its value myself, so I don't think I have
> a strong opinion here. If it were me, I'd probably just as soon
> duplicate setting `abort_on_error=1` in the ASan- and LSan-specific
> variables. But I don't have strong feelings here, so whatever makes the
> most sense to you is fine with me.
Once you get to tweaking some more advanced options it makes sense to
share a lot for both. One change I have locally on top of this is e.g.:
prepend_var XSAN_OPTIONS : dedup_token_length=9999
prepend_var XSAN_OPTIONS : log_exe_name=1
prepend_var XSAN_OPTIONS : log_path=\"$TEST_RESULTS_XSAN_FILE\"
I.e. for a feature to log machine-readable stacktraces when you run the
test suite with LSAN or ASAN.
prepend_var XSAN_OPTIONS : dedup_token_length=9999
prepend_var XSAN_OPTIONS : log_exe_name=1
prepend_var XSAN_OPTIONS : log_path=\"$TEST_RESULTS_XSAN_FILE\"
Which is how I ended up with XSAN_OPTIONS I think, i.e. I'd test things
with LSAN, switch to ASAN, would have to rename the variable
etc. Changing a single letter was easier ... :)
next prev parent reply other threads:[~2022-02-19 3:06 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-18 21:01 [PATCH 0/4] test-lib: improve LSAN + ASAN stack traces Ævar Arnfjörð Bjarmason
2022-02-18 21:01 ` [PATCH 1/4] test-lib: add XSAN_OPTIONS, inherit [AL]SAN_OPTIONS Ævar Arnfjörð Bjarmason
2022-02-18 23:20 ` Junio C Hamano
2022-02-19 2:41 ` Taylor Blau
2022-02-19 2:48 ` Ævar Arnfjörð Bjarmason
2022-02-19 2:57 ` Taylor Blau
2022-02-19 3:02 ` Ævar Arnfjörð Bjarmason [this message]
2022-02-19 3:51 ` Taylor Blau
2022-02-18 21:01 ` [PATCH 2/4] test-lib: make $GIT_BUILD_DIR an absolute path Ævar Arnfjörð Bjarmason
2022-02-18 23:30 ` Junio C Hamano
2022-02-19 1:58 ` Ævar Arnfjörð Bjarmason
2022-02-19 11:29 ` [PATCH v2 0/4] test-lib: improve LSAN + ASAN stack traces Ævar Arnfjörð Bjarmason
2022-02-19 11:29 ` [PATCH v2 1/4] test-lib: add GIT_XSAN_OPTIONS, inherit [AL]SAN_OPTIONS Ævar Arnfjörð Bjarmason
2022-02-20 7:52 ` Junio C Hamano
2022-02-19 11:29 ` [PATCH v2 2/4] test-lib: correct commentary on TEST_DIRECTORY overriding Ævar Arnfjörð Bjarmason
2022-02-19 11:29 ` [PATCH v2 3/4] test-lib: make $GIT_BUILD_DIR an absolute path Ævar Arnfjörð Bjarmason
2022-02-19 11:29 ` [PATCH v2 4/4] test-lib: add "fast_unwind_on_malloc=0" to LSAN_OPTIONS Ævar Arnfjörð Bjarmason
2022-02-21 2:30 ` [PATCH v2 0/4] test-lib: improve LSAN + ASAN stack traces Taylor Blau
2022-02-21 15:58 ` [PATCH v3 " Ævar Arnfjörð Bjarmason
2022-02-21 15:58 ` [PATCH v3 1/4] test-lib: add GIT_SAN_OPTIONS, inherit [AL]SAN_OPTIONS Ævar Arnfjörð Bjarmason
2022-02-21 15:58 ` [PATCH v3 2/4] test-lib: correct commentary on TEST_DIRECTORY overriding Ævar Arnfjörð Bjarmason
2022-02-21 15:58 ` [PATCH v3 3/4] test-lib: make $GIT_BUILD_DIR an absolute path Ævar Arnfjörð Bjarmason
2022-02-21 17:29 ` Taylor Blau
2022-02-21 18:55 ` Ævar Arnfjörð Bjarmason
2022-02-22 7:19 ` Junio C Hamano
2022-02-22 10:14 ` Ævar Arnfjörð Bjarmason
2022-02-23 20:16 ` Junio C Hamano
2022-02-24 9:14 ` Ævar Arnfjörð Bjarmason
2022-02-24 20:05 ` Junio C Hamano
2022-02-21 15:58 ` [PATCH v3 4/4] test-lib: add "fast_unwind_on_malloc=0" to LSAN_OPTIONS Ævar Arnfjörð Bjarmason
2022-02-21 17:32 ` Taylor Blau
2022-02-21 18:59 ` Ævar Arnfjörð Bjarmason
2022-02-21 17:16 ` [PATCH v3 0/4] test-lib: improve LSAN + ASAN stack traces Junio C Hamano
2022-02-21 18:55 ` Ævar Arnfjörð Bjarmason
2022-02-27 10:25 ` [PATCH v4 " Ævar Arnfjörð Bjarmason
2022-02-27 10:25 ` [PATCH v4 1/4] test-lib: add GIT_SAN_OPTIONS, inherit [AL]SAN_OPTIONS Ævar Arnfjörð Bjarmason
2022-02-27 10:25 ` [PATCH v4 2/4] test-lib: correct and assert TEST_DIRECTORY overriding Ævar Arnfjörð Bjarmason
2022-02-27 10:25 ` [PATCH v4 3/4] test-lib: make $GIT_BUILD_DIR an absolute path Ævar Arnfjörð Bjarmason
2022-02-27 10:25 ` [PATCH v4 4/4] test-lib: add "fast_unwind_on_malloc=0" to LSAN_OPTIONS Ævar Arnfjörð Bjarmason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=220219.86czjjftde.gmgdl@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=me@ttaylorr.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).