aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql/sql_test.go
diff options
context:
space:
mode:
authormiller <millerresearch@gmail.com>2023-03-01 16:55:45 +0000
committerGopher Robot <gobot@golang.org>2023-05-24 00:38:42 +0000
commit392fbaa0f394592a9924daf498f58226fd9b3e79 (patch)
tree3a63a9be5f85884efc09c35a767bc977d12b1e50 /src/database/sql/sql_test.go
parente0db8ab6e0d26fe1e05f6824cff670c61f38a3a4 (diff)
downloadgo-392fbaa0f394592a9924daf498f58226fd9b3e79.tar.xz
os: make TestProgWideChdir detect more possible failure cases
This test is meant to detect the effect of Chdir not being observed in other concurrent goroutines, possible in Plan 9 because each M runs in a separate OS process with its own working directory. The test depends on Getwd to report the correct working directory, but if Chdir fails then Getwd may fail for the same reasons. We add a consistency check that Stat(Getwd()) and Stat(".") refer to the same file. Also change channel usage and add a sync.WaitGroup to ensure test goroutines are not left blocked or running when the main test function exits. For #58802 Change-Id: I80d554fcf3617427c28bbe16e5e396367dcfe673 Reviewed-on: https://go-review.googlesource.com/c/go/+/472555 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: David du Colombier <0intro@gmail.com> Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/database/sql/sql_test.go')
0 files changed, 0 insertions, 0 deletions