Skip to content

Test case reporting of not-implemented functionality not uniform #752

@skliper

Description

@skliper

Is your feature request related to a problem? Please describe.
Various messages in the unit tests are used to report API's that are not implemented, and it's not trivial to get a list:

status = OS_chmod(filename, OS_WRITE_ONLY);
if(status != OS_ERR_NOT_IMPLEMENTED){
UtAssert_True(status == OS_SUCCESS, "status after chmod = %d", (int)status);
status = OS_OpenCreate(&fd, filename, OS_FILE_FLAG_NONE, OS_WRITE_ONLY);
UtAssert_True(status >= OS_SUCCESS, "status after reopen = %d", (int)status);
status = OS_close(fd);
UtAssert_True(status == OS_SUCCESS, "status after close = %d", (int)status);
}else{
UtPrintf("OS_chmod not implemented for write only\n");
}

res = OS_GetLocalTime(NULL);
if (res == OS_ERR_NOT_IMPLEMENTED)
{
UT_OS_TEST_RESULT(testDesc, UTASSERT_CASETYPE_NA);
goto UT_os_getlocaltime_test_exit_tag;
}

Describe the solution you'd like
Utilize UTASSERT_CASETYPE_NA to report all OS_ERR_NOT_IMPLEMENTED returns. Also useful to know if it's the API or an option that is specifically being tested.

Describe alternatives you've considered
Macro

Additional context
See links above

Requester Info
Jacob Hageman - NASA/GSFC

Metadata

Metadata

Assignees

Labels

unit-testTickets related to the OSAL unit testing (functional and/or coverage)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions