From 90897a9df4eb37233700e6a9c42e8d4764e26f6a Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Sun, 28 Sep 2025 10:14:46 +0800 Subject: [PATCH] test(pthread): fixed test-case overflow calc issue --- .../test_apps/pthread_unity_tests/main/test_pthread_semaphore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/pthread/test_apps/pthread_unity_tests/main/test_pthread_semaphore.c b/components/pthread/test_apps/pthread_unity_tests/main/test_pthread_semaphore.c index a4bb84b09e..119520398b 100644 --- a/components/pthread/test_apps/pthread_unity_tests/main/test_pthread_semaphore.c +++ b/components/pthread/test_apps/pthread_unity_tests/main/test_pthread_semaphore.c @@ -311,7 +311,7 @@ TEST_CASE("sem_timedwait wait on locked semaphore (timeout)", "[semaphore]") abstime.tv_nsec = abstime.tv_nsec + 20000000; if (abstime.tv_nsec >= 1000000000) { abstime.tv_sec = abstime.tv_sec + 1; - abstime.tv_sec = abstime.tv_nsec % 1000000000; + abstime.tv_nsec = abstime.tv_nsec % 1000000000; } TEST_ASSERT_EQUAL_INT(-1, sem_timedwait(&semaphore, &abstime));