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

Test failure with Golang 1.12-0.rc1 #4

Open
eclipseo opened this issue Feb 20, 2019 · 3 comments
Open

Test failure with Golang 1.12-0.rc1 #4

eclipseo opened this issue Feb 20, 2019 · 3 comments

Comments

@eclipseo
Copy link

eclipseo commented Feb 20, 2019

+ go test -buildmode pie -compiler gc -ldflags '-extldflags '\''-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '\'''
--------
 2019/02/20 18:34:38 [logex.test:logex_test.go:19]aa
2019/02/20 18:34:38 [logex.TestLogex:logex_test.go:42][INFO] b
2019/02/20 18:34:38 [logex.test:logex_test.go:21][INFO] c
2019/02/20 18:34:38 [logex.TestLogex:logex_test.go:42][ERROR] ec
2019/02/20 18:34:38 [logex.(*S).hello:logex_test.go:11][WARN] warn in hello
2019/02/20 18:34:38 [logex.TestLogex:logex_test.go:42][STRUCT] *logex.S(&{Logger:{depth:0 reqid: Logger:<nil>}}), int(1), string(), bool(false)
--- FAIL: TestLogex (0.00s)
    logex_test.go:58: except .test:logex_test.go:20][INFO] b not found
FAIL
exit status 1
FAIL	github.com/chzyer/logex	0.005

The line numbers seem to have changed from 20 to 42 in the test output.

@fvcr
Copy link

fvcr commented Apr 28, 2021

I will follow up on this as I have the same problem.

root@aa509f285230:~# go version

go version go1.15.9 linux/amd64
root@aa509f285230:~# go test -vet=off -v -p 8 /root/go/src/gopkg.in/logex.v1/

=== RUN   TestError
--- PASS: TestError (0.00s)
=== RUN   TestLogex
--------
 2021/04/28 23:23:47 [logex%2ev1.test:logex_test.go:19]aa
2021/04/28 23:23:47 [logex%2ev1.TestLogex:logex_test.go:42][INFO] b
2021/04/28 23:23:47 [logex%2ev1.test:logex_test.go:21][INFO] c
2021/04/28 23:23:47 [logex%2ev1.TestLogex:logex_test.go:42][ERROR] ec
2021/04/28 23:23:47 [logex%2ev1.(*S).hello:logex_test.go:11][WARN] warn in hello
2021/04/28 23:23:47 [logex%2ev1.TestLogex:logex_test.go:42][STRUCT] *logex.S(&{Logger:{depth:0 reqid: Logger:<nil>}}), int(1), string(), bool(false)

    logex_test.go:58: except .test:logex_test.go:20][INFO] b not found
--- FAIL: TestLogex (0.00s)
FAIL
FAIL	gopkg.in/logex.v1	0.002s
FAIL

@Balavva-Mirji
Copy link

Balavva-Mirji commented Aug 22, 2022

 # go test -v ./...
=== RUN   TestError
--- PASS: TestError (0.00s)
=== RUN   TestLogex
--------
2022/08/19 10:38:09 [logex.test:logex_test.go:19]aa
2022/08/19 10:38:09 [logex.TestLogex:logex_test.go:42][INFO] b
2022/08/19 10:38:09 [logex.test:logex_test.go:21][INFO] c
2022/08/19 10:38:09 [logex.TestLogex:logex_test.go:42][ERROR] ec
2022/08/19 10:38:09 [logex.(*S).hello:logex_test.go:11][WARN] warn in hello
2022/08/19 10:38:09 [logex.TestLogex:logex_test.go:42][STRUCT] *logex.S(&{Logger:{depth:0 reqid: Logger:<nil>}}), int(1), string(), bool(false)

    logex_test.go:58: except .test:logex_test.go:20][INFO] b not found
--- FAIL: TestLogex (0.00s)
FAIL
FAIL    github.com/chzyer/logex 0.002s
FAIL

Observed same test failure on both Intel and power.

@Hellseher
Copy link
Contributor

PR fixing the tests
#7

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

4 participants