Commit graph

21 commits

Author SHA1 Message Date
Renz Bagaporo 3d0967a58a test: declare requirements and include dirs private 2020-03-23 10:58:50 +08:00
Angus Gratton 852462f4e2 test: Fix possible race in pthread C++ test
Also use TEST_ASSERT_EQUAL to get better debugging

Debugging intermittent UT failures on S2 release config

In the old version, the 300ms delay in between the two kinds of test
was supposed to keep the tasks in lockstep so it didn't matter that
global_sp was protected by two muxes.

However it seems like sometimes they could get out of sync -
I think because of a race in the sleep_until test. If the
second counter ticks over at that exact moment sleeping starts,
then the task doesn't sleep and will immediately keep running
 for the next iteration, possibly racing the other tasks.
2019-12-19 15:55:51 +11:00
Renz Christian Bagaporo 9eccd7c082 components: use new component registration api 2019-06-21 19:53:29 +08:00
Anurag Kar f5e8e05282 pthread tests : test case added for detach functionality 2018-12-28 14:41:24 +05:30
Ivan Grokhotkov 6091021e83 unity: separate common and IDF specific functionality
New unity component can be used for testing other applications.
Upstream version of Unity is included as a submodule.
Utilities specific to ESP-IDF unit tests (partitions, leak checking
setup/teardown functions, etc) are kept only in unit-test-app.
Kconfig options are added to allow disabling certain Unity features.
2018-11-19 12:36:31 +08:00
Angus Gratton 38bd836d05 Merge branch 'feature/cmake-unit-test' into 'master'
cmake: add unit tests build support

See merge request idf/esp-idf!3003
2018-10-22 16:29:15 +08:00
Anton Maklakov 92caddb501 pthread: fix a type mismatch warning 2018-10-21 15:11:45 +08:00
Renz Bagaporo cc774111bf cmake: Add support for test build 2018-10-20 12:07:24 +08:00
Anurag Kar f27db1f241 pthread : Add support for attributes and few APIs
This introduces the following changes :
    * Implmentation added for pthread attribute related functions :
        * pthread_attr_init
        * pthread_attr_destroy
        * pthread_attr_setdetachstate
        * pthread_attr_getdetachstate
        * pthread_attr_getstacksize
        * pthread_attr_setstacksize
    * pthread_create now supports passing attributes/configs through pthread_attr_t structure
    * pthread_mutex_timedlock added
    * pthread_exit added
    * memory for joinable thread is freed before returning from pthread_join
2018-09-22 02:35:27 +05:30
Amey Inamdar edb2400742 pthread: Added support for pthread condition variables
This is required for std::condition_variable support

Signed-off-by: Amey Inamdar <amey.inamdar@gmail.com>
2017-11-23 11:26:51 +08:00
Alexey Gerenkov 7ce945a9de pthread: Fixes memory leaks and stack overflow in tests
Also this commit replaces FreeRTOS list used for pthread internals
with simple one from rom/queue.h
2017-11-17 16:57:33 +03:00
Angus Gratton 3f4c8f7174 pthreads local storage: add test for unique keys 2017-10-17 15:29:25 +08:00
Angus Gratton 69e92ee320 unit tests: If heap tracing is enabled in sdkconfig, leak trace each test 2017-10-17 15:29:25 +08:00
Angus Gratton 86c89ff169 pthread: Add support for pthread thread local storage
Refactors LWIP to use this for the LWIP thread local semaphore
2017-10-17 14:46:08 +08:00
Alexey Gerenkov 5795ccc806 freertos: Fixes deadlock in pthread_once for init_routines calling pthread_once 2017-10-01 19:52:48 +03:00
Alexey Gerenkov 54a529f596 freertos: Fixes hangup upon pthread_join on finished thread 2017-10-01 19:52:48 +03:00
Alexey Gerenkov 20942421c3 According to review comments 2017-09-06 10:30:23 +08:00
Alexey Gerenkov 8859dab10c Cleanup 2017-09-06 10:30:23 +08:00
Alexey Gerenkov bf8ff8c98b 1) Thread detach functionality added
2) Recursive mutexes support
3) C++ test updated
2017-09-06 10:30:23 +08:00
Alexey Gerenkov c631c6b358 1) Mux API was added
2) C++ test for threading and mux functions
2017-09-06 10:30:23 +08:00
Alexey Gerenkov 0b09c7006d pthread: Initial version of thread API 2017-09-06 10:30:23 +08:00