aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2021-12-13 14:28:17 -0500
committerBryan Mills <bcmills@google.com>2021-12-14 19:53:20 +0000
commitd407a8c3c49f11980f224d204147eff8fcb087f4 (patch)
tree7633d849e2070cc4bf6219ef0b827de0bdd0d03c /src/runtime
parent265fbaa94b8614cbd861711d7f7c6d278dc1ddba (diff)
downloadgo-d407a8c3c49f11980f224d204147eff8fcb087f4.tar.gz
go-d407a8c3c49f11980f224d204147eff8fcb087f4.zip
testing: retry spurious errors from RemoveAll for temp directories
This works around what appears to be either a kernel bug or a Go runtime or syscall bug affecting certain Windows versions (possibly all pre-2016?). The retry loop is a simplified version of the one used in cmd/go/internal/robustio. We use the same 2-second arbitrary timeout as was used in that package, since it seems to be reliable in practice on the affected builders. (If it proves to be too short, we can lengthen it, within reason, in a followup CL.) Since this puts a higher-level workaround in place, we can also revert the lower-level workaround added to a specific test in CL 345670. This addresses the specific occurrences of the bug for users of (*testing.T).TempDir, but does not fix the underlying bug for Go users outside the "testing" package (which remains open as #25965). Fixes #50051 Updates #48012 Updates #25965 Change-Id: I35be7125f32f05c8350787f5ca9a22974b8d0770 Reviewed-on: https://go-review.googlesource.com/c/go/+/371296 Trust: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Patrik Nyblom <pnyb@google.com> Trust: Patrik Nyblom <pnyb@google.com> Run-TryBot: Patrik Nyblom <pnyb@google.com>
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/syscall_windows_test.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/runtime/syscall_windows_test.go b/src/runtime/syscall_windows_test.go
index 101e94107c..dcd390ff9d 100644
--- a/src/runtime/syscall_windows_test.go
+++ b/src/runtime/syscall_windows_test.go
@@ -770,6 +770,7 @@ func TestSyscallN(t *testing.T) {
for arglen := 0; arglen <= runtime.MaxArgs; arglen++ {
arglen := arglen
t.Run(fmt.Sprintf("arg-%d", arglen), func(t *testing.T) {
+ t.Parallel()
args := make([]string, arglen)
rets := make([]string, arglen+1)
params := make([]uintptr, arglen)