mirror of
https://github.com/golang/go
synced 2024-11-26 01:47:58 -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:
parent
3e7cb78800
commit
b09478b9c9
@ -5,6 +5,7 @@
|
|||||||
package mime
|
package mime
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"internal/asan"
|
||||||
"slices"
|
"slices"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
@ -143,6 +144,9 @@ func TestExtensionsByType(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestLookupMallocs(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() {
|
n := testing.AllocsPerRun(10000, func() {
|
||||||
TypeByExtension(".html")
|
TypeByExtension(".html")
|
||||||
TypeByExtension(".HtML")
|
TypeByExtension(".HtML")
|
||||||
|
Loading…
Reference in New Issue
Block a user