Documentation
¶
Overview ¶
Package cgrouptest provides best-effort helpers for running tests inside a cgroup.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InCgroupV2 ¶
InCgroupV2 creates a new v2 cgroup, migrates the current process into it, and then calls fn. When fn returns, the current process is migrated back to the original cgroup and the new cgroup is destroyed.
If a new cgroup cannot be created, the test is skipped.
This must not be used in parallel tests, as it affects the entire process.
Types ¶
Click to show internal directories.
Click to hide internal directories.