1
0
mirror of https://github.com/golang/go synced 2024-11-21 12:04:41 -07:00

testing: remove matchMutex

Change-Id: Ia5424fbda2c385a9f8b559fb38fcd4e596e905a3
This commit is contained in:
qiulaidongfeng 2024-03-08 21:40:09 +08:00
parent 69583738eb
commit f6856b09da

View File

@ -44,10 +44,6 @@ type simpleMatch []string
// alternationMatch matches a test name if one of the alternations match.
type alternationMatch []filterMatch
// TODO: fix test_main to avoid race and improve caching, also allowing to
// eliminate this Mutex.
var matchMutex sync.Mutex
func allMatcher() *matcher {
return newMatcher(nil, "", "", "")
}
@ -90,9 +86,6 @@ func (m *matcher) fullName(c *common, subname string) (name string, ok, partial
name = m.unique(c.name, rewrite(subname))
}
matchMutex.Lock()
defer matchMutex.Unlock()
// We check the full array of paths each time to allow for the case that a pattern contains a '/'.
elem := strings.Split(name, "/")