Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions info.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,11 @@ func hostInfo() map[string]any {
info["cpus"] = runtime.NumCPU()
info["rootless"] = unshare.IsRootless()

unified, err := cgroups.IsCgroup2UnifiedMode()
_, err := cgroups.IsCgroup2UnifiedMode()
if err != nil {
logrus.Error(err, "err reading cgroups mode")
}
cgroupVersion := "v1"
ociruntime := util.Runtime()
if unified {
cgroupVersion = "v2"
}
info["CgroupVersion"] = cgroupVersion
info["OCIRuntime"] = ociruntime

mi, err := system.ReadMemInfo()
Expand Down
9 changes: 0 additions & 9 deletions tests/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -700,15 +700,6 @@ function skip_if_cgroupsv2() {
fi
}

#######################
# skip_if_cgroupsv1 # Some tests don't work with cgroupsv1
#######################
function skip_if_cgroupsv1() {
if ! is_cgroupsv2; then
skip "${1:-test does not work with cgroups v1}"
fi
}

##########################
# skip_if_in_container #
##########################
Expand Down
1 change: 0 additions & 1 deletion tests/run.bats
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,6 @@ _EOF

@test "rootless on cgroupv2 and systemd runs under user.slice" {
skip_if_no_runtime
skip_if_cgroupsv1
skip_if_in_container
skip_if_root_environment
if test "$DBUS_SESSION_BUS_ADDRESS" = ""; then
Expand Down
1 change: 0 additions & 1 deletion tests/tutorial.bats
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ load helpers
@test "tutorial-cgroups" {
# confidence check for the sake of packages that consume our library
skip_if_no_runtime
skip_if_cgroupsv1
skip_if_rootless_environment
skip_if_chroot

Expand Down