1
0
mirror of https://github.com/golang/go synced 2024-11-25 20:57:57 -07:00

mime: disable TestLookupMallocs with ASAN

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>
This commit is contained in:
Michael Anthony Knyszek 2024-11-18 22:16:57 +00:00 committed by Gopher Robot
parent 3e7cb78800
commit b09478b9c9

View 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")