Commit 1c5ff68
ci(lammps): retry tests after transient SIGTERM (#5804)
## Summary
- retry the LAMMPS pytest process up to three attempts only when it
exits with status 143 (`SIGTERM`)
- preserve all ordinary test failures and return their original exit
codes immediately
- handle the retry outside pytest because a process-level `SIGTERM`
prevents pytest plugins from recovering
## Background
The [failing
job](https://github.com/deepmodeling/deepmd-kit/actions/runs/29312634856/job/87019564217)
reaches the first active `PyLammps()` test and then exits without a
Python, LAMMPS, MPI, or pytest error:
```text
source/lmp/tests/test_lammps_pd.py
Process completed with exit code 143.
```
Exit 143 is `128 + SIGTERM`. The same failure signature has occurred
intermittently on unrelated commits and with different DeePMD backends.
Local fresh-process LAMMPS/MPI stress tests and repeated Paddle test
collection did not reproduce a deterministic DeePMD failure, so this
change treats it as a process-level transient while keeping actionable
failures visible.
## Validation
- `ruff check .`
- `ruff format . --check`
- `bash -n source/install/retry_on_sigterm.sh`
- verified an actual `SIGTERM` retries and succeeds on the next attempt
- verified a non-SIGTERM exit status is returned without retrying
- Paddle-only LAMMPS tests: `9 passed, 228 skipped`
Coding agent: Codex
Codex version: codex-cli 0.144.1
Model: gpt-5.6-sol
Reasoning effort: xhigh
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved automated test reliability by retrying interrupted test runs
caused by termination signals.
* Added validation and controlled retry limits to prevent unexpected
repeated executions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: njzjz-bot <njzjz.bot@gmail.com>1 parent 2aee81c commit 1c5ff68
2 files changed
Lines changed: 41 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
0 commit comments