Skip to content

Commit 97f39b6

Browse files
authored
Merge pull request #1877 from jphickey/fix-1769-exitchildtask
Fix #1769, add call to CFE_ES_ExitChildTask
2 parents 98d723e + ff90d70 commit 97f39b6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

modules/cfe_testcase/src/es_task_test.c

+10
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,16 @@ void TestExitChild(void)
273273
CFE_SUCCESS);
274274
OS_TaskDelay(500);
275275
UtAssert_INT32_EQ(ExpectedCount, 1);
276+
277+
/*
278+
* Invoking CFE_ES_ExitChildTask() from the context of a main task should _not_ actually exit.
279+
* as this is a void function there is no return code to check here. The fact that the test
280+
* continues after this call is evidence that the test passed (i.e. it did not actually end the task).
281+
*/
282+
UtAssert_VOIDCALL(CFE_ES_ExitChildTask());
283+
284+
/* If this message is printed, then the test passed. If the test fails this will not be reached. */
285+
UtAssert_True(true, "CFE_ES_ExitChildTask() called from main task (ignored; main task did not exit)");
276286
}
277287

278288
void ESTaskTestSetup(void)

0 commit comments

Comments
 (0)