Giter Site home page Giter Site logo

Comments (3)

skliper avatar skliper commented on July 27, 2024

I'll add functional test cases (including #1411).

Note the current bin sem tests and count sem tests are very old and miss a few things (flush of a binary sem timed wait, any counting sem flush tests, all polling tests). Considering rewrite.

New logic under consideration:

  1. Initialize sem w 0 and nonzero, confirm info
  2. poll on 0 should return OS_SEM_TIMEOUT
  3. Validate info
  4. poll on nonzero should return OS_SUCCESS
  5. Validate info
  6. timed wait should return OS_SEM_TIMEOUT
  7. Validate info
  8. Start child task w/ wait, confirm waiting, delete task, check info to confirm sem is still valid (this replicates the old test)
  9. Start child task w/ takes
  10. Confirm waiting
  11. Give and confirm receipt loop until complete
  12. Give prior to next task start, confirm info
  13. Start child task w/ timed wait
  14. Confirm one processed and waits
  15. Give and confirm receipt loop until complete
  16. Start 3 child tasks (2 takes and 1 timed wait)
  17. Confirm waiting
  18. Give a couple times (not enough to exit) and confirm correct state
  19. Flush and confirm all advance 1 cycle
  20. Give to completion and confirm
  21. Valid deletes
  22. Confirm invalid deletes

from osal.

skliper avatar skliper commented on July 27, 2024

Note RTEMS OS_BinSemGetInfo_Impl and OS_CountSemGetInfo_Impl should return OS_ERR_NOT_IMPLEMENTED or could lead to unexpected results:

int32 OS_BinSemGetInfo_Impl(const OS_object_token_t *token, OS_bin_sem_prop_t *bin_prop)
{
/* RTEMS has no API for obtaining the current value of a semaphore */
return OS_SUCCESS;
}

int32 OS_CountSemGetInfo_Impl(const OS_object_token_t *token, OS_count_sem_prop_t *count_prop)
{
/* RTEMS does not provide an API to get the value */
return OS_SUCCESS;
}

from osal.

skliper avatar skliper commented on July 27, 2024

Note - updated title and text since there is no flush API for a counting semaphore.

from osal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.