Re: [PATCH 6/6] test-lib: ignore leaks in the sanitizer's thread code
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Jan 3, 2025, 12:05 UTC
- Message-ID
- <Z3fSnK21nRBrjyfM@pks.im>
- In-Reply-To
- <20250101202124.GF3305462@coredump.intra.peff.net>
On Wed, Jan 01, 2025 at 03:21:24PM -0500, Jeff King wrote:
Show 5 quoted lines
> One small downside here is that this just suppresses the "were there any > leaks" check. If there's a real leak _and_ the race was triggered, then > you'd see the racy false positive in the output. I don't think that's a > big deal, since both the race and real leaks should be rare-ish, and > you'd have to encounter both in the same run of a given test script.
Yeah, I think that's fine. You'd have to both be unlucky and trigger the leak _and_ you'd have to be debugging a testcase that hits the race in the first place. Which together feels unlikely enough to really matter.
Show 15 quoted lines
> t/test-lib.sh | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/t/test-lib.sh b/t/test-lib.sh
> index c9487d0805..d1f62adbf8 100644
> --- a/t/test-lib.sh
> +++ b/t/test-lib.sh
> @@ -1177,7 +1177,8 @@ check_test_results_san_file_empty_ () {
> ! find "$TEST_RESULTS_SAN_DIR" \
> -type f \
> -name "$TEST_RESULTS_SAN_FILE_PFX.*" 2>/dev/null |
> - xargs grep -q ^DEDUP_TOKEN
> + xargs grep ^DEDUP_TOKEN |
> + grep -qv sanitizer::GetThreadStackTopAndBottom
> }It would be nice to provide some more context here in the form of a comment so that one doesn't have to blame the commit.
Patrick