(t *testing.T)
| 387 | } |
| 388 | |
| 389 | func TestSystemdCgroupPSIController(t *testing.T) { |
| 390 | checkCgroupMode(t) |
| 391 | group := fmt.Sprintf("testing-psi-%d.scope", os.Getpid()) |
| 392 | pid := os.Getpid() |
| 393 | res := Resources{} |
| 394 | c, err := NewSystemd("", group, pid, &res) |
| 395 | require.NoError(t, err, "failed to init new cgroup systemd manager") |
| 396 | |
| 397 | stats, err := c.Stat() |
| 398 | require.NoError(t, err, "failed to get cgroup stats") |
| 399 | if stats.CPU.PSI == nil || stats.Memory.PSI == nil || stats.Io.PSI == nil { |
| 400 | t.Error("expected psi not nil but got nil") |
| 401 | } |
| 402 | } |
| 403 | |
| 404 | func TestCPUQuotaPeriodUSec(t *testing.T) { |
| 405 | checkCgroupMode(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…