agiledragon / agiledragon/gomonkey
tests not pass on M1/arm64 arch
- 主要语言
- Go
- 星标
- 2.3k
- 派生
- 192
- 平均合并
- 1 天 6 小时
- 30 天内合并 PR
- 1
描述
```
gomonkey % pwd
/Users/chenlijun/go/src/github.com/agiledragon/gomonkey
gomonkey % docker run -it --rm -v /Users/chenlijun/go:/go --privileged golang bash
root@0d9aff1c6cf8:/go#
```
```
root@0d9aff1c6cf8:/go# cd src/github.com/agiledragon/gomonkey
root@0d9aff1c6cf8:/go/src/github.com/agiledragon/gomonkey# cd test/
root@0d9aff1c6cf8:/go/src/github.com/agiledragon/gomonkey/test# GOARCH=arm64 go test -gcflags=all=-l
.....................x
Failures:
* /go/src/github.com/agiledragon/gomonkey/test/apply_func_return_test.go
Line 35:
Expected: 'hello golang'
Actual: 'hello cpp'
(Should be equal)
goroutine 18 [running]:
github.com/agiledragon/gomonkey/v2/test.TestApplyFuncReturn.func1.1()
/go/src/github.com/agiledragon/gomonkey/test/apply_func_return_test.go:35 +0x2dc
github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
/go/src/github.com/agiledragon/gomonkey/vendor/github.com/jtolds/gls/context.go:97 +0x36c
github.com/jtolds/gls.EnsureGoroutineId(0x40001086f0)
/go/src/github.com/agiledragon/gomonkey/vendor/github.com/jtolds/gls/gid.go:19 +0xf8
github.com/jtolds/gls.(*ContextManager).SetValues(0x4000104520, 0x4000108690, 0x400011e0d8)
/go/src/github.com/agiledragon/gomonkey/vendor/github.com/jtolds/gls/context.go:63 +0x168
github.com/agiledragon/gomonkey/v2/test.TestApplyFuncReturn.func1()
/go/src/github.com/agiledragon/gomonkey/test/apply_func_return_test.go:17 +0x64
github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
/go/src/github.com/agiledragon/gomonkey/vendor/github.com/jtolds/gls/context.go:97 +0x36c
github.com/jtolds/gls.EnsureGoroutineId.func1()
/go/src/github.com/agiledragon/gomonkey/vendor/github.com/jtolds/gls/gid.go:24 +0x2c
github.com/jtolds/gls._m(0x4000058d98?, 0x178978?)
/go/src/github.com/agiledragon/gomonkey/vendor/github.com/jtolds/gls/stack_tags.go:108 +0x2c
github.com/jtolds/gls.github_com_jtolds_gls_markS(0x31fb01?, 0x4000058d80?)
/go/src/github.com/agiledragon/gomonkey/vendor/github.com/jtolds/gls/stack_tags.go:56 +0x20
github.com/jtolds/gls.addStackTag(0x31fb20?, 0x3205e0?)
/go/src/github.com/agiledragon/gomonkey/vendor/github.com/jtolds/gls/stack_tags.go:49 +0x24
github.com/jtolds/gls.EnsureGoroutineId(0x40001085a0)
/go/src/github.com/agiledragon/gomonkey/vendor/github.com/jtolds/gls/gid.go:24 +0xd0
github.com/jtolds/gls.(*ContextManager).SetValues(0x4000104520, 0x4000108540, 0x4000148040)
/go/src/github.com/agiledragon/gomonkey/vendor/github.com/jtolds/gls/context.go:63 +0x168
github.com/agiledragon/gomonkey/v2/test.TestApplyFuncReturn(0x0?)
/go/src/github.com/agiledragon/gomonkey/test/apply_func_return_test.go:15 +0x78
testing.tRunner(0x4000113040, 0x1eed00)
/usr/local/go/src/testing/testing.go:1439 +0x118
created by testing.(*T).Run
/usr/local/go/src/testing/testing.go:1486 +0x300
22 total assertions
--- FAIL: TestApplyFuncReturn (0.00s)
..........E
Errors:
* /go/src/github.com/agiledragon/gomonkey/test/apply_func_seq_test.go
Line 65: - double seq is less than call seq
goroutine 19 [running]:
panic({0x1a5220, 0x1fbb20})
/usr/local/go/src/runtime/panic.go:838 +0x210
github.com/agiledragon/gomonkey/v2.getDoubleFunc.func1({0x1ac080?, 0x0?, 0x1?})
/go/src/github.com/agiledragon/gomonkey/patch.go:308 +0xc4
github.com/agiledragon/gomonkey/v2/test.TestApplyFuncSeq.func1.3()
/go/src/github.com/agiledragon/gomonkey/test/apply_func_seq_test.go:65 +0x1a0
github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
/go/src/github.com/agiledragon/gomonkey/vendor/github.com/jtolds/gls/context.go:97 +0x3
```
贡献指南
这个仓库没有索引到贡献指南
调研方向
Reproduce the failures with GOARCH=arm64 go test -gcflags=all=-l from the test directory. Start with test/apply_func_return_test.go and test/apply_func_seq_test.go, then inspect patch.go around getDoubleFunc, using the reported failures as the acceptance checks. Done means these arm64 tests pass without regressing the existing suite.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- go
- 领域
- testing
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100