(t *testing.T)
| 214 | } |
| 215 | |
| 216 | func expectedNiceScore(t *testing.T) int { |
| 217 | t.Helper() |
| 218 | |
| 219 | score, err := unix.Getpriority(unix.PRIO_PROCESS, os.Getpid()) |
| 220 | require.NoError(t, err) |
| 221 | |
| 222 | // Priority is niceness + 20. |
| 223 | score = 20 - score |
| 224 | score += 5 |
| 225 | if score > 19 { |
| 226 | return 19 |
| 227 | } |
| 228 | return score |
| 229 | } |
| 230 | |
| 231 | func execArgs(oom int, nice int) []string { |
| 232 | execArgs := []string{"agent-exec"} |