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 #7: osal-core-test Failure #424

Closed
yammajamma opened this issue Apr 17, 2020 · 3 comments · Fixed by #426
Closed

Test #7: osal-core-test Failure #424

yammajamma opened this issue Apr 17, 2020 · 3 comments · Fixed by #426
Assignees
Labels
bug unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Milestone

Comments

@yammajamma
Copy link
Contributor

Describe the bug
Test #7: osal-core-test fails.

To Reproduce
Steps to reproduce the behavior:
Note: this test was not readily repeatable, but it failed 2/10 times on this branch:
fix413-Add-Reference-To-Osal-Users-Guide-From-ReadMe

  1. Go to branch stated above
  2. Run build/exe/cpu1/osal-core-test

Expected behavior
The test failed 2/10 times. Specifically, failure is due to the code snippet noted below in osal-core-test.c, line 138 where a small time delay is supposed to occur and the child task is perhaps not exiting before the OS_TaskDelete call happens, so it's returning success.

Code snips
[ FAIL] 01.261 osal-core-test.c:138 - OS_TaskDelete, self exiting task

System observed on:
GNOME VM
OS: Ubuntu 18.04
Versions: OSAL 5.0.11.0

Additional context
This may be due to the VM delay.

Reporter Info
Yasir Khan
NASA GSFC

@skliper
Copy link
Contributor

skliper commented Apr 17, 2020

/*
* A small delay in this parent task to allow the child task to run.
* It should exit immediately....
*/
OS_TaskDelay(10);
UtDebug("Create %s Status = %d, Id = %d\n",taskname,(int)status,(int)TaskData[tasknum].task_id);
UtAssert_True(status == OS_SUCCESS, "OS_TaskCreate, self exiting task");
/*
* Attempting to delete the task that exited itself should always fail
*/
status = OS_TaskDelete( TaskData[tasknum].task_id );
UtDebug("Delete Status = %d, Id = %d\n",(int)status,(int)TaskData[tasknum].task_id);
UtAssert_True(status != OS_SUCCESS, "OS_TaskDelete, self exiting task");
}

@skliper skliper added bug unit-test Tickets related to the OSAL unit testing (functional and/or coverage) labels Apr 17, 2020
@stanislaw
Copy link
Contributor

stanislaw commented Apr 17, 2020

It is great to see this reported by someone else on Linux. My macOS port has this too this is why I have commented out the test in the branch. See here.

@skliper
Copy link
Contributor

skliper commented Apr 20, 2020

Perhaps loop on the delay checking if the child task has exited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants