(t *testing.T, pid int, expected int)
| 117 | } |
| 118 | |
| 119 | func 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 | |
| 128 | func waitForSentinel(ctx context.Context, t *testing.T, cmd *exec.Cmd, path string) { |
| 129 | t.Helper() |