mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-06 14:14:33 +02:00
Merge branch 'ci/enable_freertos_ignore' into 'master'
freertos: re-enable "mutex released not by owner causes an assert" test in CI Closes IDF-6613 and IDF-6614 See merge request espressif/esp-idf!22910
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
#include "freertos/semphr.h"
|
#include "freertos/semphr.h"
|
||||||
#include "unity.h"
|
#include "unity.h"
|
||||||
#include "test_utils.h"
|
#include "test_utils.h"
|
||||||
|
#include "esp_system.h"
|
||||||
|
|
||||||
/* If assertions aren't set to fail this code still crashes, but not with an abort... */
|
/* If assertions aren't set to fail this code still crashes, but not with an abort... */
|
||||||
#if CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER && !CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE
|
#if CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER && !CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE
|
||||||
@@ -20,11 +21,12 @@ static void mutex_release_task(void* arg)
|
|||||||
TEST_FAIL_MESSAGE("should not be reached");
|
TEST_FAIL_MESSAGE("should not be reached");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
static void check_reset_reason_panic(void)
|
||||||
Reset tests are temporarily ignored until the test app supports running them separately.
|
{
|
||||||
IDF-6096
|
TEST_ASSERT_EQUAL(ESP_RST_PANIC, esp_reset_reason());
|
||||||
*/
|
}
|
||||||
TEST_CASE("mutex released not by owner causes an assert", "[freertos][ignore][reset=assert,SW_CPU_RESET]")
|
|
||||||
|
static void do_mutex_release_assert(void)
|
||||||
{
|
{
|
||||||
SemaphoreHandle_t mutex = xSemaphoreCreateMutex();
|
SemaphoreHandle_t mutex = xSemaphoreCreateMutex();
|
||||||
xSemaphoreTake(mutex, portMAX_DELAY);
|
xSemaphoreTake(mutex, portMAX_DELAY);
|
||||||
@@ -32,4 +34,8 @@ TEST_CASE("mutex released not by owner causes an assert", "[freertos][ignore][re
|
|||||||
vTaskDelay(1);
|
vTaskDelay(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_CASE_MULTIPLE_STAGES("mutex released not by owner causes an assert", "[freertos][reset=assert,SW_CPU_RESET]",
|
||||||
|
do_mutex_release_assert,
|
||||||
|
check_reset_reason_panic)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -196,12 +196,18 @@ TEST_CASE("Test Task_Notify", "[freertos]")
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Test causes asserts, so it cannot be run as a normal unity test case.
|
||||||
|
Test case is ran as a seperate test case in test_task_notify_too_high_index_fails
|
||||||
|
*/
|
||||||
TEST_CASE("Notify too high index fails", "[ignore]")
|
TEST_CASE("Notify too high index fails", "[ignore]")
|
||||||
{
|
{
|
||||||
uint32_t notification_value = 47;
|
uint32_t notification_value = 47;
|
||||||
xTaskNotifyIndexed(xTaskGetCurrentTaskHandle(), 2, notification_value, eNoAction);
|
xTaskNotifyIndexed(xTaskGetCurrentTaskHandle(), 2, notification_value, eNoAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Test causes asserts, so it cannot be run as a normal unity test case.
|
||||||
|
Test case is ran as a seperate test case in test_task_notify_wait_too_high_index_fails
|
||||||
|
*/
|
||||||
TEST_CASE("Notify Wait too high index fails", "[ignore]")
|
TEST_CASE("Notify Wait too high index fails", "[ignore]")
|
||||||
{
|
{
|
||||||
uint32_t notification_value;
|
uint32_t notification_value;
|
||||||
|
Reference in New Issue
Block a user