Closed lowang-bh closed 1 year ago
/assign
update gomonkey v2.1.0 to v2.2.0
go test -timeout 30s -run ^TestSyncJobFunc$ volcano.sh/volcano/pkg/controllers/job
--- FAIL: TestSyncJobFunc (0.00s)
--- FAIL: TestSyncJobFunc/SyncJob_success_Case (0.00s)
panic: permission denied [recovered]
panic: permission denied
update gomonkey v2.1.0 to v2.2.0
go test -timeout 30s -run ^TestSyncJobFunc$ volcano.sh/volcano/pkg/controllers/job --- FAIL: TestSyncJobFunc (0.00s) --- FAIL: TestSyncJobFunc/SyncJob_success_Case (0.00s) panic: permission denied [recovered] panic: permission denied
Can not solve this. It has no permit to change darwin's machine instruction. You can run make unit-test in docker.
Please check those solutions: https://github.com/agiledragon/gomonkey/issues/10 https://github.com/agiledragon/gomonkey/issues/70
I have tried all those solution, it doesn't works.
page := entryAddress(pageStart(target), syscall.Getpagesize())
- err := syscall.Mprotect(page, syscall.PROT_READ|syscall.PROT_WRITE|syscall.PROT_EXEC)
+ err := syscall.Mprotect(page, syscall.PROT_READ|syscall.PROT_WRITE)
if err != nil {
https://blog.csdn.net/weixin_42873928/article/details/129957307
update gomonkey v2.1.0 to v2.2.0
@xiefan-github This upgrade solves issue the buildJmpDirective not support on ARM64
so that it can build successfully.
The permission denied is another issue. I usally run make unit-test
in a docker on macos to pass this problem.
it seems to work for me sleep 1s
sorry it has two change, you can get it https://github.com/agiledragon/gomonkey/issues/70#issuecomment-1558475808
I usally run
make unit-test
in a docker on macos to pass this problem.
can you give me a docker command?pls
agiledragon/gomonkey#70 (comment)
I usally run
make unit-test
in a docker on macos to pass this problem.can you give me a docker command?pls
docker run --rm -it -v ./:/go/src/volcano.sh/ -w /go/src/volcano.sh/ golang:1.19.4 make unit-test
gomockey
undefined: buildJmpDirective
relative issue has been solved, FYI: https://github.com/agiledragon/gomonkey/issues/38 https://github.com/agiledragon/gomonkey/pull/55What happened:
go test -timeout 30s -run ^TestSyncJobFunc$ volcano.sh/volcano/pkg/controllers/job
What you expected to happen:
Succeed to run unit-test
How to reproduce it (as minimally and precisely as possible):
go test -timeout 30s -run ^TestSyncJobFunc$ volcano.sh/volcano/pkg/controllers/job
ormake unit-test
Anything else we need to know?:
Just open code on macbook m1/m2, the lint will tells the error or run
make unit-test
on m1/m2After upgrade this package, there is another issue
permission denied
,Environment:
kubectl version
):uname -a
):