]> Cypherpunks repositories - gostls13.git/commitdiff
mime: disable TestLookupMallocs with ASAN
authorMichael Anthony Knyszek <mknyszek@google.com>
Mon, 18 Nov 2024 22:16:57 +0000 (22:16 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 19 Nov 2024 02:54:28 +0000 (02:54 +0000)
With the synchashtriemap GOEXPERIMENT, this allocates now, but just
under ASAN. That's OK, just skip the test under ASAN.

Fixes #70428.

Change-Id: I1ab4f7c06505c84309946358643715085f0db506
Reviewed-on: https://go-review.googlesource.com/c/go/+/629456
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>

src/mime/type_test.go

index 2e55468dd7c100dfaf73c73566cafdca44dbc16a..6bdf37b6359d2001a8ed0d3fd1d83491b23f4575 100644 (file)
@@ -5,6 +5,7 @@
 package mime
 
 import (
+       "internal/asan"
        "slices"
        "strings"
        "sync"
@@ -143,6 +144,9 @@ func TestExtensionsByType(t *testing.T) {
 }
 
 func TestLookupMallocs(t *testing.T) {
+       if asan.Enabled {
+               t.Skip("test allocates more with -asan; see #70079")
+       }
        n := testing.AllocsPerRun(10000, func() {
                TypeByExtension(".html")
                TypeByExtension(".HtML")