From 250b2131eb8b6093aad664eb9012cf44c9f66b68 Mon Sep 17 00:00:00 2001 From: Michael Matloob Date: Thu, 9 Apr 2020 15:15:59 -0400 Subject: [PATCH] go/loader: remove check on ioutil.TestTempFile in TestStdlib The check was there to test that the loader worked with a cycle between the three augmented packages compress/bzip2, io/ioutil, and regexp, because of dependencies between each of the packages' tests and the next package. The test in io/ioutil that had the dependency that created the cycle no longer exists in that package (it's been moved out into the ioutil_test xtest). Remove the check for that package. Unfortunately this means that the cycle that was being checked for before is no longer being checked. That could be fixed in a future change by creating three fake packages in testdata that have this relationship. Fixes golang/go#38318 Updates golang/go#19152 Change-Id: I8ce88102a5505d8edf8d54d2098c85a8d3cd622f Reviewed-on: https://go-review.googlesource.com/c/tools/+/227772 Run-TryBot: Michael Matloob TryBot-Result: Gobot Gobot Reviewed-by: Dmitri Shuralyov --- go/loader/stdlib_test.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/go/loader/stdlib_test.go b/go/loader/stdlib_test.go index 9b8fd524aa..b55aa8ffa2 100644 --- a/go/loader/stdlib_test.go +++ b/go/loader/stdlib_test.go @@ -79,17 +79,15 @@ func TestStdlib(t *testing.T) { } } - // Check that Test functions for io/ioutil, regexp and - // compress/bzip2 are all simultaneously present. - // (The apparent cycle formed when augmenting all three of - // these packages by their tests was the original motivation - // for reporting b/7114.) + // Check that Test functions for regexp and compress/bzip2 are + // simultaneously present. The apparent cycle formed when augmenting + // these packages by their tests (together with io/ioutil's test, which is now + // an xtest) was the original motivation or reporting golang.org/issue/7114. // // compress/bzip2.TestBitReader in bzip2_test.go imports io/ioutil - // io/ioutil.TestTempFile in tempfile_test.go imports regexp + // io/ioutil.TestTempFile in tempfile_test.go imports regexp (no longer exists) // regexp.TestRE2Search in exec_test.go imports compress/bzip2 for _, test := range []struct{ pkg, fn string }{ - {"io/ioutil", "TestTempFile"}, {"regexp", "TestRE2Search"}, {"compress/bzip2", "TestBitReader"}, } {