diff --git a/src/os/inc/osapi-heap.h b/src/os/inc/osapi-heap.h index 5313bfdd3..a3763226d 100644 --- a/src/os/inc/osapi-heap.h +++ b/src/os/inc/osapi-heap.h @@ -53,6 +53,7 @@ typedef struct * @param[out] heap_prop Storage buffer for heap info * * @return Execution status, see @ref OSReturnCodes + * @retval #OS_SUCCESS @copybrief OS_SUCCESS * @retval #OS_INVALID_POINTER if the heap_prop argument is NULL */ int32 OS_HeapGetInfo(OS_heap_prop_t *heap_prop); diff --git a/src/os/inc/osapi-network.h b/src/os/inc/osapi-network.h index a805ef80b..c4339e800 100644 --- a/src/os/inc/osapi-network.h +++ b/src/os/inc/osapi-network.h @@ -65,6 +65,7 @@ int32 OS_NetworkGetID(void); * @param[in] name_len Maximum length of host name buffer * * @return Execution status, see @ref OSReturnCodes + * @retval #OS_SUCCESS @copybrief OS_SUCCESS * @retval #OS_ERR_INVALID_SIZE if the name_len is zero * @retval #OS_INVALID_POINTER if the host_name is NULL */ diff --git a/src/unit-tests/oscore-test/ut_oscore_misc_test.c b/src/unit-tests/oscore-test/ut_oscore_misc_test.c index 9bea12c08..acf0aa893 100644 --- a/src/unit-tests/oscore-test/ut_oscore_misc_test.c +++ b/src/unit-tests/oscore-test/ut_oscore_misc_test.c @@ -418,23 +418,15 @@ void UT_os_heapgetinfo_test(void) { OS_heap_prop_t heapProp; - /*-----------------------------------------------------*/ - /* API not implemented */ - - if (!UT_IMPL(OS_HeapGetInfo(&heapProp))) - { - return; - } - /*-----------------------------------------------------*/ /* #1 Null-pointer-arg */ UT_RETVAL(OS_HeapGetInfo(NULL), OS_INVALID_POINTER); /*-----------------------------------------------------*/ - /* #3 Nominal */ + /* #3 Nominal (allows for not implemented) */ - UT_NOMINAL(OS_HeapGetInfo(&heapProp)); + UT_NOMINAL_OR_NOTIMPL(OS_HeapGetInfo(&heapProp)); } /*================================================================================* diff --git a/src/unit-tests/osfile-test/ut_osfile_fileio_test.c b/src/unit-tests/osfile-test/ut_osfile_fileio_test.c index 0a0e51a4a..7f8e77db7 100644 --- a/src/unit-tests/osfile-test/ut_osfile_fileio_test.c +++ b/src/unit-tests/osfile-test/ut_osfile_fileio_test.c @@ -1421,6 +1421,13 @@ void UT_os_outputtofile_test() UtAssert_True(strstr(g_readBuff, "UT_os_outputtofile_test") != NULL, "Output file contains UT_os_outputtofile_test"); } + + /* + * Executing a command name "false" should fail, either because it is not a known + * command, or if it is valid (e.g. a UNIX-like environment has /bin/false) the + * command always fails. + */ + UT_RETVAL(OS_ShellOutputToFile("false", g_fDescs[0]), OS_ERROR); } /* Reset test environment */