Test for clock_nanosleep with CLOCK_MONOTONIC (# 3890)

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Apr 9 12:39:34 UTC 2020


Hello Utkarsh Rai,

On 09/04/2020 14:28, Utkarsh Rai wrote:
> I am willing to add tests for clock_nanosleep with CLOCK_MONOTONIC. 
> What is the standard way of adding test for an already present API but 
> with different configuration? For eg. should I add 
> 'psxtmclocknanosleep04/ 05/ 06' in the testsuite?

the psxtm* tests are timing/performance tests. Functionality should be 
tested in testsuites/psxtests. I would add new test cases to an existing 
test program, e.g. in separate functions which are called by the main 
thread.

An alternative would be to add the tests using the new RTEMS Test framework:

https://docs.rtems.org/branches/master/eng/test-framework.html#the-rtems-test-framework

The new test framework has also some support for performance tests which 
give more useful results on modern hardware:

https://docs.rtems.org/branches/master/eng/test-framework.html#code-runtime-measurements



More information about the devel mailing list