1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #11467 from kaspar030/increase_posix_semaphore_timeout

tests/posix_semaphore: unify and increase allowed test4 margin
This commit is contained in:
Martine Lenders 2019-05-06 15:47:45 +02:00 committed by GitHub
commit 98f97afc97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -236,16 +236,16 @@ void test3(void)
sem_post(&s1);
}
#ifdef BOARD_NATIVE
/* native can sometime take more time to respond as it is not real time */
#define TEST4_TIMEOUT_EXCEEDED_MARGIN (300)
#elif CPU_FAM_NRF51
/* nrf51 based boards needs a slightly higher margin value. Using 105us makes
test4 result more reliable. */
#define TEST4_TIMEOUT_EXCEEDED_MARGIN (105)
#else
#define TEST4_TIMEOUT_EXCEEDED_MARGIN (100)
#endif /* BOARD_NATIVE */
/*
* Allowed margin for waiting too long.
*
* Waiting too short is forbidden by POSIX, but is checked elsewhere.
*
* This allows waiting a little (0.1%) longer than exactly 1000000us.
* The value should be large enough to not trip over timer inaccuracies, but
* small enough to catch any fundamental problems.
*/
#define TEST4_TIMEOUT_EXCEEDED_MARGIN (1000)
void test4(void)
{