Hi Andrea,
On Tue, 16 Jun 2026 10:57:22 +0200, Andrea Cervesato wrote:
> clock_settime/4-1: CLOCK_MONOTONIC for timer validation
> During test execution, any service which is operating on clock might
> interfere with the final result. For this reason, we use CLOCK_MONOTONIC
> (when available) in order to the compute the right delta between
Typo: "in order to the compute" should be "in order to compute".
> + if (use_mono)
> + clock_gettime(CLOCK_MONOTONIC, &mono_before);
> + if (use_mono)
> + clock_gettime(CLOCK_MONOTONIC, &mono_after);
Both clock_gettime(CLOCK_MONOTONIC) calls are missing return-value
checks. Every other POSIX call in this test checks for errors and
returns PTS_UNRESOLVED on failure.
If clock_gettime() were to fail, mono_before / mono_after would
remain uninitialized and the delta computation would use garbage
values silently.
Verdict - Needs revision
Pre-existing: timer_create() allocates tid but timer_delete(tid)
is never called on any exit path.
---
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.