package testutils
import "github.com/cilium/ebpf/internal/testutils"
Index ¶
- func CheckFeatureTest(t *testing.T, fn func() error)
- func Files(t *testing.T, files []string, fn func(*testing.T, string))
- func Glob(tb testing.TB, pattern string, excludes ...string) []string
- func SkipIfNotSupported(tb testing.TB, err error)
- func SkipOnOldKernel(tb testing.TB, minVersion, feature string)
- func TempBPFFS(tb testing.TB) string
Functions ¶
func CheckFeatureTest ¶
func Files ¶
Files calls fn for each given file.
The function errors out if the pattern matches no files.
func Glob ¶
Glob finds files matching a pattern.
The pattern should may include full path. Excludes use the same syntax as pattern, but are only applied to the basename instead of the full path.
func SkipIfNotSupported ¶
func SkipOnOldKernel ¶
func TempBPFFS ¶
TempBPFFS creates a temporary directory on a BPF FS.
The directory is automatically cleaned up at the end of the test run.
Source Files ¶
bpffs.go feature.go glob.go rlimit.go
- Version
- v0.6.1
- Published
- Jun 10, 2021
- Platform
- linux/amd64
- Imports
- 8 packages
- Last checked
- 1 hour ago –
Tools for package owners.