Commit d31622e
authored
Fix nil pointer panic in TestTryReparentFromKernelPPid (#49248)
### What does this PR do?
Use a PID above `pid_max` (4,194,304) as the unresolvable ppid in the `different-ppid-parent-not-in-cache` subtest of `TestTryReparentFromKernelPPid`, matching the convention already used elsewhere in the file.
### Motivation
The test was using ppid `99997` to exercise the "parent not in cache and unresolvable" path. On a busy CI runner where that PID happens to exist, `resolveFromProcfs` would succeed and actually reparent the process, causing the test to fail nondeterministically. Using a PID above `pid_max` guarantees it can never exist in procfs regardless of host state.
Failing job: https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1588964315
### Describe how you validated your changes
CI
### Additional Notes
Co-authored-by: pierre.gimalac <pierre.gimalac@datadoghq.com>1 parent 1e4fad6 commit d31622e
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1214 | 1214 | | |
1215 | 1215 | | |
1216 | 1216 | | |
1217 | | - | |
1218 | | - | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
1219 | 1220 | | |
1220 | 1221 | | |
1221 | 1222 | | |
| |||
0 commit comments