Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not run tests under Go 1.13 #12186

Closed
ekalinin opened this issue Sep 14, 2019 · 8 comments
Closed

Could not run tests under Go 1.13 #12186

ekalinin opened this issue Sep 14, 2019 · 8 comments
Labels
type/bug This issue is a bug.

Comments

@ekalinin
Copy link
Contributor

ekalinin commented Sep 14, 2019

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
$ git clone git@github.com:pingcap/tidb.git
$ cd tidb
$ git log -n 1                             
commit 0f55274760064a2e5ceffbd492616c0ffba75643 (HEAD -> master, origin/master, origin/HEAD)
Author: djshow832 <873581766@qq.com>
Date:   Thu Sep 12 19:53:16 2019 +0800

    infoschema, session: support for events_statements_summary_by_digest (#12017)
$ make dev
  1. What did you expect to see?

All tests are ok.

  1. What did you see instead?
GO111MODULE=on go build -o ../bin/errcheck github.com/kisielk/errcheck
errcheck
error: failed to check packages: errors while loading package github.com/pingcap/tidb/kv/memdb: [/home/kev/projects/my/tidb/kv/memdb/memdb.s:12:35: expected ';', found 'EOF' /home/kev/projects/my/tidb/kv/memdb/memdb.s:12:35: expected 'IDENT', found 'EOF' /home/kev/projects/my/tidb/kv/memdb/memdb.s:12:35: expected 'package', found 'EOF' -: package ; expected memdb]
cd tools/check; \
GO111MODULE=on go build -o ../bin/revive github.com/mgechev/revive
linting
go mod tidy
./tools/check/check-tidy.sh
Makefile:112: recipe for target 'tidy' failed
make: *** [tidy] Error 1
  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?

master branch. last commit=0f55274760064a2e5ceffbd492616c0ffba75643

$ go version    
go version go1.13 linux/amd64

$ go env        
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/kev/.cache/go-build"
GOENV="/home/kev/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/kev/projects/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/kev/.go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/kev/.go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/kev/projects/my/tidb/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build534614702=/tmp/go-build -gno-record-gcc-switches"
@ekalinin ekalinin added the type/bug This issue is a bug. label Sep 14, 2019
@ekalinin
Copy link
Contributor Author

ekalinin commented Sep 16, 2019

It seems like it's related to #11807

@ekalinin
Copy link
Contributor Author

@ekalinin
Copy link
Contributor Author

ekalinin commented Sep 16, 2019

One more issue under go1.13, Go 1.13 release notes (testing):

Testing flags are now registered in the new Init function, which is invoked by the generated main function for the test. As a result, testing flags are now only registered when running a test binary, and packages that call flag.Parse during package initialization may cause tests to fail.

Failed tests
➜ make gotest
Running in native mode.
flag provided but not defined: -test.testlogfile
Usage of /tmp/go-build251627438/b001/bindinfo.test:
  -check.b
        Run benchmarks
  -check.bmem
        Report memory benchmarks
  -check.btime duration
        approximate run time for each benchmark (default 1s)
  -check.exclude string
        Regular expression to exclude tests to run
  -check.f string
        Regular expression selecting which tests and/or suites to run
  -check.list
        List the names of all tests that will be run
  -check.p
        Run suites in parallel
  -check.v
        Verbose mode
  -check.vv
        Super verbose mode (disables output caching)
  -check.work
        Display and do not remove the test working directory
  -gocheck.b
        Run benchmarks
  -gocheck.btime duration
        approximate run time for each benchmark (default 1s)
  -gocheck.f string
        Regular expression selecting which tests and/or suites to run
  -gocheck.list
        List the names of all tests that will be run
  -gocheck.v
        Verbose mode
  -gocheck.vv
        Super verbose mode (disables output caching)
  -gocheck.work
        Display and do not remove the test working directory
  -record
        to generate test result
FAIL    github.com/pingcap/tidb/bindinfo        0.007s
ok      github.com/pingcap/tidb/config  (cached)        coverage: 61.1% of statements
flag provided but not defined: -test.testlogfile
Usage of /tmp/go-build251627438/b410/ddl.test:
  -check.b
        Run benchmarks
  -check.bmem
        Report memory benchmarks
  -check.btime duration
        approximate run time for each benchmark (default 1s)
  -check.exclude string
        Regular expression to exclude tests to run
  -check.f string
        Regular expression selecting which tests and/or suites to run
  -check.list
        List the names of all tests that will be run
  -check.p
        Run suites in parallel
  -check.v
        Verbose mode
  -check.vv
        Super verbose mode (disables output caching)
  -check.work
        Display and do not remove the test working directory
  -gocheck.b
        Run benchmarks
  -gocheck.btime duration
        approximate run time for each benchmark (default 1s)
  -gocheck.f string
        Regular expression selecting which tests and/or suites to run
  -gocheck.list
        List the names of all tests that will be run
  -gocheck.v
        Verbose mode
  -gocheck.vv
        Super verbose mode (disables output caching)
  -gocheck.work
        Display and do not remove the test working directory
  -record
        to generate test result
FAIL    github.com/pingcap/tidb/ddl     0.009s
ok      github.com/pingcap/tidb/ddl/util        (cached)        coverage: 54.5% of statements
ok      github.com/pingcap/tidb/distsql (cached)        coverage: 86.6% of statements
ok      github.com/pingcap/tidb/domain  (cached)        coverage: 80.8% of statements
flag provided but not defined: -test.testlogfile
Usage of /tmp/go-build251627438/b538/executor.test:
  -check.b
        Run benchmarks
  -check.bmem
        Report memory benchmarks
  -check.btime duration
        approximate run time for each benchmark (default 1s)
  -check.exclude string
        Regular expression to exclude tests to run
  -check.f string
        Regular expression selecting which tests and/or suites to run
  -check.list
        List the names of all tests that will be run
  -check.p
        Run suites in parallel
  -check.v
        Verbose mode
  -check.vv
        Super verbose mode (disables output caching)
  -check.work
        Display and do not remove the test working directory
  -gocheck.b
        Run benchmarks
  -gocheck.btime duration
        approximate run time for each benchmark (default 1s)
  -gocheck.f string
        Regular expression selecting which tests and/or suites to run
  -gocheck.list
        List the names of all tests that will be run
  -gocheck.v
        Verbose mode
  -gocheck.vv
        Super verbose mode (disables output caching)
  -gocheck.work
        Display and do not remove the test working directory
  -record
        to generate test result
FAIL    github.com/pingcap/tidb/executor        0.024s
ok      github.com/pingcap/tidb/executor/aggfuncs       (cached)        coverage: 87.9% of statements
flag provided but not defined: -test.testlogfile
Usage of /tmp/go-build251627438/b555/expression.test:
  -check.b
        Run benchmarks
  -check.bmem
        Report memory benchmarks
  -check.btime duration
        approximate run time for each benchmark (default 1s)
  -check.exclude string
        Regular expression to exclude tests to run
  -check.f string
        Regular expression selecting which tests and/or suites to run
  -check.list
        List the names of all tests that will be run
  -check.p
        Run suites in parallel
  -check.v
        Verbose mode
  -check.vv
        Super verbose mode (disables output caching)
  -check.work
        Display and do not remove the test working directory
  -gocheck.b
        Run benchmarks
  -gocheck.btime duration
        approximate run time for each benchmark (default 1s)
  -gocheck.f string
        Regular expression selecting which tests and/or suites to run
  -gocheck.list
        List the names of all tests that will be run
  -gocheck.v
        Verbose mode
  -gocheck.vv
        Super verbose mode (disables output caching)
  -gocheck.work
        Display and do not remove the test working directory
  -record
        to generate test result
FAIL    github.com/pingcap/tidb/expression      0.012s
ok      github.com/pingcap/tidb/expression/aggregation  (cached)        coverage: 53.3% of statements
flag provided but not defined: -test.testlogfile
Usage of /tmp/go-build251627438/b589/infoschema.test:
  -check.b
        Run benchmarks
  -check.bmem
        Report memory benchmarks
  -check.btime duration
        approximate run time for each benchmark (default 1s)
  -check.exclude string
        Regular expression to exclude tests to run
  -check.f string
        Regular expression selecting which tests and/or suites to run
  -check.list
        List the names of all tests that will be run
  -check.p
        Run suites in parallel
  -check.v
        Verbose mode
  -check.vv
        Super verbose mode (disables output caching)
  -check.work
        Display and do not remove the test working directory
  -gocheck.b
        Run benchmarks
  -gocheck.btime duration
        approximate run time for each benchmark (default 1s)
  -gocheck.f string
        Regular expression selecting which tests and/or suites to run
  -gocheck.list
        List the names of all tests that will be run
  -gocheck.v
        Verbose mode
  -gocheck.vv
        Super verbose mode (disables output caching)
  -gocheck.work
        Display and do not remove the test working directory
  -record
        to generate test result
FAIL    github.com/pingcap/tidb/infoschema      0.007s
flag provided but not defined: -test.testlogfile
Usage of /tmp/go-build251627438/b607/perfschema.test:
  -check.b
        Run benchmarks
  -check.bmem
        Report memory benchmarks
  -check.btime duration
        approximate run time for each benchmark (default 1s)
  -check.exclude string
        Regular expression to exclude tests to run
  -check.f string
        Regular expression selecting which tests and/or suites to run
  -check.list
        List the names of all tests that will be run
  -check.p
        Run suites in parallel
  -check.v
        Verbose mode
  -check.vv
        Super verbose mode (disables output caching)
  -check.work
        Display and do not remove the test working directory
  -gocheck.b
        Run benchmarks
  -gocheck.btime duration
        approximate run time for each benchmark (default 1s)
  -gocheck.f string
        Regular expression selecting which tests and/or suites to run
  -gocheck.list
        List the names of all tests that will be run
  -gocheck.v
        Verbose mode
  -gocheck.vv
        Super verbose mode (disables output caching)
  -gocheck.work
        Display and do not remove the test working directory
  -record
        to generate test result
FAIL    github.com/pingcap/tidb/infoschema/perfschema   0.010s
ok      github.com/pingcap/tidb/kv      (cached)        coverage: 86.4% of statements
ok      github.com/pingcap/tidb/kv/memdb        (cached)        coverage: 96.9% of statements
?       github.com/pingcap/tidb/lock    [no test files]
ok      github.com/pingcap/tidb/meta    (cached)        coverage: 86.1% of statements
ok      github.com/pingcap/tidb/meta/autoid     (cached)        coverage: 92.9% of statements
ok      github.com/pingcap/tidb/metrics (cached)        coverage: 100.0% of statements
ok      github.com/pingcap/tidb/owner   (cached)        coverage: 67.9% of statements
?       github.com/pingcap/tidb/planner [no test files]
flag provided but not defined: -test.testlogfile
Usage of /tmp/go-build251627438/b689/cascades.test:
  -check.b
        Run benchmarks
  -check.bmem
        Report memory benchmarks
  -check.btime duration
        approximate run time for each benchmark (default 1s)
  -check.exclude string
        Regular expression to exclude tests to run
  -check.f string
        Regular expression selecting which tests and/or suites to run
  -check.list
        List the names of all tests that will be run
  -check.p
        Run suites in parallel
  -check.v
        Verbose mode
  -check.vv
        Super verbose mode (disables output caching)
  -check.work
        Display and do not remove the test working directory
  -gocheck.b
        Run benchmarks
  -gocheck.btime duration
        approximate run time for each benchmark (default 1s)
  -gocheck.f string
        Regular expression selecting which tests and/or suites to run
  -gocheck.list
        List the names of all tests that will be run
  -gocheck.v
        Verbose mode
  -gocheck.vv
        Super verbose mode (disables output caching)
  -gocheck.work
        Display and do not remove the test working directory
  -record
        to generate test result
FAIL    github.com/pingcap/tidb/planner/cascades        0.010s
flag provided but not defined: -test.testlogfile
Usage of /tmp/go-build251627438/b697/core.test:
  -check.b
        Run benchmarks
  -check.bmem
        Report memory benchmarks
  -check.btime duration
        approximate run time for each benchmark (default 1s)
  -check.exclude string
        Regular expression to exclude tests to run
  -check.f string
        Regular expression selecting which tests and/or suites to run
  -check.list
        List the names of all tests that will be run
  -check.p
        Run suites in parallel
  -check.v
        Verbose mode
  -check.vv
        Super verbose mode (disables output caching)
  -check.work
        Display and do not remove the test working directory
  -gocheck.b
        Run benchmarks
  -gocheck.btime duration
        approximate run time for each benchmark (default 1s)
  -gocheck.f string
        Regular expression selecting which tests and/or suites to run
  -gocheck.list
        List the names of all tests that will be run
  -gocheck.v
        Verbose mode
  -gocheck.vv
        Super verbose mode (disables output caching)
  -gocheck.work
        Display and do not remove the test working directory
  -record
        to generate test result
FAIL    github.com/pingcap/tidb/planner/core    0.008s
ok      github.com/pingcap/tidb/planner/implementation  (cached)        coverage: 16.1% of statements
ok      github.com/pingcap/tidb/planner/memo    (cached)        coverage: 85.7% of statements
?       github.com/pingcap/tidb/planner/property        [no test files]
ok      github.com/pingcap/tidb/plugin  (cached)        coverage: 61.4% of statements
ok      github.com/pingcap/tidb/plugin/conn_ip_example  (cached)        coverage: 0.0% of statements [no tests to run]
?       github.com/pingcap/tidb/privilege       [no test files]
flag provided but not defined: -test.testlogfile
Usage of /tmp/go-build251627438/b722/privileges.test:
  -check.b
        Run benchmarks
  -check.bmem
        Report memory benchmarks
  -check.btime duration
        approximate run time for each benchmark (default 1s)
  -check.exclude string
        Regular expression to exclude tests to run
  -check.f string
        Regular expression selecting which tests and/or suites to run
  -check.list
        List the names of all tests that will be run
  -check.p
        Run suites in parallel
  -check.v
        Verbose mode
  -check.vv
        Super verbose mode (disables output caching)
  -check.work
        Display and do not remove the test working directory
  -gocheck.b
        Run benchmarks
  -gocheck.btime duration
        approximate run time for each benchmark (default 1s)
  -gocheck.f string
        Regular expression selecting which tests and/or suites to run
  -gocheck.list
        List the names of all tests that will be run
  -gocheck.v
        Verbose mode
  -gocheck.vv
        Super verbose mode (disables output caching)
  -gocheck.work
        Display and do not remove the test working directory
  -record
        to generate test result
FAIL    github.com/pingcap/tidb/privilege/privileges    0.008s
ok      github.com/pingcap/tidb/server  (cached)        coverage: 62.8% of statements
flag provided but not defined: -test.testlogfile
Usage of /tmp/go-build251627438/b756/session.test:
  -check.b
        Run benchmarks
  -check.bmem
        Report memory benchmarks
  -check.btime duration
        approximate run time for each benchmark (default 1s)
  -check.exclude string
        Regular expression to exclude tests to run
  -check.f string
        Regular expression selecting which tests and/or suites to run
  -check.list
        List the names of all tests that will be run
  -check.p
        Run suites in parallel
  -check.v
        Verbose mode
  -check.vv
        Super verbose mode (disables output caching)
  -check.work
        Display and do not remove the test working directory
  -gocheck.b
        Run benchmarks
  -gocheck.btime duration
        approximate run time for each benchmark (default 1s)
  -gocheck.f string
        Regular expression selecting which tests and/or suites to run
  -gocheck.list
        List the names of all tests that will be run
  -gocheck.v
        Verbose mode
  -gocheck.vv
        Super verbose mode (disables output caching)
  -gocheck.work
        Display and do not remove the test working directory
  -record
        to generate test result
FAIL    github.com/pingcap/tidb/session 0.010s
ok      github.com/pingcap/tidb/sessionctx      (cached)        coverage: 83.3% of statements
flag provided but not defined: -test.testlogfile
Usage of /tmp/go-build251627438/b764/binloginfo.test:
  -check.b
        Run benchmarks
  -check.bmem
        Report memory benchmarks
  -check.btime duration
        approximate run time for each benchmark (default 1s)
  -check.exclude string
        Regular expression to exclude tests to run
  -check.f string
        Regular expression selecting which tests and/or suites to run
  -check.list
        List the names of all tests that will be run
  -check.p
        Run suites in parallel
  -check.v
        Verbose mode
  -check.vv
        Super verbose mode (disables output caching)
  -check.work
        Display and do not remove the test working directory
  -gocheck.b
        Run benchmarks
  -gocheck.btime duration
        approximate run time for each benchmark (default 1s)
  -gocheck.f string
        Regular expression selecting which tests and/or suites to run
  -gocheck.list
        List the names of all tests that will be run
  -gocheck.v
        Verbose mode
  -gocheck.vv
        Super verbose mode (disables output caching)
  -gocheck.work
        Display and do not remove the test working directory
  -record
        to generate test result
FAIL    github.com/pingcap/tidb/sessionctx/binloginfo   0.015s
ok      github.com/pingcap/tidb/sessionctx/stmtctx      (cached)        coverage: 30.6% of statements
ok      github.com/pingcap/tidb/sessionctx/variable     (cached)        coverage: 53.7% of statements
flag provided but not defined: -test.testlogfile
Usage of /tmp/go-build251627438/b797/statistics.test:
  -check.b
        Run benchmarks
  -check.bmem
        Report memory benchmarks
  -check.btime duration
        approximate run time for each benchmark (default 1s)
  -check.exclude string
        Regular expression to exclude tests to run
  -check.f string
        Regular expression selecting which tests and/or suites to run
  -check.list
        List the names of all tests that will be run
  -check.p
        Run suites in parallel
  -check.v
        Verbose mode
  -check.vv
        Super verbose mode (disables output caching)
  -check.work
        Display and do not remove the test working directory
  -gocheck.b
        Run benchmarks
  -gocheck.btime duration
        approximate run time for each benchmark (default 1s)
  -gocheck.f string
        Regular expression selecting which tests and/or suites to run
  -gocheck.list
        List the names of all tests that will be run
  -gocheck.v
        Verbose mode
  -gocheck.vv
        Super verbose mode (disables output caching)
  -gocheck.work
        Display and do not remove the test working directory
  -record
        to generate test result
FAIL    github.com/pingcap/tidb/statistics      0.008s
flag provided but not defined: -test.testlogfile
Usage of /tmp/go-build251627438/b820/handle.test:
  -check.b
        Run benchmarks
  -check.bmem
        Report memory benchmarks
  -check.btime duration
        approximate run time for each benchmark (default 1s)
  -check.exclude string
        Regular expression to exclude tests to run
  -check.f string
        Regular expression selecting which tests and/or suites to run
  -check.list
        List the names of all tests that will be run
  -check.p
        Run suites in parallel
  -check.v
        Verbose mode
  -check.vv
        Super verbose mode (disables output caching)
  -check.work
        Display and do not remove the test working directory
  -gocheck.b
        Run benchmarks
  -gocheck.btime duration
        approximate run time for each benchmark (default 1s)
  -gocheck.f string
        Regular expression selecting which tests and/or suites to run
  -gocheck.list
        List the names of all tests that will be run
  -gocheck.v
        Verbose mode
  -gocheck.vv
        Super verbose mode (disables output caching)
  -gocheck.work
        Display and do not remove the test working directory
  -record
        to generate test result
FAIL    github.com/pingcap/tidb/statistics/handle       0.008s
ok      github.com/pingcap/tidb/store   (cached)        coverage: 95.5% of statements
ok      github.com/pingcap/tidb/store/helper    (cached)        coverage: 48.6% of statements
?       github.com/pingcap/tidb/store/mockoracle        [no test files]
ok      github.com/pingcap/tidb/store/mockstore (cached)        coverage: 74.1% of statements
ok      github.com/pingcap/tidb/store/mockstore/mocktikv        (cached)        coverage: 29.6% of statements
flag provided but not defined: -test.testlogfile
Usage of /tmp/go-build251627438/b850/tikv.test:
  -check.b
        Run benchmarks
  -check.bmem
        Report memory benchmarks
  -check.btime duration
        approximate run time for each benchmark (default 1s)
  -check.exclude string
        Regular expression to exclude tests to run
  -check.f string
        Regular expression selecting which tests and/or suites to run
  -check.list
        List the names of all tests that will be run
  -check.p
        Run suites in parallel
  -check.v
        Verbose mode
  -check.vv
        Super verbose mode (disables output caching)
  -check.work
        Display and do not remove the test working directory
  -gocheck.b
        Run benchmarks
  -gocheck.btime duration
        approximate run time for each benchmark (default 1s)
  -gocheck.f string
        Regular expression selecting which tests and/or suites to run
  -gocheck.list
        List the names of all tests that will be run
  -gocheck.v
        Verbose mode
  -gocheck.vv
        Super verbose mode (disables output caching)
  -gocheck.work
        Display and do not remove the test working directory
  -pd-addrs string
        pd addrs (default "127.0.0.1:2379")
  -record
        to generate test result
  -with-tikv
        run tests with TiKV cluster started. (not use the mock server)
FAIL    github.com/pingcap/tidb/store/tikv      0.009s
ok      github.com/pingcap/tidb/store/tikv/gcworker     (cached)        coverage: 72.5% of statements
ok      github.com/pingcap/tidb/store/tikv/latch        (cached)        coverage: 95.2% of statements
?       github.com/pingcap/tidb/store/tikv/oracle       [no test files]
ok      github.com/pingcap/tidb/store/tikv/oracle/oracles       (cached)        coverage: 30.0% of statements
?       github.com/pingcap/tidb/store/tikv/tikvrpc      [no test files]
ok      github.com/pingcap/tidb/structure       (cached)        coverage: 85.7% of statements
ok      github.com/pingcap/tidb/table   (cached)        coverage: 86.0% of statements
flag provided but not defined: -test.testlogfile
Usage of /tmp/go-build251627438/b901/tables.test:
  -check.b
        Run benchmarks
  -check.bmem
        Report memory benchmarks
  -check.btime duration
        approximate run time for each benchmark (default 1s)
  -check.exclude string
        Regular expression to exclude tests to run
  -check.f string
        Regular expression selecting which tests and/or suites to run
  -check.list
        List the names of all tests that will be run
  -check.p
        Run suites in parallel
  -check.v
        Verbose mode
  -check.vv
        Super verbose mode (disables output caching)
  -check.work
        Display and do not remove the test working directory
  -gocheck.b
        Run benchmarks
  -gocheck.btime duration
        approximate run time for each benchmark (default 1s)
  -gocheck.f string
        Regular expression selecting which tests and/or suites to run
  -gocheck.list
        List the names of all tests that will be run
  -gocheck.v
        Verbose mode
  -gocheck.vv
        Super verbose mode (disables output caching)
  -gocheck.work
        Display and do not remove the test working directory
  -record
        to generate test result
FAIL    github.com/pingcap/tidb/table/tables    0.008s
ok      github.com/pingcap/tidb/tablecodec      (cached)        coverage: 75.9% of statements
ok      github.com/pingcap/tidb/tidb-server     (cached)        coverage: 1.5% of statements
flag provided but not defined: -test.testlogfile
Usage of /tmp/go-build251627438/b936/types.test:
  -check.b
        Run benchmarks
  -check.bmem
        Report memory benchmarks
  -check.btime duration
        approximate run time for each benchmark (default 1s)
  -check.exclude string
        Regular expression to exclude tests to run
  -check.f string
        Regular expression selecting which tests and/or suites to run
  -check.list
        List the names of all tests that will be run
  -check.p
        Run suites in parallel
  -check.v
        Verbose mode
  -check.vv
        Super verbose mode (disables output caching)
  -check.work
        Display and do not remove the test working directory
  -gocheck.b
        Run benchmarks
  -gocheck.btime duration
        approximate run time for each benchmark (default 1s)
  -gocheck.f string
        Regular expression selecting which tests and/or suites to run
  -gocheck.list
        List the names of all tests that will be run
  -gocheck.v
        Verbose mode
  -gocheck.vv
        Super verbose mode (disables output caching)
  -gocheck.work
        Display and do not remove the test working directory
  -record
        to generate test result
FAIL    github.com/pingcap/tidb/types   0.008s
ok      github.com/pingcap/tidb/types/json      (cached)        coverage: 83.8% of statements
ok      github.com/pingcap/tidb/types/parser_driver     (cached)        coverage: 24.7% of statements
ok      github.com/pingcap/tidb/util    (cached)        coverage: 87.3% of statements
flag provided but not defined: -test.testlogfile
Usage of /tmp/go-build251627438/b1011/admin.test:
  -check.b
        Run benchmarks
  -check.bmem
        Report memory benchmarks
  -check.btime duration
        approximate run time for each benchmark (default 1s)
  -check.exclude string
        Regular expression to exclude tests to run
  -check.f string
        Regular expression selecting which tests and/or suites to run
  -check.list
        List the names of all tests that will be run
  -check.p
        Run suites in parallel
  -check.v
        Verbose mode
  -check.vv
        Super verbose mode (disables output caching)
  -check.work
        Display and do not remove the test working directory
  -gocheck.b
        Run benchmarks
  -gocheck.btime duration
        approximate run time for each benchmark (default 1s)
  -gocheck.f string
        Regular expression selecting which tests and/or suites to run
  -gocheck.list
        List the names of all tests that will be run
  -gocheck.v
        Verbose mode
  -gocheck.vv
        Super verbose mode (disables output caching)
  -gocheck.work
        Display and do not remove the test working directory
  -record
        to generate test result
FAIL    github.com/pingcap/tidb/util/admin      0.008s
ok      github.com/pingcap/tidb/util/arena      (cached)        coverage: 100.0% of statements
ok      github.com/pingcap/tidb/util/chunk      (cached)        coverage: 86.2% of statements
ok      github.com/pingcap/tidb/util/codec      (cached)        coverage: 85.2% of statements
ok      github.com/pingcap/tidb/util/deadlock   (cached)        coverage: 100.0% of statements
ok      github.com/pingcap/tidb/util/disjointset        (cached)        coverage: 100.0% of statements
?       github.com/pingcap/tidb/util/disk       [no test files]
ok      github.com/pingcap/tidb/util/encrypt    (cached)        coverage: 95.2% of statements
ok      github.com/pingcap/tidb/util/execdetails        (cached)        coverage: 56.2% of statements
?       github.com/pingcap/tidb/util/expensivequery     [no test files]
ok      github.com/pingcap/tidb/util/filesort   (cached)        coverage: 86.4% of statements
ok      github.com/pingcap/tidb/util/format     (cached)        coverage: 83.6% of statements
?       github.com/pingcap/tidb/util/gcutil     [no test files]
ok      github.com/pingcap/tidb/util/hack       (cached)        coverage: 100.0% of statements
?       github.com/pingcap/tidb/util/israce     [no test files]
ok      github.com/pingcap/tidb/util/kvcache    (cached)        coverage: 77.2% of statements
flag provided but not defined: -test.testlogfile
Usage of /tmp/go-build251627438/b1060/kvencoder.test:
  -check.b
        Run benchmarks
  -check.bmem
        Report memory benchmarks
  -check.btime duration
        approximate run time for each benchmark (default 1s)
  -check.exclude string
        Regular expression to exclude tests to run
  -check.f string
        Regular expression selecting which tests and/or suites to run
  -check.list
        List the names of all tests that will be run
  -check.p
        Run suites in parallel
  -check.v
        Verbose mode
  -check.vv
        Super verbose mode (disables output caching)
  -check.work
        Display and do not remove the test working directory
  -gocheck.b
        Run benchmarks
  -gocheck.btime duration
        approximate run time for each benchmark (default 1s)
  -gocheck.f string
        Regular expression selecting which tests and/or suites to run
  -gocheck.list
        List the names of all tests that will be run
  -gocheck.v
        Verbose mode
  -gocheck.vv
        Super verbose mode (disables output caching)
  -gocheck.work
        Display and do not remove the test working directory
  -record
        to generate test result
FAIL    github.com/pingcap/tidb/util/kvencoder  0.007s
ok      github.com/pingcap/tidb/util/logutil    (cached)        coverage: 84.5% of statements
ok      github.com/pingcap/tidb/util/math       (cached)        coverage: 33.3% of statements
ok      github.com/pingcap/tidb/util/memory     (cached)        coverage: 72.5% of statements
ok      github.com/pingcap/tidb/util/mock       (cached)        coverage: 16.7% of statements
ok      github.com/pingcap/tidb/util/mvmap      (cached)        coverage: 86.6% of statements
?       github.com/pingcap/tidb/util/pdapi      [no test files]
ok      github.com/pingcap/tidb/util/printer    (cached)        coverage: 88.3% of statements
flag provided but not defined: -test.testlogfile
Usage of /tmp/go-build251627438/b1086/ranger.test:
  -check.b
        Run benchmarks
  -check.bmem
        Report memory benchmarks
  -check.btime duration
        approximate run time for each benchmark (default 1s)
  -check.exclude string
        Regular expression to exclude tests to run
  -check.f string
        Regular expression selecting which tests and/or suites to run
  -check.list
        List the names of all tests that will be run
  -check.p
        Run suites in parallel
  -check.v
        Verbose mode
  -check.vv
        Super verbose mode (disables output caching)
  -check.work
        Display and do not remove the test working directory
  -gocheck.b
        Run benchmarks
  -gocheck.btime duration
        approximate run time for each benchmark (default 1s)
  -gocheck.f string
        Regular expression selecting which tests and/or suites to run
  -gocheck.list
        List the names of all tests that will be run
  -gocheck.v
        Verbose mode
  -gocheck.vv
        Super verbose mode (disables output caching)
  -gocheck.work
        Display and do not remove the test working directory
  -record
        to generate test result
FAIL    github.com/pingcap/tidb/util/ranger     0.007s
ok      github.com/pingcap/tidb/util/rowDecoder (cached)        coverage: 45.5% of statements
ok      github.com/pingcap/tidb/util/rowcodec   (cached)        coverage: 88.6% of statements
ok      github.com/pingcap/tidb/util/set        (cached)        coverage: 100.0% of statements
?       github.com/pingcap/tidb/util/signal     [no test files]
?       github.com/pingcap/tidb/util/sqlexec    [no test files]
ok      github.com/pingcap/tidb/util/stmtsummary        (cached)        coverage: 100.0% of statements
ok      github.com/pingcap/tidb/util/stringutil (cached)        coverage: 95.5% of statements
ok      github.com/pingcap/tidb/util/sys/linux  (cached)        coverage: 68.4% of statements
ok      github.com/pingcap/tidb/util/systimemon (cached)        coverage: 100.0% of statements
ok      github.com/pingcap/tidb/util/timeutil   (cached)        coverage: 63.3% of statements
ok      github.com/pingcap/tidb/util/tracing    (cached)        coverage: 93.3% of statements
FAIL
Makefile:151: recipe for target 'gotest' failed
make: *** [gotest] Error 1

@Deardrops
Copy link
Contributor

related issue in go 1.13: golang/go#31859

@Deardrops
Copy link
Contributor

Deardrops commented Sep 17, 2019

This issue was fixed in #12197, PTAL

@ekalinin
Copy link
Contributor Author

ekalinin commented Sep 17, 2019

One more issue found. The fix is in the #12226

@ekalinin
Copy link
Contributor Author

The main issue is here:

Sent a PR:

@ekalinin
Copy link
Contributor Author

In general, tests are ok now if run them with make gotest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants