Documentation
¶
Overview ¶
Package testutil contains helpers for tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CgroupVersion ¶
func CgroupVersion() int
CgroupVersion returns the version of cgroup mounted at /sys/fs/cgroup: 2 for cgroup v2 unified mode, 1 for cgroup v1 (including hybrid mode), or 0 if no cgroup filesystem is found there (as it is the case in some build environments, such as chroot-based ones).
Unlike [cgroups.IsCgroup2UnifiedMode], it does not assume cgroup v1 if cgroup v2 is not found.
func RequireCgroupV1 ¶
RequireCgroupV1 skips the test unless cgroup v1 is mounted at /sys/fs/cgroup.
func RequireCgroups ¶
RequireCgroups skips the test if there is no cgroup v1 or v2 mounted at /sys/fs/cgroup.
Types ¶
This section is empty.