Merge branch 'ci/pthread_qemu_tests' into 'master'

test(pthread): fixed memory leak in QEMU tests

Closes IDFCI-2223

See merge request espressif/esp-idf!32042
This commit is contained in:
Marius Vikhammer 2024-07-26 13:35:08 +08:00
commit 77bb7c888f
2 changed files with 8 additions and 0 deletions

View File

@ -5,6 +5,8 @@
*/
#include <pthread.h>
#include "unity.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
typedef struct {
pthread_cond_t *cond;
@ -117,4 +119,7 @@ TEST_CASE("pthread cond wait", "[pthread]")
TEST_ASSERT_EQUAL_INT(ESP_OK, pthread_cond_destroy(&cond));
TEST_ASSERT_EQUAL_INT(ESP_OK, pthread_mutex_destroy(&mutex));
// Wait a few ticks to allow freertos idle task to free up memory
vTaskDelay(10);
}

View File

@ -179,6 +179,9 @@ TEST_CASE("wrlock reader waits", "[pthread][rwlock]")
TEST_ASSERT_EQUAL_INT(pthread_rwlock_destroy(&rwlock), 0);
vQueueDelete(wait_queue);
// Wait a few ticks to allow freertos idle task to free up memory
vTaskDelay(10);
}
TEST_CASE("wrlock multiple readers wait", "[pthread][rwlock]")