[riot-commits] [RIOT-OS/RIOT] 0a7a86: tests/freertos: add test for compat layer

Gunar Schorcht noreply at github.com
Wed Jul 31 11:01:43 CEST 2019


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: 0a7a86db065520adeb6d941bc7fc67419ade5d64
      https://github.com/RIOT-OS/RIOT/commit/0a7a86db065520adeb6d941bc7fc67419ade5d64
  Author: JulianHolzwarth <legolas1509 at googlemail.com>
  Date:   2019-03-27 (Wed, 27 Mar 2019)

  Changed paths:
    A tests/freertos/Makefile
    A tests/freertos/main.c
    A tests/freertos/semaphore_test.c
    A tests/freertos/semaphore_test.h
    A tests/freertos/tests/01-run.py

  Log Message:
  -----------
  tests/freertos: add test for compat layer

Added test for freertos. Only for BOARD:esp32-wroom-32 at the moment.
At the moment it only tests xSemaphoreTake(), xSemaphoreTakeRecursive() and the creation of the semaphore.
It creates the semaphore and calls take for it multiple times and checks whether the return value is correct.
Take should return (quote freertos documention):
"pdPASS Returned only if the call to xSemaphoreTakeRecursive() was successful in obtaining the semaphore."
"pdFAIL Returned if the call to xSemaphoreTakeRecursive() did not successfully obtain the semaphore."
The same for xSemaphoreTake().
The future goal for this test is to test the complete freertos compatibility layer
and to have the test for a general freertos compatibility layer that does not only work for esp32.


  Commit: 1b42d3ff86405802a858626145a9f158fcecb65f
      https://github.com/RIOT-OS/RIOT/commit/1b42d3ff86405802a858626145a9f158fcecb65f
  Author: JulianHolzwarth <legolas1509 at googlemail.com>
  Date:   2019-03-27 (Wed, 27 Mar 2019)

  Changed paths:
    M cpu/esp32/freertos/semphr.c

  Log Message:
  -----------
  cpu/esp32/freertos/semphr.c::xSemaphoreTake() return value fix

xSemaphoreTake() returned before the fix: pdFALSE(equal to pdFAIL) when the call was successful in obtaining the semaphore
and pdTRUE(equal to pdPASS) when the call did not successfully obtain the semaphore.
According to freertos documentation:
"pdPASS Returned only if the call to xSemaphoreTake() was successful in obtaining the semaphore"
"pdFAIL Returned if the call to xSemaphoreTake() did not successfully obtain the semaphore."
Fixed it to return the correct value.


  Commit: e1d45514597638d178505e7c811a077a67ae2bc1
      https://github.com/RIOT-OS/RIOT/commit/e1d45514597638d178505e7c811a077a67ae2bc1
  Author: JulianHolzwarth <legolas1509 at googlemail.com>
  Date:   2019-03-27 (Wed, 27 Mar 2019)

  Changed paths:
    M cpu/esp32/freertos/semphr.c

  Log Message:
  -----------
  cpu/esp32/freertos/semphr.c::xSemaphoreTakeRecursive() return value fix

xSemaphoreTakeRecursive() returned before the fix: pdFALSE(equal to pdFAIL) when the call was successful in obtaining the semaphore
and pdTRUE(equal to pdPASS) when the call did not successfully obtain the semaphore.
According to freertos documentation:
"pdPASS Returned only if the call to xSemaphoreTakeRecursive() was successful in obtaining the semaphore"
"pdFAIL Returned if the call to xSemaphoreTakeRecursive() did not successfully obtain the semaphore."
Fixed it to return the correct value.


  Commit: be9063c1d5a1501ba16e1e666081441334edd73b
      https://github.com/RIOT-OS/RIOT/commit/be9063c1d5a1501ba16e1e666081441334edd73b
  Author: JulianHolzwarth <legolas1509 at googlemail.com>
  Date:   2019-04-17 (Wed, 17 Apr 2019)

  Changed paths:
    R tests/freertos/Makefile
    R tests/freertos/main.c
    R tests/freertos/semaphore_test.c
    R tests/freertos/semaphore_test.h
    R tests/freertos/tests/01-run.py

  Log Message:
  -----------
  Revert "tests/freertos: add test for compat layer"

This reverts commit 0a7a86db065520adeb6d941bc7fc67419ade5d64.


  Commit: dd6a5cde5c84b6deb75cf864e7d70eed6c601461
      https://github.com/RIOT-OS/RIOT/commit/dd6a5cde5c84b6deb75cf864e7d70eed6c601461
  Author: Gunar Schorcht <gunar at schorcht.net>
  Date:   2019-07-31 (Wed, 31 Jul 2019)

  Changed paths:
    M cpu/esp32/freertos/semphr.c

  Log Message:
  -----------
  Merge pull request #11239 from JulianHolzwarth/esp32/freertos/fix/semaphoreTake

cpu/esp32/freertos: fix semaphore take


Compare: https://github.com/RIOT-OS/RIOT/compare/699fbc998ab9...dd6a5cde5c84


More information about the commits mailing list