From 2230b2c8bce812a51a14144176119b6bb4bb4bc7 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Tue, 28 Feb 2017 15:31:40 +1100 Subject: [PATCH] freertos tests: Enable test_freertos_task_delete --- components/freertos/test/test_freertos_task_delete.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/freertos/test/test_freertos_task_delete.c b/components/freertos/test/test_freertos_task_delete.c index d8cc2755e..68a6683fc 100644 --- a/components/freertos/test/test_freertos_task_delete.c +++ b/components/freertos/test/test_freertos_task_delete.c @@ -10,13 +10,17 @@ static void task_delete_self(void *param) { printf("Task %p running on core %d. Deleting shortly...\n", xTaskGetCurrentTaskHandle(), xPortGetCoreID()); + vTaskDelay(5); vTaskDelete(NULL); } -TEST_CASE("FreeRTOS Delete Tasks", "[freertos][ignore]") +TEST_CASE("FreeRTOS Delete Tasks", "[freertos]") { + uint32_t before_count = uxTaskGetNumberOfTasks(); + xTaskCreatePinnedToCore(task_delete_self, "tsk_self_a", 4096, NULL, configMAX_PRIORITIES - 1, NULL, 0); xTaskCreatePinnedToCore(task_delete_self, "tsk_self_a", 4096, NULL, configMAX_PRIORITIES - 1, NULL, 0); + TEST_ASSERT_EQUAL(before_count + 2, uxTaskGetNumberOfTasks()); vTaskDelay(200 / portTICK_PERIOD_MS); - printf("Done?\n"); + TEST_ASSERT_EQUAL(before_count, uxTaskGetNumberOfTasks()); }