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

Fix #1769, add call to CFE_ES_ExitChildTask #1877

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions modules/cfe_testcase/src/es_task_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,16 @@ void TestExitChild(void)
CFE_SUCCESS);
OS_TaskDelay(500);
UtAssert_INT32_EQ(ExpectedCount, 1);

/*
* Invoking CFE_ES_ExitChildTask() from the context of a main task should _not_ actually exit.
* as this is a void function there is no return code to check here. The fact that the test
* continues after this call is evidence that the test passed (i.e. it did not actually end the task).
*/
UtAssert_VOIDCALL(CFE_ES_ExitChildTask());

/* If this message is printed, then the test passed. If the test fails this will not be reached. */
UtAssert_True(true, "CFE_ES_ExitChildTask() called from main task (ignored; main task did not exit)");
}

void ESTaskTestSetup(void)
Expand Down