Skip to content
Commit c9ab343d authored by Chris Friedt's avatar Chris Friedt Committed by Johan Hedberg
Browse files

tests: posix: semaphores: use timespec_add() to add to abstime



Use `timespec_add()` to add to an absolute timespec. This is required
because the test was failing occasionally on some qemu platforms in CI
due to this assertion in `timespec_normalize()`, which could happen if
the number of fractional seconds was already close to `NSEC_PER_SEC`
before an offset was added.

```cpp
if (!overflow) {
	__ASSERT_NO_MSG(timespec_is_valid(ts));
}
```

Signed-off-by: default avatarChris Friedt <cfriedt@tenstorrent.com>
parent 82460c8a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment