Fix crash issue where application initialize trace prefix function and after that trace was called with parameters. Now there is unit test on place which covers this use-case also :)
- Semaphore returns 0 on timeout, and negative was incorrect used for
errors
- Correctly checked error code on tcp_connect
thanks to @LiyouZhou
fixes#284, fixes#285, fixes#166
clashes.
It should be noted that the exceptions to this are unity_handler.cpp and
unity_handler.h as these deal with Unity/Utest interaction and should be
unique enough in the namespace.
```
mbedgt: test on hardware with target id: 0240000029304e450038500878a3003cf131000097969900
mbedgt: test suite 'TESTS-mbedmicro-net-udp_echo_client' ............................................. OK in 18.33 sec
test case: 'tests-mbedmicro-net-udp_echo_client' ............................................. OK in 18.33 sec
mbedgt: test case summary: 1 pass, 0 failures
mbedgt: all tests finished!
mbedgt: shuffle seed: 0.6134776338
mbedgt: test suite report:
+--------------+---------------+-------------------------------------+--------+--------------------+-------------+
| target | platform_name | test suite | result | elapsed_time (sec) | copy_method |
+--------------+---------------+-------------------------------------+--------+--------------------+-------------+
| K64F-GCC_ARM | K64F | tests-mbedmicro-net-udp_echo_client | OK | 18.33 | shell |
+--------------+---------------+-------------------------------------+--------+--------------------+-------------+
mbedgt: test suite results: 1 OK
mbedgt: test case report:
+--------------+---------------+-------------------------------------+-------------------------------------+--------+--------+--------+--------------------+
| target | platform_name | test suite | test case | passed | failed | result | elapsed_time (sec) |
+--------------+---------------+-------------------------------------+-------------------------------------+--------+--------+--------+--------------------+
| K64F-GCC_ARM | K64F | tests-mbedmicro-net-udp_echo_client | tests-mbedmicro-net-udp_echo_client | 1 | 0 | OK | 18.33 |
+--------------+---------------+-------------------------------------+-------------------------------------+--------+--------+--------+--------------------+
mbedgt: test case results: 1 OK
mbedgt: completed in 18.48 sec
```