From: Than McIntosh Date: Mon, 27 Nov 2023 17:24:59 +0000 (-0500) Subject: cmd/go: use local go cache for cover_statements script test X-Git-Tag: go1.22rc1~87 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6e33a6376e5bbbfa34c72c34d61abcc3f5891772;p=gostls13.git cmd/go: use local go cache for cover_statements script test Use a test-local directory for GOCACHE in "cover_statements" script test, as a workaround for issue 64014. For the portion of this test that verifies that caching works correctly, the cache should theoretically always behave reliably/deterministically, however if other tests are concurrently accessing the cache while this test is running, it can lead to cache lookup failures, which manifest as a flaky failure. To avoid such flakes, use a separate isolated GOCACHE for this test. For #64014. Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest Change-Id: Ia66798215a75b7c41188ed15920c17b73f40152a Reviewed-on: https://go-review.googlesource.com/c/go/+/545235 LUCI-TryBot-Result: Go LUCI Reviewed-by: Bryan Mills --- diff --git a/src/cmd/go/testdata/script/cover_statements.txt b/src/cmd/go/testdata/script/cover_statements.txt index 24b5751154..030177cb8b 100644 --- a/src/cmd/go/testdata/script/cover_statements.txt +++ b/src/cmd/go/testdata/script/cover_statements.txt @@ -1,5 +1,13 @@ [short] skip +# Workaround for issue 64014 -- for the portion of this test that +# verifies that caching works correctly, the cache should theoretically +# always behave reliably/deterministically, however if other tests are +# concurrently accessing the cache while this test is running, it can +# lead to cache lookup failures, which manifest as test failures here. +# To avoid such flakes, use a separate isolated GOCACHE for this test. +env GOCACHE=$WORK/cache + # Initial run with simple coverage. go test -cover ./pkg1 ./pkg2 ./pkg3 ./pkg4 [!GOEXPERIMENT:coverageredesign] stdout 'pkg1 \[no test files\]'