diff --git a/src/os/inc/osapi-timer.h b/src/os/inc/osapi-timer.h
index 464e0f03c..32b7638d6 100644
--- a/src/os/inc/osapi-timer.h
+++ b/src/os/inc/osapi-timer.h
@@ -61,22 +61,21 @@ typedef struct
* which is created and deleted with the timer object itself. The internal time base
* is configured for an OS simulated timer tick at the same interval as the timer.
*
+ * The callback function should be declared as follows:
+ *
+ * void timer_callback(osal_id_t timer_id);
+ *
+ * The timer_id is passed in to the function by the OSAL
+ *
* @note clock_accuracy comes from the underlying OS tick value. The nearest integer
* microsecond value is returned, so may not be exact.
*
- * @warning Depending on the OS, the callback_ptr function may be similar to an
- * interrupt service routine. Calls that cause the code to block or require
- * an application context (like sending events) are generally not supported.
- *
- * @param[out] timer_id The non-zero resource ID of the timer object
- * @param[in] timer_name Name of the timer object
+ * @param[out] timer_id Will be set to the non-zero resource ID of the timer object @nonnull
+ * @param[in] timer_name Name of the timer object @nonnull
* @param[out] clock_accuracy Expected precision of the timer, in microseconds. This
* is the underlying tick value rounded to the nearest
- * microsecond integer.
- * @param[in] callback_ptr The function pointer of the timer callback or ISR that
- * will be called by the timer. The user’s function is
- * declared as follows: void timer_callback(uint32 timer_id)
- * Where the timer_id is passed in to the function by the OSAL
+ * microsecond integer. @nonnull
+ * @param[in] callback_ptr The function pointer of the timer callback @nonnull.
*
* @return Execution status, see @ref OSReturnCodes
* @retval #OS_SUCCESS @copybrief OS_SUCCESS
@@ -84,8 +83,8 @@ typedef struct
* @retval #OS_ERR_NAME_TOO_LONG name length including null terminator greater than #OS_MAX_API_NAME
* @retval #OS_ERR_NAME_TAKEN if the name is already in use by another timer.
* @retval #OS_ERR_NO_FREE_IDS if all of the timers are already allocated.
- * @retval #OS_TIMER_ERR_INVALID_ARGS if the callback pointer is zero.
- * @retval #OS_TIMER_ERR_UNAVAILABLE if the timer cannot be created.
+ * @retval #OS_ERR_INCORRECT_OBJ_STATE if invoked from a timer context
+ * @retval #OS_TIMER_ERR_INTERNAL if there was an error programming the OS timer @covtest
*/
int32 OS_TimerCreate(osal_id_t *timer_id, const char *timer_name, uint32 *clock_accuracy,
OS_TimerCallback_t callback_ptr);
@@ -106,17 +105,28 @@ int32 OS_TimerCreate(osal_id_t *timer_id, const char *timer_name, uint32 *clock_
* allowing a single opaque argument to be passed to the callback routine.
* The OSAL implementation does not use this parameter, and may be set NULL.
*
- * @warning Depending on the OS, the callback_ptr function may be similar to an
- * interrupt service routine. Calls that cause the code to block or require
- * an application context (like sending events) are generally not supported.
+ * The callback function for this method should be declared as follows:
+ *
+ * void timer_callback(osal_id_t object_id, void *arg);
+ *
+ * The timer_id is passed in to the function by the OSAL, and the arg parameter
+ * is passed through from the callback_arg argument on this call.
*
- * @param[out] timer_id The non-zero resource ID of the timer object
- * @param[in] timer_name Name of the timer object
+ * @param[out] timer_id Will be set to the non-zero resource ID of the timer object @nonnull
+ * @param[in] timer_name Name of the timer object @nonnull
* @param[in] timebase_id The time base resource to use as a reference
- * @param[in] callback_ptr Application-provided function to invoke
- * @param[in] callback_arg Opaque argument to pass to callback function
+ * @param[in] callback_ptr Application-provided function to invoke @nonnull
+ * @param[in] callback_arg Opaque argument to pass to callback function, may be NULL
*
* @return Execution status, see @ref OSReturnCodes
+ * @retval #OS_SUCCESS @copybrief OS_SUCCESS
+ * @retval #OS_INVALID_POINTER if any parameters are NULL
+ * @retval #OS_ERR_INVALID_ID if the timebase_id parameter is not valid
+ * @retval #OS_ERR_NAME_TOO_LONG name length including null terminator greater than #OS_MAX_API_NAME
+ * @retval #OS_ERR_NAME_TAKEN if the name is already in use by another timer.
+ * @retval #OS_ERR_NO_FREE_IDS if all of the timers are already allocated.
+ * @retval #OS_ERR_INCORRECT_OBJ_STATE if invoked from a timer context
+ * @retval #OS_TIMER_ERR_INTERNAL if there was an error programming the OS timer @covtest
*/
int32 OS_TimerAdd(osal_id_t *timer_id, const char *timer_name, osal_id_t timebase_id, OS_ArgCallback_t callback_ptr,
void *callback_arg);
@@ -149,10 +159,9 @@ int32 OS_TimerAdd(osal_id_t *timer_id, const char *timer_name, osal_id_t timebas
* @return Execution status, see @ref OSReturnCodes
* @retval #OS_SUCCESS @copybrief OS_SUCCESS
* @retval #OS_ERR_INVALID_ID if the timer_id is not valid.
- * @retval #OS_TIMER_ERR_INTERNAL if there was an error programming the OS timer.
- * @retval #OS_ERROR if both start time and interval time are zero.
+ * @retval #OS_TIMER_ERR_INTERNAL if there was an error programming the OS timer @covtest
* @retval #OS_ERR_INCORRECT_OBJ_STATE if called from timer/timebase context
- * @retval #OS_TIMER_ERR_INVALID_ARGS if the start_time or interval_time is out of range
+ * @retval #OS_TIMER_ERR_INVALID_ARGS if the start_time or interval_time is out of range, or both 0
*/
int32 OS_TimerSet(osal_id_t timer_id, uint32 start_time, uint32 interval_time);
@@ -168,7 +177,7 @@ int32 OS_TimerSet(osal_id_t timer_id, uint32 start_time, uint32 interval_time);
* @return Execution status, see @ref OSReturnCodes
* @retval #OS_SUCCESS @copybrief OS_SUCCESS
* @retval #OS_ERR_INVALID_ID if the timer_id is invalid.
- * @retval #OS_TIMER_ERR_INTERNAL if there was a problem deleting the timer in the host OS.
+ * @retval #OS_TIMER_ERR_INTERNAL if there was a problem deleting the timer in the host OS @covtest
* @retval #OS_ERR_INCORRECT_OBJ_STATE if called from timer/timebase context
*/
int32 OS_TimerDelete(osal_id_t timer_id);
@@ -179,8 +188,8 @@ int32 OS_TimerDelete(osal_id_t timer_id);
*
* Outputs the ID associated with the given timer, if it exists.
*
- * @param[out] timer_id The timer ID corresponding to the name
- * @param[in] timer_name The timer name to find
+ * @param[out] timer_id Will be set to the timer ID corresponding to the name @nonnull
+ * @param[in] timer_name The timer name to find @nonnull
*
* @return Execution status, see @ref OSReturnCodes
* @retval #OS_SUCCESS @copybrief OS_SUCCESS
@@ -199,7 +208,7 @@ int32 OS_TimerGetIdByName(osal_id_t *timer_id, const char *timer_name);
* information known about that timer into a structure pointer to by timer_prop.
*
* @param[in] timer_id The timer ID to operate on
- * @param[out] timer_prop Buffer containing timer properties
+ * @param[out] timer_prop Buffer containing timer properties @nonnull
* - creator: the OS task ID of the task that created this timer
* - name: the string name of the timer
* - start_time: the start time in microseconds, if any
diff --git a/src/os/shared/src/osapi-time.c b/src/os/shared/src/osapi-time.c
index df92e6a58..c196ec003 100644
--- a/src/os/shared/src/osapi-time.c
+++ b/src/os/shared/src/osapi-time.c
@@ -315,7 +315,7 @@ int32 OS_TimerSet(osal_id_t timer_id, uint32 start_time, uint32 interval_time)
ARGCHECK(start_time < (UINT32_MAX / 2), OS_TIMER_ERR_INVALID_ARGS);
ARGCHECK(interval_time < (UINT32_MAX / 2), OS_TIMER_ERR_INVALID_ARGS);
- ARGCHECK(start_time != 0 || interval_time != 0, OS_ERROR);
+ ARGCHECK(start_time != 0 || interval_time != 0, OS_TIMER_ERR_INVALID_ARGS);
/*
* Check our context. Not allowed to use the timer API from a timer callback.
diff --git a/src/tests/timer-add-api-test/timer-add-api-test.c b/src/tests/timer-add-api-test/timer-add-api-test.c
index 917db9e8d..d80cc5656 100644
--- a/src/tests/timer-add-api-test/timer-add-api-test.c
+++ b/src/tests/timer-add-api-test/timer-add-api-test.c
@@ -73,7 +73,8 @@ void TestTimerAddApi(void)
osal_id_t time_base_id;
int i = 0;
int32 TimerStatus[NUMBER_OF_TIMERS];
- osal_id_t TimerID[NUMBER_OF_TIMERS];
+ osal_id_t TimerID[OS_MAX_TIMERS];
+ char temp_name[OS_MAX_API_NAME + 5];
char TimerName[NUMBER_OF_TIMERS][20] = {"TIMER1", "TIMER2", "TIMER3", "TIMER4"};
uint32 microsecs;
@@ -87,11 +88,28 @@ void TestTimerAddApi(void)
expected = OS_SUCCESS;
UtAssert_True(tbs_ret_val == expected, "OS_TimeBaseSet() (%ld) == OS_SUCCESS", (long)tbs_ret_val);
+ memset(temp_name, 'x', sizeof(temp_name) - 1);
+ temp_name[sizeof(temp_name) - 1] = 0;
+ UtAssert_INT32_EQ(OS_TimerAdd(&timer_id, temp_name, time_base_id, &null_func, NULL), OS_ERR_NAME_TOO_LONG);
+
+ for (i = 0; i < OS_MAX_TIMERS; i++)
+ {
+ snprintf(temp_name, sizeof(temp_name), "Timer%d", i);
+ UtAssert_INT32_EQ(OS_TimerAdd(&TimerID[i], temp_name, time_base_id, &null_func, NULL), OS_SUCCESS);
+ UtPrintf("Timer %d Created ID=%lx", i, OS_ObjectIdToInteger(TimerID[i]));
+ }
+
+ UtAssert_INT32_EQ(OS_TimerAdd(&timer_id, "TooMany", time_base_id, &null_func, NULL), OS_ERR_NO_FREE_IDS);
+ for (i = 0; i < OS_MAX_TIMERS; i++)
+ {
+ UtAssert_INT32_EQ(OS_TimerDelete(TimerID[i]), OS_SUCCESS);
+ }
+
for (i = 0; i < NUMBER_OF_TIMERS; i++)
{
- TimerStatus[i] = OS_TimerAdd(&TimerID[i], TimerName[i], time_base_id, &counter_func, &timer_counter[i]);
- UtAssert_True(TimerStatus[i] == OS_SUCCESS, "Timer %d Created RC=%d ID=%lx", i, (int)TimerStatus[i],
- OS_ObjectIdToInteger(TimerID[i]));
+ UtAssert_INT32_EQ(OS_TimerAdd(&TimerID[i], TimerName[i], time_base_id, &counter_func, &timer_counter[i]),
+ OS_SUCCESS);
+ UtPrintf("Timer %d Created ID=%lx", i, OS_ObjectIdToInteger(TimerID[i]));
}
/* Sample the clock now, before starting any timer */
diff --git a/src/unit-test-coverage/shared/src/coveragetest-time.c b/src/unit-test-coverage/shared/src/coveragetest-time.c
index 00c541e07..baf4c4a0d 100644
--- a/src/unit-test-coverage/shared/src/coveragetest-time.c
+++ b/src/unit-test-coverage/shared/src/coveragetest-time.c
@@ -170,9 +170,9 @@ void Test_OS_TimerSet(void)
* Test Case For:
* int32 OS_TimerSet(uint32 timer_id, uint32 start_time, uint32 interval_time)
*/
- int32 expected = OS_ERROR;
+ int32 expected = OS_TIMER_ERR_INVALID_ARGS;
int32 actual = OS_TimerSet(UT_OBJID_1, 0, 0);
- UtAssert_True(actual == expected, "OS_TimerSet() (%ld) == OS_ERROR", (long)actual);
+ UtAssert_True(actual == expected, "OS_TimerSet() (%ld) == OS_TIMER_ERR_INVALID_ARGS", (long)actual);
expected = OS_SUCCESS;
actual = OS_TimerSet(UT_OBJID_1, 0, 1);
diff --git a/src/unit-tests/ostimer-test/ut_ostimer_test.c b/src/unit-tests/ostimer-test/ut_ostimer_test.c
index 68e94ec89..5fb8083ac 100644
--- a/src/unit-tests/ostimer-test/ut_ostimer_test.c
+++ b/src/unit-tests/ostimer-test/ut_ostimer_test.c
@@ -203,6 +203,7 @@ void UtTest_Setup(void)
UtTest_Add(UT_os_timergetidbyname_test, UT_os_setup_timergetidbyname_test, NULL, "OS_TimerGetIdByName");
UtTest_Add(UT_os_timergetinfo_test, UT_os_setup_timergetinfo_test, NULL, "OS_TimerGetInfo");
UtTest_Add(UT_os_timerset_test, UT_os_setup_timerset_test, NULL, "OS_TimerSet");
+ UtTest_Add(UT_os_timerreconf_test, NULL, NULL, "TimerReconfig");
}
/*================================================================================*
diff --git a/src/unit-tests/ostimer-test/ut_ostimer_test.h b/src/unit-tests/ostimer-test/ut_ostimer_test.h
index 36ca9a956..4cc2de0f9 100644
--- a/src/unit-tests/ostimer-test/ut_ostimer_test.h
+++ b/src/unit-tests/ostimer-test/ut_ostimer_test.h
@@ -33,12 +33,13 @@
**--------------------------------------------------------------------------------*/
#include "ut_os_support.h"
-#include "ut_ostimer_timerio_test.h"
/*--------------------------------------------------------------------------------*
** Macros
**--------------------------------------------------------------------------------*/
+#define UT_OS_TIMER_LIST_LEN (OS_MAX_TIMERS + 10)
+
/*--------------------------------------------------------------------------------*
** Data types
**--------------------------------------------------------------------------------*/
@@ -47,6 +48,21 @@
** External global variables
**--------------------------------------------------------------------------------*/
+extern const char *g_timerNames[UT_OS_TIMER_LIST_LEN];
+extern char g_longTimerName[UT_OS_NAME_BUFF_SIZE];
+
+extern uint32 g_cbLoopCntMax;
+extern uint32 g_toleranceVal;
+extern uint32 g_timerFirst;
+extern int32 g_status;
+extern osal_id_t g_timerId;
+
+extern int32 TimerCreateRc;
+extern int32 TimerDeleteRc;
+extern int32 TimerSetRc;
+extern int32 TimerGetByNameRc;
+extern int32 TimerGetInfoRc;
+
/*--------------------------------------------------------------------------------*
** Global variables
**--------------------------------------------------------------------------------*/
@@ -55,6 +71,15 @@
** Function prototypes
**--------------------------------------------------------------------------------*/
+void UT_os_timercallback(osal_id_t timerId);
+
+void UT_os_timercreate_test(void);
+void UT_os_timerdelete_test(void);
+void UT_os_timerset_test(void);
+void UT_os_timerreconf_test(void);
+void UT_os_timergetidbyname_test(void);
+void UT_os_timergetinfo_test(void);
+
/*--------------------------------------------------------------------------------*/
#endif /* UT_OSTIMER_TEST_H */
diff --git a/src/unit-tests/ostimer-test/ut_ostimer_timerio_test.c b/src/unit-tests/ostimer-test/ut_ostimer_timerio_test.c
index f08cb4bfb..57f5da660 100644
--- a/src/unit-tests/ostimer-test/ut_ostimer_timerio_test.c
+++ b/src/unit-tests/ostimer-test/ut_ostimer_timerio_test.c
@@ -28,7 +28,7 @@
** Includes
**--------------------------------------------------------------------------------*/
-#include "ut_ostimer_timerio_test.h"
+#include "ut_ostimer_test.h"
/*--------------------------------------------------------------------------------*
** Macros
@@ -42,21 +42,10 @@
** External global variables
**--------------------------------------------------------------------------------*/
-extern char *g_timerNames[UT_OS_TIMER_LIST_LEN];
-extern char g_longTimerName[UT_OS_NAME_BUFF_SIZE];
-
-extern uint32 g_cbLoopCntMax;
-extern uint32 g_toleranceVal;
-extern uint32 g_timerFirst;
-extern int32 g_status;
-extern osal_id_t g_timerId;
-
/*--------------------------------------------------------------------------------*
** External function prototypes
**--------------------------------------------------------------------------------*/
-extern void UT_os_timercallback(osal_id_t timerId);
-
/*--------------------------------------------------------------------------------*
** Global variables
**--------------------------------------------------------------------------------*/
@@ -64,6 +53,21 @@ extern void UT_os_timercallback(osal_id_t timerId);
uint32 g_clkAccuracy = 0;
osal_id_t g_timerIds[UT_OS_TIMER_LIST_LEN];
+typedef struct
+{
+ bool IsValid;
+
+ int32 CreateRc;
+ int32 AddRc;
+ int32 DeleteRc;
+ int32 SetRc;
+ int32 GetByNameRc;
+ int32 GetInfoRc;
+
+ OS_timer_prop_t Prop;
+
+} UT_reconf_status_t;
+
/*--------------------------------------------------------------------------------*
** Local function prototypes
**--------------------------------------------------------------------------------*/
@@ -71,54 +75,31 @@ osal_id_t g_timerIds[UT_OS_TIMER_LIST_LEN];
/*--------------------------------------------------------------------------------*
** Local function definitions
**--------------------------------------------------------------------------------*/
+void UT_os_othertimercallback1(osal_id_t timerId) {}
+void UT_os_othertimercallback2(osal_id_t timerId, void *arg) {}
-/*--------------------------------------------------------------------------------*
-** Syntax: int32 OS_TimerAPIInit(void)
-** Purpose: Initializes the tables that the OS timer uses to keep track of information
-** about objects
-** Parameters: None
-** Returns: OS_ERROR on an unsuccessful inits
-** OS_SUCCESS on a successful inits
-** OS_ERR_NOT_IMPLEMENTED if not implemented
-** -----------------------------------------------------
-** Test #0: Not-implemented condition
-** 1) Call this routine
-** 2) If the returned value is OS_ERR_NOT_IMPLEMENTED, then exit test
-** 3) Otherwise, continue
-** -----------------------------------------------------
-** Test #1: Init-not-call-first condition
-** 1) Don't call this routine first
-** 2) Call TBD routine(s)
-** 3) Expect the returned value from those routines to be
-** (a) __not__ OS_SUCCESS
-*** -----------------------------------------------------
-** Test #2: Nominal condition
-** 1) Call this routine
-** 2) Expect the returned value to be
-** (a) OS_SUCCESS (although results are not directly observable)
-** 3) Call TBD routine(s)
-** 4) Expect the returned value from those routines to be
-** (a) OS_SUCCESS
-*--------------------------------------------------------------------------------*/
-void UT_os_timerinit_test()
+void UT_os_reconftimercallback(osal_id_t timerId, void *arg)
{
- /*-----------------------------------------------------*/
- /* #1 Init-not-call-first */
-
- UT_RETVAL(OS_TimerCreate(&g_timerIds[0], "Timer #0", &g_clkAccuracy, &UT_os_timercallback), OS_ERROR);
+ UT_reconf_status_t *reconf = arg;
- if (!UT_SETUP(OS_API_Init()))
+ if (!reconf->IsValid)
{
- return;
+ /*
+ * Calls to timer configuration from the context of a timer function
+ * should be rejected with OS_ERR_INCORRECT_OBJ_STATE. However because
+ * UtAssert is not fully thread-safe, this does not assert here, it just
+ * calls the various functions on the first time through and stores the
+ * result, which is checked/asserted in the main task.
+ */
+ reconf->CreateRc = OS_TimerCreate(&timerId, "reconf", &g_clkAccuracy, UT_os_othertimercallback1);
+ reconf->AddRc = OS_TimerAdd(&timerId, "reconf", g_timerIds[1], UT_os_othertimercallback2, NULL);
+ reconf->DeleteRc = OS_TimerDelete(timerId);
+ reconf->SetRc = OS_TimerSet(timerId, 100, 100);
+ reconf->GetByNameRc = OS_TimerGetIdByName(&timerId, g_timerNames[7]);
+ reconf->GetInfoRc = OS_TimerGetInfo(timerId, &reconf->Prop);
+
+ reconf->IsValid = true;
}
-
- /*-----------------------------------------------------*/
- /* #2 Nominal */
-
- UT_NOMINAL(OS_TimerCreate(&g_timerIds[0], "Timer #0", &g_clkAccuracy, &UT_os_timercallback));
-
- /* Reset test environment */
- UT_TEARDOWN(OS_TimerDelete(g_timerIds[0]));
}
/*--------------------------------------------------------------------------------*
@@ -270,6 +251,62 @@ void UT_os_timercreate_test()
/* #8 Nominal */
UT_NOMINAL(OS_TimerCreate(&g_timerIds[7], g_timerNames[7], &g_clkAccuracy, &UT_os_timercallback));
+
+ /* Reset test environment */
+ UT_TEARDOWN(OS_TimerDelete(g_timerIds[7]));
+}
+
+/*--------------------------------------------------------------------------------*
+** Test case to confirm that attempts to (re-)configure a timer from the context
+** of a callback function should fail with OS_ERR_INCORRECT_OBJ_STATE
+**--------------------------------------------------------------------------------*/
+void UT_os_timerreconf_test()
+{
+ UT_reconf_status_t reconf;
+
+ memset(&reconf, 0, sizeof(reconf));
+
+ if (UT_SETUP(OS_TimeBaseCreate(&g_timerIds[1], "reconf", NULL)))
+ {
+ if (UT_SETUP(OS_TimeBaseSet(g_timerIds[1], 50, 50)))
+ {
+ if (UT_SETUP(OS_TimerAdd(&g_timerIds[2], "reconf", g_timerIds[1], UT_os_reconftimercallback, &reconf)))
+ {
+ if (UT_SETUP(OS_TimerSet(g_timerIds[2], 50, 50)))
+ {
+ while (!reconf.IsValid)
+ {
+ OS_TaskDelay(1);
+ }
+ }
+
+ /* Reset test environment */
+ UT_TEARDOWN(OS_TimerDelete(g_timerIds[2]));
+ }
+ }
+
+ /* Reset test environment */
+ UT_TEARDOWN(OS_TimeBaseDelete(g_timerIds[1]));
+ }
+
+ /* Check that those configuration attempts all returned OS_ERR_INCORRECT_OBJ_STATE */
+ UtAssert_True(reconf.CreateRc == OS_ERR_INCORRECT_OBJ_STATE,
+ "OS_TimerCreate(&timerId, \"reconf\", &g_clkAccuracy, UT_os_othertimercallback1) (%d) == "
+ "OS_ERR_INCORRECT_OBJ_STATE",
+ (int)reconf.CreateRc);
+ UtAssert_True(reconf.AddRc == OS_ERR_INCORRECT_OBJ_STATE,
+ "OS_TimerAdd(&timerId, \"reconf\", g_timerIds[1], UT_os_othertimercallback2, NULL) (%d) == "
+ "OS_ERR_INCORRECT_OBJ_STATE",
+ (int)reconf.AddRc);
+ UtAssert_True(reconf.DeleteRc == OS_ERR_INCORRECT_OBJ_STATE,
+ "OS_TimerDelete(timerId) (%d) == OS_ERR_INCORRECT_OBJ_STATE", (int)reconf.DeleteRc);
+ UtAssert_True(reconf.SetRc == OS_ERR_INCORRECT_OBJ_STATE,
+ "OS_TimerSet(timerId, 100, 100) (%d) == OS_ERR_INCORRECT_OBJ_STATE", (int)reconf.SetRc);
+ UtAssert_True(reconf.GetByNameRc == OS_ERR_INCORRECT_OBJ_STATE,
+ "OS_TimerGetIdByName(&timerId, g_timerNames[7]) (%d) == OS_ERR_INCORRECT_OBJ_STATE",
+ (int)reconf.GetByNameRc);
+ UtAssert_True(reconf.GetInfoRc == OS_ERR_INCORRECT_OBJ_STATE,
+ "OS_TimerGetInfo(timerId, &TimerProp) (%d) == OS_ERR_INCORRECT_OBJ_STATE", (int)reconf.GetInfoRc);
}
/*--------------------------------------------------------------------------------*
@@ -406,6 +443,8 @@ void UT_os_timerset_test()
if (UT_SETUP(OS_TimerCreate(&g_timerIds[3], g_timerNames[3], &g_clkAccuracy, &UT_os_timercallback)))
{
+ UT_RETVAL(OS_TimerSet(g_timerIds[3], 0, 0), OS_TIMER_ERR_INVALID_ARGS);
+
g_status = 0;
g_timerId = g_timerIds[3];
g_timerFirst = 1;
diff --git a/src/unit-tests/ostimer-test/ut_ostimer_timerio_test.h b/src/unit-tests/ostimer-test/ut_ostimer_timerio_test.h
deleted file mode 100644
index d4be070b3..000000000
--- a/src/unit-tests/ostimer-test/ut_ostimer_timerio_test.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * NASA Docket No. GSC-18,370-1, and identified as "Operating System Abstraction Layer"
- *
- * Copyright (c) 2019 United States Government as represented by
- * the Administrator of the National Aeronautics and Space Administration.
- * All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * \file
- *
- * Owner: Tam Ngo
- * Date: April 2013
- */
-
-#ifndef UT_OSTIMER_TIMERIO_TEST_H
-#define UT_OSTIMER_TIMERIO_TEST_H
-
-/*--------------------------------------------------------------------------------*
-** Includes
-**--------------------------------------------------------------------------------*/
-
-#include "ut_os_support.h"
-
-/*--------------------------------------------------------------------------------*
-** Macros
-**--------------------------------------------------------------------------------*/
-
-#define UT_OS_TIMER_LIST_LEN (OS_MAX_TIMERS + 10)
-
-/*--------------------------------------------------------------------------------*
-** Data types
-**--------------------------------------------------------------------------------*/
-
-/*--------------------------------------------------------------------------------*
-** External global variables
-**--------------------------------------------------------------------------------*/
-
-/*--------------------------------------------------------------------------------*
-** Global variables
-**--------------------------------------------------------------------------------*/
-
-/*--------------------------------------------------------------------------------*
-** Function prototypes
-**--------------------------------------------------------------------------------*/
-
-void UT_os_timerinit_test(void);
-void UT_os_timercreate_test(void);
-void UT_os_timerdelete_test(void);
-void UT_os_timerset_test(void);
-void UT_os_timergetidbyname_test(void);
-void UT_os_timergetinfo_test(void);
-
-/*--------------------------------------------------------------------------------*/
-
-#endif /* UT_OSTIMER_TIMERIO_TEST_H */