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

Go 1.16 beta1: panic: unexpected call to os.Exit(0) during test #132

Closed
eclipseo opened this issue Jan 21, 2021 · 0 comments
Closed

Go 1.16 beta1: panic: unexpected call to os.Exit(0) during test #132

eclipseo opened this issue Jan 21, 2021 · 0 comments

Comments

@eclipseo
Copy link

eclipseo commented Jan 21, 2021

Golang 1.16 introduced a change that makes the test fail:


Testing    in: /builddir/build/BUILD/complete-2.0.1-alpha.13/_build/src
         PATH: /builddir/build/BUILD/complete-2.0.1-alpha.13/_build/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
       GOPATH: /builddir/build/BUILD/complete-2.0.1-alpha.13/_build:/usr/share/gocode
  GO111MODULE: off
      command: go test -buildmode pie -compiler gc -ldflags " -X github.com/posener/complete/v2/version=2.0.1~alpha.13 -extldflags '-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld  '"
      testing: github.com/posener/complete/v2
github.com/posener/complete/v2
PASS
ok  	github.com/posener/complete/v2	0.007s
github.com/posener/complete/v2/compflag
invalid value "3" for flag -a: not in allowed values: 1,2
Usage:
  -a value
    	
invalid value "3" for flag -a: not in allowed values: 1,2
Usage:
  -a value
    	 (default 0)
invalid value "1h" for flag -a: not in allowed values: 1s,1m
Usage:
invalid value "x" for flag -a: bad value for Int flag
  -a value
    	 (default 0s)
invalid value "1" for flag -a: bad value for Duration flag
Usage:
  -a value
    	 (default 0s)
Usage:
  -a value
    	 (default 0)
PASS
ok  	github.com/posener/complete/v2/compflag	0.006s
github.com/posener/complete/v2/gocomplete
run
--- FAIL: Example (0.00s)
panic: unexpected call to os.Exit(0) during test [recovered]
	panic: unexpected call to os.Exit(0) during test

It is maybe related to https://tip.golang.org/doc/go1.16#go-test

golang/go#29062
https://go-review.googlesource.com/c/go/+/250977/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants