package cgrouptest

Import Path
	internal/cgrouptest (on go.dev)

Dependency Relation
	imports 9 packages, and imported by 0 packages

Involved Source Files Package cgrouptest provides best-effort helpers for running tests inside a cgroup.
Package-Level Type Names (only one)
/* sort by: | */
Path to cpu.max. (*CgroupV2) Path() string Set cpu.max. Pass -1 for quota to disable the limit.
Package-Level Functions (only one)
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.