kubernetes/vendor/github.com/cilium/ebpf/CONTRIBUTING.md
Kir Kolyshkin 4e7cf5413d vendor: bump runc to 1.0.0 pre
This is to check if runc 1.0.0 (to be released shortly) works with k8s.

The commands used were (roughly):

	hack/pin-dependency.sh github.com/opencontainers/runc v1.0.0
	hack/lint-dependencies.sh
	# Follow its recommendations.
	hack/pin-dependency.sh github.com/cilium/ebpf v0.6.1
	hack/pin-dependency.sh github.com/opencontainers/selinux v1.8.2
	hack/pin-dependency.sh github.com/sirupsen/logrus v1.8.1
	# Recheck.
	hack/lint-dependencies.sh
	GO111MODULE=on go mod edit -dropreplace github.com/willf/bitset
	hack/update-vendor.sh
	# Recheck.
	hack/lint-dependencies.sh
	hack/update-internal-modules.sh
	# Recheck.
	hack/lint-dependencies.sh

[v2: rebased, updated runc 3a0234e1fe2e82 -> 2f8e8e9d977500]
[v3: testing master + runc pr 3019]
[v4: updated to 93a01cd4d0b7a0f08a]
[v5: updated to f093cca13d3cf8a484]
[v6: rebased]
[v7: updated to runc v1.0.0]
[v8: rebased]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-06-30 16:16:32 -07:00

1.4 KiB

How to contribute

Development is on GitHub and contributions in the form of pull requests and issues reporting bugs or suggesting new features are welcome. Please take a look at the architecture to get a better understanding for the high-level goals.

New features must be accompanied by tests. Before starting work on any large feature, please join the #libbpf-go channel on Slack to discuss the design first.

When submitting pull requests, consider writing details about what problem you are solving and why the proposed approach solves that problem in commit messages and/or pull request description to help future library users and maintainers to reason about the proposed changes.

Running the tests

Many of the tests require privileges to set resource limits and load eBPF code. The easiest way to obtain these is to run the tests with sudo.

To test the current package with your local kernel you can simply run:

go test -exec sudo  ./...

To test the current package with a different kernel version you can use the run-tests.sh script. It requires virtme and qemu to be installed.

Examples:

# Run all tests on a 5.4 kernel
./run-tests.sh 5.4

# Run a subset of tests:
./run-tests.sh 5.4 go test ./link