Repository: go
Issue: x/tools: various test failures in TryBot run
Labels: NeedsInvestigation,Tools

### What version of Go are you using (`go version`)?

https://golang.org/cl/216158

<pre>
$ go tip

</pre>

### Does this issue reproduce with the latest release?

Doesn't seem to reproduce consistently, possibly flaky tests

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env

</pre></details>

### What did you do?

Ran trybots: https://storage.googleapis.com/go-build-log/2c418b7c/linux-amd64_209916fd.log

### What did you expect to see?

Success

### What did you see instead?

```
2020/01/24 15:23:15 no dep handle: no metadata for nosuchpkg
	package = nosuchpkg
2020/01/24 15:23:15 no dep handle: no metadata for golang.org/x/tools/internal/lsp/protocol
	package = golang.org/x/tools/internal/lsp/protocol
2020/01/24 15:23:15 no dep handle: no metadata for golang.org/x/xerrors
	package = golang.org/x/xerrors
2020/01/24 15:23:20 no dep handle: no metadata for nosuchpkg
	package = nosuchpkg
2020/01/24 15:23:20 no dep handle: no metadata for golang.org/x/tools/internal/lsp/protocol
	package = golang.org/x/tools/internal/lsp/protocol
2020/01/24 15:23:20 no dep handle: no metadata for golang.org/x/xerrors
	package = golang.org/x/xerrors
--- FAIL: TestModfileSuggestedFixes (0.48s)
    --- FAIL: TestModfileSuggestedFixes/indirect (0.35s)
        lsp_test.go:977: err: exit status 2: stderr: flag provided but not defined: -modfile
            usage: go mod tidy [-v]
            Run 'go help mod tidy' for details.
            
    --- FAIL: TestModfileSuggestedFixes/unused (0.14s)
        lsp_test.go:977: err: exit status 2: stderr: flag provided but not defined: -modfile
            usage: go mod tidy [-v]
            Run 'go help mod tidy' for details.
FAIL
FAIL	golang.org/x/tools/internal/lsp	9.074s
```

```
--- FAIL: TestDiagnostics (1.71s)
    --- FAIL: TestDiagnostics/indirect (0.40s)
        mod_test.go:155: err: exit status 2: stderr: flag provided but not defined: -modfile
            usage: go mod tidy [-v]
            Run 'go help mod tidy' for details.
            
    --- FAIL: TestDiagnostics/unused (0.29s)
        mod_test.go:155: err: exit status 2: stderr: flag provided but not defined: -modfile
            usage: go mod tidy [-v]
            Run 'go help mod tidy' for details.
            
    --- FAIL: TestDiagnostics/invalidrequire (0.42s)
        mod_test.go:155: err: exit status 2: stderr: flag provided but not defined: -modfile
            usage: go mod tidy [-v]
            Run 'go help mod tidy' for details.
            
    --- FAIL: TestDiagnostics/invalidgo (0.36s)
        mod_test.go:155: err: exit status 2: stderr: flag provided but not defined: -modfile
            usage: go mod tidy [-v]
            Run 'go help mod tidy' for details.
            
    --- FAIL: TestDiagnostics/unknowndirective (0.23s)
        mod_test.go:155: err: exit status 2: stderr: flag provided but not defined: -modfile
            usage: go mod tidy [-v]
            Run 'go help mod tidy' for details.
            
FAIL
FAIL	golang.org/x/tools/internal/lsp/mod	1.996s
```

```
--- FAIL: TestInvalidFilesInOverlay (7.21s)
    --- FAIL: TestInvalidFilesInOverlay/GOPATH (2.88s)
        --- FAIL: TestInvalidFilesInOverlay/GOPATH/test_variant (2.80s)
            packages114_test.go:71: 0. d.D: got unknown, want "GET_test"
        --- FAIL: TestInvalidFilesInOverlay/GOPATH/second_file (0.07s)
            packages114_test.go:71: 1. d.D: got unknown, want "GET_util"
    --- FAIL: TestInvalidFilesInOverlay/Modules (4.33s)
        --- FAIL: TestInvalidFilesInOverlay/Modules/test_variant (4.13s)
            packages114_test.go:71: 0. d.D: got unknown, want "GET_test"
        --- FAIL: TestInvalidFilesInOverlay/Modules/second_file (0.18s)
            packages114_test.go:71: 1. d.D: got unknown, want "GET_util"
FAIL
FAIL	golang.org/x/tools/go/packages	67.514s
```

Are these flaky?

/cc @stamblerre