Skip to content

Commit

Permalink
Merge pull request nasa#1877 from jphickey/fix-1769-exitchildtask
Browse files Browse the repository at this point in the history
Fix nasa#1769, add call to CFE_ES_ExitChildTask
  • Loading branch information
astrogeco authored Aug 27, 2021
2 parents 98d723e + ff90d70 commit 97f39b6
Showing 1 changed file with 10 additions and 0 deletions.
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 @@ -273,6 +273,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

0 comments on commit 97f39b6

Please sign in to comment.