microsoft / microsoft/ebpf-for-windows

Refactor ring buffer and perf event array tests to avoid deprecated APIs

Open
#5,445 0 comments 0 reactions 1 assignee Claimed by @mikeagun View on GitHub
cleanup tests triaged
Dominant language
C
Stars
3.6k
Forks
311
Avg merge
6d 10h
Merged PRs (30d)
21

Description

Now that the async (and map write) ring buffer and perf event array map APIs are deprecated, we should update the tests to avoid using them except for tests that specifically validate the deprecated APIs.

Follow-up work from PR #5354

> General comment: it seems the deprecated APIs are being used in test code in a lot of places. Should we cleanup test code in the following way:
>
> 1. Use the deprecated APIs in those tests that are specifically testing the deprecated API (for functional / regression testing of these APIs).
> 2. For all other instances, maybe we should update the test code to move to new APIs?
>
> Rest of the changes look good.

Avoiding the deprecated APIs (especially map_write) is a much larger change that will functionally change the tests. I will create a follow-up issue to update tests to avoid the deprecated APIs except where they are being specifically tested.

_Originally posted by @mikeagun in https://github.com/microsoft/ebpf-for-windows/issues/5354#issuecomment-4985008300_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.