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

Delete/exit/create child task additional error codes need to be documented in API and tested (related to requirements) #1769

Closed
skliper opened this issue Aug 6, 2021 · 1 comment · Fixed by #1877 or #1885
Assignees
Labels
docs This change only affects documentation. unit-test
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented Aug 6, 2021

Is your feature request related to a problem? Please describe.
We've got requirements to error if CFE_ES_DeleteChildTask or CFE_ES_ExitChildTask relate to the main app task:

ES: Delete Child Task - Error If Application Main Task,cES1312.1,"If the specified task is the cFE Application Main Task, the request shall record the error in the System Log, and return an error code.",Cannot use Child Task Exit or Delete on the cFE Application Main Task.

ES: End Child Task - Error If Application Main Task,cES1314.1,"If the calling task is the cFE Application Main Task, the cFE shall record the error in the System Log, and return an error code.",Cannot use Child Task Exit or Delete on the cFE Application Main Task.

Also CFE_ES_CreateChildTask can not be called from a child task:

ES: Create Child Task - Invalid From Child Task,cES1311.2,"In the event a child task attempts to create another child task, the cFE shall record the error in the System Log, and return an error code.",Only the cFE Application's main task can create a child task. This prevents confusion with parent/child task relationships and the allocation/deallocation of resources.

Describe the solution you'd like
Document in the API and exercise these cases and test for return codes:
CFE_ES_ERR_CHILD_TASK_DELETE_MAIN_TASK
CFE_ES_ERR_CHILD_TASK_CREATE
Note CFE_ES_ExitChildTask is a void so no error code to check but shouldn't exit from a main app, exercise from main test app task to confirm

Describe alternatives you've considered
None

Additional context
Hopefully this would be caught by the upcoming API scrub (@jphickey), but documenting explicitly since it's a requirement verification issue. Not sure if it's easier to fix now or with the rest of the updates... open to whatever is easiest.

Requester Info
Jacob Hageman - NASA/GSFC

@skliper skliper added this to the 7.0.0 milestone Aug 6, 2021
@skliper skliper added the docs This change only affects documentation. label Aug 6, 2021
@jphickey
Copy link
Contributor

Note - as part of previous PR #1869 this adds test cases that cover the following cases of CFE_ES_ERR_CHILD_TASK_DELETE_MAIN_TASK and CFE_ES_ERR_CHILD_TASK_CREATE status codes from the respective APIs (prevents creating child from child, or deleting main task from child, etc).

The remaining work item is to invoke CFE_ES_ExitChildTask

jphickey added a commit to jphickey/cFE that referenced this issue Aug 24, 2021
Invoke CFE_ES_ExitChildTask from the main test task, to confirm
that the task does not actually exit.  There is no status code
but the fact that the test keeps running is evidence that the
task did not exit (which means the test passed).
jphickey added a commit to jphickey/cFE that referenced this issue Aug 24, 2021
Invoke CFE_ES_ExitChildTask from the main test task, to confirm
that the task does not actually exit.  There is no status code
but the fact that the test keeps running is evidence that the
task did not exit (which means the test passed).
astrogeco added a commit that referenced this issue Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change only affects documentation. unit-test
Projects
None yet
2 participants