...
1# How to contribute
2
3Development is on [GitHub](https://github.com/cilium/ebpf) and contributions in
4the form of pull requests and issues reporting bugs or suggesting new features
5are welcome. Please take a look at [the architecture](ARCHITECTURE.md) to get
6a better understanding for the high-level goals.
7
8New features must be accompanied by tests. Before starting work on any large
9feature, please [join](https://ebpf.io/slack) the
10[#ebpf-go](https://cilium.slack.com/messages/ebpf-go) channel on Slack to
11discuss the design first.
12
13When submitting pull requests, consider writing details about what problem you
14are solving and why the proposed approach solves that problem in commit messages
15and/or pull request description to help future library users and maintainers to
16reason about the proposed changes.
17
18## Running the tests
19
20Many of the tests require privileges to set resource limits and load eBPF code.
21The easiest way to obtain these is to run the tests with `sudo`.
22
23To test the current package with your local kernel you can simply run:
24```
25go test -exec sudo ./...
26```
27
28To test the current package with a different kernel version you can use the [run-tests.sh](run-tests.sh) script.
29It requires [virtme](https://github.com/amluto/virtme) and qemu to be installed.
30
31Examples:
32
33```bash
34# Run all tests on a 5.4 kernel
35./run-tests.sh 5.4
36
37# Run a subset of tests:
38./run-tests.sh 5.4 go test ./link
39```
40
View as plain text