-
Notifications
You must be signed in to change notification settings - Fork 17.3k
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
test: "buildrundir", "builddir" directives leave untracked go_asm.h files #28781
Comments
I can reproduce this. Quick way:
|
Thanks for reporting this @giuscri and @ALTree for the investigation! I've updated the issue title, it seems to come from "builddir", "buildrundir" directives not cleaning up created files as per Line 811 in 0098f8a
which unfortunately doesn't clean up its content on defer. The update below fixes it diff --git a/test/run.go b/test/run.go
index a01fd6a957..d7fa430f2b 100644
--- a/test/run.go
+++ b/test/run.go
@@ -808,7 +808,10 @@ func (t *test) run() {
}
if len(asms) > 0 {
- if err := ioutil.WriteFile(filepath.Join(longdir, "go_asm.h"), nil, 0666); err != nil {
+ emptyASMFile := filepath.Join(longdir, "go_asm.h")
+ defer os.RemoveAll(emptyASMFile)
+
+ if err := ioutil.WriteFile(emptyASMFile, nil, 0666); err != nil {
t.err = fmt.Errorf("write empty go_asm.h: %s", err)
return
} and this seems to stem from https://go-review.googlesource.com/c/146999 |
Change https://golang.org/cl/149458 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
I didn't test it with the latest release.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: