Skip to content

Commit

Permalink
Merge pull request #9202 from tomastigera/tomas-fix-ut-race-3.28
Browse files Browse the repository at this point in the history
[BPF] fix race in bpf_ep_mgr tests
  • Loading branch information
tomastigera authored Aug 30, 2024
2 parents 51e5a7e + 4a7446e commit 0ad3754
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions felix/dataplane/linux/bpf_ep_mgr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ func (m *mockDataplane) loadDefaultPolicies() error {
}

func (m *mockDataplane) ensureProgramAttached(ap attachPoint) (qDiscInfo, error) {
m.mutex.Lock()
defer m.mutex.Unlock()

var qdisc qDiscInfo
key := ap.IfaceName() + ":" + ap.HookName().String()
m.numAttaches[key] = m.numAttaches[key] + 1
Expand Down

0 comments on commit 0ad3754

Please # to comment.