[LTP] thp04: group runtime state and skip when /proc/self/mem writes are blocked
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Tue Sep 8 20:26:29 CEST 2026
Hi Jan,
On Tue Sep 8 18:54:28 2026 +0200, Jan Polensky <japo@linux.ibm.com> wrote:
> thp04: group runtime state and skip when /proc/self/mem writes are blocked
--- [PATCH 3/3] ---
> + for (i = 0; i < TEST_ITERATIONS; i++) {
> + if (*shared->test_ptr != shared->expected_val) {
> + tst_res(TFAIL,
> + "Iteration %d: expected 0x%x, got 0x%x",
> + i, shared->expected_val, *shared->test_ptr);
> + exit(1);
> + }
> +
> + if (i < TEST_ITERATIONS - 1)
> + raise(SIGSTOP);
> + }
The condition i < TEST_ITERATIONS - 1 prevents the tracee from stopping on
the last iteration, causing it to exit immediately. The parent's waitpid
sees WIFEXITED and aborts with tst_brk(TBROK). Call raise(SIGSTOP)
unconditionally on all iterations.
> +static void run(void)
> +{
> + char path[64];
Do not use a custom buffer size for filesystem paths. Use PATH_MAX from
<limits.h>.
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
More information about the ltp
mailing list