libgo patch committed: Remove test ordering dependency in mime
Checks
Commit Message
This libgo patch removes a test ordering dependency in the mime
package. This is a backport of https://go.dev/cl/421442 from the
upstream repo. This fixes https://go.dev/issue/51648. Bootstrapped
and ran mime tests on x86_64-pc-linux-gnu. Committed to mainline.
Ian
f22c12d7361d22d47cce73d342edf2e1ebf20520
@@ -1,4 +1,4 @@
-63ba7dd52f2cc49dab4b70ac81309296a920d4dc
+0411a2733fd468e69f1998edd91e8fe3ba40ff9e
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
@@ -14,7 +14,10 @@ import (
func setMimeInit(fn func()) (cleanup func()) {
once = sync.Once{}
testInitMime = fn
- return func() { testInitMime = nil }
+ return func() {
+ testInitMime = nil
+ once = sync.Once{}
+ }
}
func clearMimeTypes() {
@@ -11,6 +11,7 @@ import (
)
func initMimeUnixTest(t *testing.T) {
+ once.Do(initMime)
err := loadMimeGlobsFile("testdata/test.types.globs2")
if err != nil {
t.Fatal(err)