Hi Yeguojin,
On Fri, 5 Jun 2026 11:19:19 +0800, Yeguojin wrote:
> execve05: add exit call when execve failed
> + exit(EXIT_FAILURE);
After tst_res(TFAIL | TTERRNO, ...) the result is already recorded by
the framework. The child's exit code is used only to detect crashes or
unexpected termination.
Once verify_execve() returns, the framework calls tst_reap_children(),
which invokes check_child_status(). That function does:
if (WEXITSTATUS(status))
tst_brk(TBROK, "Invalid child (%i) exit value %i", ...);
So exit(EXIT_FAILURE) will produce a spurious TBROK on top of the
already-reported TFAIL. The convention in LTP is to call exit(0) after
reporting a result through tst_res() in a child process.
Verdict: Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
--
Mailing list info: https://lists.linux.it/listinfo/ltp
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.