package testutils

import "github.com/cilium/ebpf/internal/testutils"

Index

Functions

func CheckFeatureTest

func CheckFeatureTest(t *testing.T, fn func() error)

func SkipIfNotSupported

func SkipIfNotSupported(tb testing.TB, err error)

func SkipOnOldKernel

func SkipOnOldKernel(tb testing.TB, minVersion, feature string)

func TempBPFFS

func TempBPFFS(tb testing.TB) string

TempBPFFS creates a temporary directory on a BPF FS.

The directory is automatically cleaned up at the end of the test run.

func TestFiles

func TestFiles(t *testing.T, pattern string, fn func(*testing.T, string))

TestFiles calls fn for each file matching pattern.

The function errors out if the pattern matches no files.

Source Files

bpffs.go feature.go glob.go

Version
v0.5.0
Published
Apr 8, 2021
Platform
darwin/amd64
Imports
6 packages
Last checked
2 hours ago

Tools for package owners.