(tb testing.TB)
| 30 | ) |
| 31 | |
| 32 | func checkCgroupMode(tb testing.TB) { |
| 33 | var st unix.Statfs_t |
| 34 | err := unix.Statfs(defaultCgroup2Path, &st) |
| 35 | require.NoError(tb, err, "cannot statfs cgroup root") |
| 36 | |
| 37 | isUnified := st.Type == unix.CGROUP2_SUPER_MAGIC |
| 38 | if !isUnified { |
| 39 | tb.Skip("System running in hybrid or cgroupv1 mode") |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | func requireSystemdVersion(tb testing.TB, requiredMinVersion int) { |
| 44 | conn, err := systemdDbus.NewWithContext(context.TODO()) |
no outgoing calls
no test coverage detected
searching dependent graphs…