mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
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:
commit
77bb7c888f
@ -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);
|
||||
}
|
||||
|
@ -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]")
|
||||
|
Loading…
Reference in New Issue
Block a user