-
Notifications
You must be signed in to change notification settings - Fork 18k
all: go tool dist test -msan
fails many tests
#64256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This comment was marked as outdated.
This comment was marked as outdated.
go tool dist test -msan
fails many tests
Like #64257, this does not appear to be WSL-specific. |
This CL fixes some warnings when running go tool dist test -msan about an unknown variable "size". Update he variable name to sz to match the function prototypes. For golang#64256
Change https://go.dev/cl/547696 mentions this issue: |
… -msan This test is already marked with !race, but when running the tests with -msan it allocates memory which throws off the test assertions. Marking it !msan as well. For golang#64256
Change https://go.dev/cl/547758 mentions this issue: |
@bcmills Do you know if there is a way to detect if msan is enabled, akin to if n := testing.AllocsPerRun(100, func() { Grow(s2, cap(s2)-len(s2)+1) }); n != 1 {
errorf := t.Errorf
if race.Enabled || testenv.OptimizationOff() {
errorf = t.Logf // this allocates multiple times in race detector mode
}
errorf("Grow should allocate once when given insufficient capacity; allocated %v times", n)
} I can see runtime.msanenabled, but that is private. I wonder if it would be helpful to have an internal/msan and internal/asan similar to internal/race. |
@mauri870, I see a lot of files in the //go:build msan
…
const msanEnabled = true //go:build !msan
…
const msanEnabled = false |
As a short term solution, that would work. It is cumbersome to deal with build flags if a specific part of a specific test needs to be skipped, also the failing tests are not only in runtime, I spotted related failures in at least log/slog and slices. I proposed #64611 to make dealing with these cases more straightforward, similar to how we use |
@mauri870 Just curious, why turning on -msan causes extra allocations? Thanks. |
@zhangfannie It appears to be the same issue we have with -race, Lines 912 to 918 in 2184a39
|
Thank you for the explanation. 🙂 |
Currently go test -msan runtime always fails on loong64, arm64 and amd64. Changed the variable name to sz to match the function prototypes. For #64256 Change-Id: Ida71197307016520deb39293927850d47845140a GitHub-Last-Rev: 0ee1e3b GitHub-Pull-Request: #64572 Reviewed-on: https://go-review.googlesource.com/c/go/+/547696 Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Keith Randall <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> Auto-Submit: Keith Randall <[email protected]>
Currently go test -msan runtime always fails on loong64, arm64 and amd64. Changed the variable name to sz to match the function prototypes. For golang#64256 Change-Id: Ida71197307016520deb39293927850d47845140a GitHub-Last-Rev: 0ee1e3b GitHub-Pull-Request: golang#64572 Reviewed-on: https://go-review.googlesource.com/c/go/+/547696 Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Keith Randall <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> Auto-Submit: Keith Randall <[email protected]>
Change https://go.dev/cl/622855 mentions this issue: |
There are still a few flaky tests here, but they should probably get their own issues, so leaving this closed. TestNewOSProc0 (wow, sanitizers hate this test) |
Change https://go.dev/cl/623176 mentions this issue: |
These fail for the same reason as for the race detector, and is the most frequently failing test in both. For #70054. For #64257. For #64256. Change-Id: I3649e58069190b4450f9d4deae6eb8eca5f827a3 Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-asan-clang15,gotip-linux-amd64-msan-clang15 Reviewed-on: https://go-review.googlesource.com/c/go/+/623176 TryBot-Bypass: Michael Knyszek <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
Change https://go.dev/cl/623957 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go tool dist test -msan fail
What did you expect to see?
test pass.
What did you see instead?
The text was updated successfully, but these errors were encountered: