mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/freertos_fix_test_preemption' into 'master'
freertos: fix test_preemtion test See merge request espressif/esp-idf!18318
This commit is contained in:
commit
8d3eca6a0d
@ -23,6 +23,14 @@
|
||||
static volatile bool trigger;
|
||||
static volatile bool flag;
|
||||
|
||||
#ifndef CONFIG_FREERTOS_SMP
|
||||
#define MAX_YIELD_COUNT 10000
|
||||
#else
|
||||
//TODO: IDF-5081
|
||||
#define MAX_YIELD_COUNT 15000
|
||||
#endif // CONFIG_FREERTOS_SMP
|
||||
|
||||
|
||||
/* Task:
|
||||
- Waits for 'trigger' variable to be set
|
||||
- Reads the cycle count on this CPU
|
||||
@ -70,7 +78,7 @@ TEST_CASE("Yield from lower priority task, same CPU", "[freertos]")
|
||||
|
||||
delta = now_ccount - yield_ccount;
|
||||
printf("Yielding from lower priority task took %u cycles\n", delta);
|
||||
TEST_ASSERT(delta < 10000);
|
||||
TEST_ASSERT(delta < MAX_YIELD_COUNT);
|
||||
|
||||
vTaskDelete(sender_task);
|
||||
vQueueDelete(queue);
|
||||
@ -107,7 +115,7 @@ TEST_CASE("Yield from lower priority task, other CPU", "[freertos]")
|
||||
|
||||
delta = now_ccount - trigger_ccount;
|
||||
printf("Yielding from task on other core took %u cycles\n", delta);
|
||||
TEST_ASSERT(delta < 10000);
|
||||
TEST_ASSERT(delta < MAX_YIELD_COUNT);
|
||||
|
||||
vQueueDelete(queue);
|
||||
vTaskDelete(sender_task);
|
||||
|
Loading…
x
Reference in New Issue
Block a user