mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
fix(freertos): Use bare ticks for cleanup delays in freertos tests
This commit is contained in:
@@ -43,8 +43,8 @@ void tearDown(void)
|
||||
esp_task_wdt_delete(NULL);
|
||||
#endif
|
||||
|
||||
// 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++) {
|
||||
|
||||
@@ -216,7 +216,7 @@ TEST_CASE("LoadStore: 8/16-bit field access in IRAM from ISRs when pending inter
|
||||
esp_rom_printf("test passed\n");
|
||||
|
||||
heap_caps_free((void *)s_iram);
|
||||
vTaskDelay(pdMS_TO_TICKS(100)); // Wait for memory to be freed, to avoid affecting other tests.
|
||||
vTaskDelay(100); // Wait in ticks for memory to be freed, to avoid affecting other tests.
|
||||
}
|
||||
|
||||
TEST_CASE("LoadStore: zero-overhead loop continues after IRAM 8-bit store", "[freertos]")
|
||||
@@ -273,6 +273,6 @@ TEST_CASE("LoadStore: zero-overhead loop continues after IRAM 8-bit store", "[fr
|
||||
heap_caps_free(dst);
|
||||
heap_caps_free(src);
|
||||
|
||||
vTaskDelay(pdMS_TO_TICKS(100)); // Wait for free to complete before running other tests.
|
||||
vTaskDelay(100); // Wait for free to complete before running other tests.
|
||||
}
|
||||
#endif // CONFIG_IDF_TARGET_ARCH_XTENSA && CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY
|
||||
|
||||
Reference in New Issue
Block a user