Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
skliper opened this issue Jan 11, 2021 · 1 comment · Fixed by #914 or #917
Closed

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

skliper opened this issue Jan 11, 2021 · 1 comment · Fixed by #914 or #917
Assignees
Labels
unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented Jan 11, 2021

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

@skliper skliper changed the title OS_ERR_NOT_IMPLEMENTED should be reported as UTASSERT_CASETYPE_NA in test cases Test case reporting of not-implemented functionality not uniform Jan 11, 2021
@skliper skliper added the unit-test Tickets related to the OSAL unit testing (functional and/or coverage) label Feb 16, 2021
zanzaben added a commit to zanzaben/osal that referenced this issue Feb 16, 2021
@zanzaben zanzaben self-assigned this Feb 16, 2021
zanzaben added a commit to zanzaben/osal that referenced this issue Feb 16, 2021
zanzaben added a commit to zanzaben/osal that referenced this issue Feb 17, 2021
zanzaben added a commit to zanzaben/osal that referenced this issue Feb 17, 2021
@skliper
Copy link
Contributor Author

skliper commented Mar 9, 2021

Current path forward - consider adding a macro (could be part of #787) and change all NA reporting to use it.

@skliper skliper added this to the 6.0.0 milestone Mar 9, 2021
zanzaben added a commit to zanzaben/osal that referenced this issue Mar 12, 2021
zanzaben added a commit to zanzaben/osal that referenced this issue Mar 12, 2021
astrogeco added a commit that referenced this issue Mar 18, 2021
…tests

Fix #752, Utilize UTASSERT_CASETYPE_NA to report OS_ERR_NOT_IMPLEMENTED
jphickey added a commit to jphickey/osal that referenced this issue Aug 10, 2022
Calls to OS_open() must use the OSAL-defined symbol, not the POSIX symbol.
This was a long-standing bug but happened to work because they are both
zero.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Projects
None yet
2 participants