fix(freertos): Use bare ticks for cleanup delays in freertos tests

This commit is contained in:
Sudeep Mohanty
2026-03-23 14:53:53 +01:00
parent 5c905afc15
commit 538e782b5b
3 changed files with 4 additions and 4 deletions
@@ -31,8 +31,8 @@ void setUp(void)
void tearDown(void)
{
// Add a short delay of 10ms to allow the idle task to free an remaining memory
vTaskDelay(pdMS_TO_TICKS(10));
// Add a short delay of 10 ticks to allow the idle task to free remaining memory.
vTaskDelay(10);
size_t after_free_8bit = heap_caps_get_free_size(MALLOC_CAP_8BIT);
size_t after_free_32bit = heap_caps_get_free_size(MALLOC_CAP_32BIT);
check_leak(before_free_8bit, after_free_8bit, "8BIT");
@@ -357,7 +357,7 @@ TEST_CASE("IDF additions: IDF tick hooks during scheduler suspension", "[freerto
/* Cleanup */
vTaskSuspend(suspend_task_handle[x]);
vTaskDelay(pdMS_TO_TICKS(10));
vTaskDelay(10);
vTaskDelete(suspend_task_handle[x]);
}
}
@@ -67,7 +67,7 @@ TEST_CASE("Test TLSP deletion callbacks", "[freertos]")
TEST_ASSERT_EQUAL(pdPASS, xTaskCreatePinnedToCore(tlsp_task, "tlsp_tsk", configMINIMAL_STACK_SIZE * 2, (void *)&tlsps[i], UNITY_FREERTOS_PRIORITY - 1, &tasks[i], i));
}
// Significant delay to let tasks run and delete themselves
vTaskDelay(pdMS_TO_TICKS(100));
vTaskDelay(100);
// Check the values of the TLSPs to see if the del cb have ran
for (int i = 0; i < CONFIG_FREERTOS_NUMBER_OF_CORES; i++) {