forked from espressif/esp-idf
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:
@ -5,6 +5,8 @@
|
|||||||
*/
|
*/
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include "unity.h"
|
#include "unity.h"
|
||||||
|
#include "freertos/FreeRTOS.h"
|
||||||
|
#include "freertos/task.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
pthread_cond_t *cond;
|
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_cond_destroy(&cond));
|
||||||
TEST_ASSERT_EQUAL_INT(ESP_OK, pthread_mutex_destroy(&mutex));
|
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);
|
TEST_ASSERT_EQUAL_INT(pthread_rwlock_destroy(&rwlock), 0);
|
||||||
vQueueDelete(wait_queue);
|
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]")
|
TEST_CASE("wrlock multiple readers wait", "[pthread][rwlock]")
|
||||||
|
Reference in New Issue
Block a user