MCPcopy Index your code
hub / github.com/coder/coder / requireNiceScore

Function requireNiceScore

agent/agentexec/cli_linux_test.go:110–117  ·  view source on GitHub ↗
(t *testing.T, pid int, score int)

Source from the content-addressed store, hash-verified

108}
109
110func requireNiceScore(t *testing.T, pid int, score int) {
111 t.Helper()
112
113 nice, err := unix.Getpriority(unix.PRIO_PROCESS, pid)
114 require.NoError(t, err)
115 // See https://linux.die.net/man/2/setpriority#Notes
116 require.Equal(t, score, 20-nice)
117}
118
119func requireOOMScore(t *testing.T, pid int, expected int) {
120 t.Helper()

Callers 1

TestCLIFunction · 0.85

Calls 2

HelperMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected