karmada-io / karmada

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration
https://karmada.io
Apache License 2.0
4.37k stars 865 forks source link

make test failed ` permission denied` on macos 11.6.5 #1789

Closed ikaven1024 closed 2 years ago

ikaven1024 commented 2 years ago

What happened: make test failed:

=== RUN   Test_GroupClustersWithScore
--- FAIL: Test_GroupClustersWithScore (0.00s)
panic: permission denied [recovered]
        panic: permission denied

goroutine 15 [running]:
testing.tRunner.func1.2({0x101f1a760, 0x102b79c68})
        /Users/didi/sdk/go1.17.5/src/testing/testing.go:1209 +0x348
testing.tRunner.func1(0xc0006036c0)
        /Users/didi/sdk/go1.17.5/src/testing/testing.go:1212 +0x2e4
panic({0x101f1a760, 0x102b79c68})
        /Users/didi/sdk/go1.17.5/src/runtime/panic.go:1052 +0x2ac
github.com/agiledragon/gomonkey/v2.modifyBinary(0x101b39a70, {0xc000132798, 0x18, 0x18})
        /Users/didi/OpenSouorce/karmada/vendor/github.com/agiledragon/gomonkey/v2/modify_binary_darwin.go:9 +0x150
github.com/agiledragon/gomonkey/v2.replace(0x101b39a70, 0x102070018)
        /Users/didi/OpenSouorce/karmada/vendor/github.com/agiledragon/gomonkey/v2/patch.go:255 +0x100
github.com/agiledragon/gomonkey/v2.(*Patches).ApplyCore(0xc0000e1770, {0x101ec08c0, 0x102070030, 0x13}, {0x101ec08c0, 0x102070018, 0x13})
        /Users/didi/OpenSouorce/karmada/vendor/github.com/agiledragon/gomonkey/v2/patch.go:217 +0x214
github.com/agiledragon/gomonkey/v2.(*Patches).ApplyFunc(0xc0000e1770, {0x101ec08c0, 0x102070030}, {0x101ec08c0, 0x102070018})
        /Users/didi/OpenSouorce/karmada/vendor/github.com/agiledragon/gomonkey/v2/patch.go:82 +0x318
github.com/agiledragon/gomonkey/v2.ApplyFunc(...)
        /Users/didi/OpenSouorce/karmada/vendor/github.com/agiledragon/gomonkey/v2/patch.go:24
github.com/karmada-io/karmada/pkg/scheduler/core/spreadconstraint.Test_GroupClustersWithScore(0xc0006036c0)
        /Users/didi/OpenSouorce/karmada/pkg/scheduler/core/spreadconstraint/group_clusters_test.go:176 +0x1608
testing.tRunner(0xc0006036c0, 0x102070020)
        /Users/didi/sdk/go1.17.5/src/testing/testing.go:1259 +0x19c
created by testing.(*T).Run
        /Users/didi/sdk/go1.17.5/src/testing/testing.go:1306 +0x5bc

What you expected to happen: test successfully.

How to reproduce it (as minimally and precisely as possible): make test on macos 11.6.5

Anything else we need to know?: Of course, it's bug of gomonkey, https://github.com/agiledragon/gomonkey/issues/77. But it is a bad experience for karmadaer. So shall we remove gomonkey?

Environment:

ikaven1024 commented 2 years ago

/assign

ikaven1024 commented 2 years ago

max_prot=7 is not work after 11.4 https://gist.github.com/darfink/a756b88e999631d75cbbeefd3eee7e2d

https://github.com/agiledragon/gomonkey/issues/57#issuecomment-919782941

RainbowMango commented 2 years ago

So shall we remove gomonkey?

We haven't been much used this tool. My answer is yes if we find an alternative way.

CharlesQQ commented 2 years ago

I meet the same problem

image