libbpf / ci

BPF CI
Other
10 stars 24 forks source link

ci: run script to test bpftool types/options sync #2

Closed qmonnet closed 3 years ago

qmonnet commented 3 years ago

This is a port from https://github.com/libbpf/libbpf/pull/352.

When new eBPF program, map, or attach types are added to the kernel, bpftool needs to be updated in order to support the related features. These updates should add the new types to the code itself, but also to the help messages, documentation, and bash completion. Given that it is easy to omit one of those, a script has been created to attempt to validate that all parts have been consistently updated.

This new script for bpftool is hosted in the kernel repository, amongst the BPF selftests. But it is not called from the Makefile, and not run along with the other selftests. If it was, all patches updating the BPF UAPI would require the relevant changes in bpftool at the same time, in the same patches, which is not desirable.

To ensure that bpftool's parts remain in sync, let's run this script from the CI. This patch adds a new section to the run.sh script, focused on bpftool, and calling the new test_bpftool_synctypes.py.