Semaphore Functions Test Cases.
More...
The test cases check the osSemaphore* functions.
void TC_SemaphoreCheckTimeout |
( |
void |
| ) |
|
- Set time thresholds
- Create wakeup thread to release a semaphore after 10 ticks
- Wait for a semaphore with a defined timeout
- Check if the semaphore is acquired between the minimum and maximum thresholds
- Wait for a semaphore with an infinite timeout
- Check if the semaphore is acquired between the minimum and maximum thresholds
void TC_SemaphoreCreateAndDelete |
( |
void |
| ) |
|
- Create a semaphore with count parameter equal to zero
- Delete created semaphore object
- Create a semaphore with count parameter equal to osFeature_Semaphore
- Delete created semaphore object
void TC_SemaphoreObtainBinary |
( |
void |
| ) |
|
- Create a binary semaphore object
- Obtain available token
- Verify that there is no available tokens left
- Release obtained token
- Verify that no more tokens can be released
- Delete a binary semaphore object
void TC_SemaphoreObtainCounting |
( |
void |
| ) |
|
- Create a counting semaphore object
- Obtain all available tokens
- Verify that all available tokens are obtained
- Release all tokens
- Delete a counting semaphore object
void TC_SemaphoreWaitForBinary |
( |
void |
| ) |
|
- Create a binary semaphore
- Create multiple instances of a test thread that obtains semaphore
- Wait until thread instances finish
- Check if semaphore was acquired
- Check if only one thread got semaphore object
- Release and delete a semaphore
- Only one thread instance must acquire semaphore object
void TC_SemaphoreWaitForCounting |
( |
void |
| ) |
|
- Create semaphore with index count parameter equal to 3
- Create multiple instances of a test thread that acquires semaphore
- Wait until thread instances finish
- Check if only available resources were acquired
- Release and delete a semaphore object
- Only one thread instance must acquire semaphore object
void TC_SemaphoreWaitTimeout |
( |
void |
| ) |
|
- Obtain a semaphore object
- Create a thread that waits for a semaphore
- Delay parent thread to allow child thread wait for semaphore
- Check if child thread was able to obtain a semaphore or not
void TC_SemaphoreZeroCount |
( |
void |
| ) |
|
- Create a semaphore with initial count zero
- Try to obtain a semaphore token
- Try to release a semaphore token
- Delete a semaphore object
void TC_SemInterrupts |
( |
void |
| ) |
|
- Call all semaphore management functions from the ISR
void TC_SemParam |
( |
void |
| ) |
|
- Test semaphore management functions with invalid parameters