testutil

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func RequireCgroupV1(t testing.TB)

RequireCgroupV1 skips the test unless cgroup v1 is mounted at /sys/fs/cgroup.

func RequireCgroups

func RequireCgroups(t testing.TB)

RequireCgroups skips the test if there is no cgroup v1 or v2 mounted at /sys/fs/cgroup.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL