github.com/cilium/ebpf@v0.10.0/CONTRIBUTING.md (about)

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