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

Function requireOOMScore

agent/agentexec/cli_linux_test.go:119–126  ·  view source on GitHub ↗
(t *testing.T, pid int, expected int)

Source from the content-addressed store, hash-verified

117}
118
119func requireOOMScore(t *testing.T, pid int, expected int) {
120 t.Helper()
121
122 actual, err := os.ReadFile(fmt.Sprintf("/proc/%d/oom_score_adj", pid))
123 require.NoError(t, err)
124 score := strings.TrimSpace(string(actual))
125 require.Equal(t, strconv.Itoa(expected), score)
126}
127
128func waitForSentinel(ctx context.Context, t *testing.T, cmd *exec.Cmd, path string) {
129 t.Helper()

Callers 1

TestCLIFunction · 0.85

Calls 3

HelperMethod · 0.65
ReadFileMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected