<div dir="ltr"><div><div><div><div><div><div>Hello everyone,<br></div><br></div><div>I sent this patch to add test for POSIX timer_create for <br></div>clock_id argument as CLOCK_MONOTONIC.<br></div>Other details are in the commit message.<br></div>If you all could review it.<br><br></div>thanks <br></div>-Eshan <br><div><div><div><div><br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 20, 2020 at 12:00 AM Eshan dhawan <<a href="mailto:eshandhawan51@gmail.com">eshandhawan51@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">>I will create a timer using timer_create() function,<br>
and passing CLOCK_MONOTONIC in clock_id argument.<br>
<br>
>The test will fail as there is no support for<br>
CLOCK_MONOTONIC in cpukit/posix/src/psxtimercreate.c.<br>
<br>
>The added code compiles successfully without any errors.<br>
<br>
Signed-off-by: Eshan dhawan <<a href="mailto:eshandhawan51@gmail.com" target="_blank">eshandhawan51@gmail.com</a>><br>
---<br>
 testsuites/psxtests/psxtimer02/psxtimer.c     | 8 ++++++--<br>
 testsuites/psxtests/psxtimer02/psxtimer02.scn | 3 ++-<br>
 2 files changed, 8 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/testsuites/psxtests/psxtimer02/psxtimer.c b/testsuites/psxtests/psxtimer02/psxtimer.c<br>
index 9f79d33c42..e071f98857 100644<br>
--- a/testsuites/psxtests/psxtimer02/psxtimer.c<br>
+++ b/testsuites/psxtests/psxtimer02/psxtimer.c<br>
@@ -62,9 +62,9 @@ void *POSIX_Init (<br>
   status = timer_create( CLOCK_REALTIME, &event, NULL );<br>
   fatal_posix_service_status_errno( status, EINVAL, "bad timer id" );<br>
<br>
-  puts( "timer_create - OK" );<br>
+  puts( "timer_create (CLOCK_REALTIME) - OK" );<br>
   status = timer_create( CLOCK_REALTIME, NULL, &timer );<br>
-  posix_service_failed( status, "timer_create OK" );<br>
+  posix_service_failed( status, "timer_create (CLOCK_REALTIME)" );<br>
<br>
   puts( "timer_create - too many - EAGAIN" );<br>
   status = timer_create( CLOCK_REALTIME, NULL, &timer1 );<br>
@@ -127,6 +127,10 @@ void *POSIX_Init (<br>
   status = timer_delete( timer );<br>
   fatal_posix_service_status_errno( status, EINVAL, "bad id" );<br>
<br>
+  puts( "timer_create (CLOCK_MONOTONIC) - OK" );<br>
+  status = timer_create( CLOCK_MONOTONIC, NULL, &timer );<br>
+  posix_service_failed( status, "timer_create (CLOCK_MONOTONIC)" );<br>
+<br>
   TEST_END();<br>
   rtems_test_exit (0);<br>
 }<br>
diff --git a/testsuites/psxtests/psxtimer02/psxtimer02.scn b/testsuites/psxtests/psxtimer02/psxtimer02.scn<br>
index e78425a32e..7429bcf291 100644<br>
--- a/testsuites/psxtests/psxtimer02/psxtimer02.scn<br>
+++ b/testsuites/psxtests/psxtimer02/psxtimer02.scn<br>
@@ -1,7 +1,7 @@<br>
 *** POSIX Timers Test 02 ***<br>
 timer_create - bad clock id - EINVAL<br>
 timer_create - bad timer id pointer - EINVAL<br>
-timer_create - OK<br>
+timer_create (CLOCK_REALTIME) - OK<br>
 timer_create - too many - EAGAIN<br>
 timer_delete - bad id - EINVAL<br>
 timer_getoverrun - bad id - EINVAL<br>
@@ -13,4 +13,5 @@ timer_settime - bad itimer value - negative nanosecond - EINVAL<br>
 timer_settime - bad clock value - EINVAL<br>
 timer_delete - OK<br>
 timer_delete - bad id - EINVAL<br>
+timer_create (CLOCK_MONOTONIC) - OK<br>
 *** END OF POSIX Timers Test 02 ***<br>
-- <br>
2.17.1<br>
<br>
</blockquote></div>