Skip to content

Fix #36: Created TBL checkout test#55

Open
czogby-nasa wants to merge 3 commits into
devfrom
36-create-tbl-checkout-test
Open

Fix #36: Created TBL checkout test#55
czogby-nasa wants to merge 3 commits into
devfrom
36-create-tbl-checkout-test

Conversation

@czogby-nasa
Copy link
Copy Markdown
Contributor

No description provided.

@czogby-nasa czogby-nasa requested a review from ddstewar May 12, 2026 03:24
@czogby-nasa czogby-nasa self-assigned this May 12, 2026
@czogby-nasa czogby-nasa linked an issue May 12, 2026 that may be closed by this pull request
1 task
@czogby-nasa czogby-nasa added this to the v7.1.0 milestone May 12, 2026
Copy link
Copy Markdown
Contributor

@ddstewar ddstewar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have made this cFE app dependent on 4 optional cFS applications. DS, HK, and TO_Lab, and MD. This is unacceptable. The cFE checkout tests can not be dependent on any application outside of the cFE, except the Sample_app which is there as a demo app for people to see how to start development of their own cFS application. See comment below about that.

You send the same 2 commands 3 times : CFE_TBL_CMD_LOAD and CFE_TBL_CMD_VALIDATE.
This is not following what these checkout tests need to do.

CFE_TBL_CMD_ACTIVATE is sent 2 times when once should be all that is done.

This needs to be reduced to 2 times for the load command just so it can be aborted the second time. The others only need once.

I'm pretty frustrated with this, since every other line is not following the spirit of the issue essentially. This test makes it look like you are just taking all the commands in the other existing tests and just putting them in here without planning how they will be run. This is not a refactoring of those tests. These need to be strategic and lean tests. these need to run fast. Repeating the same command and putting a second get-and-check that resets the cmd_count flies in the face of that. Everything looks just thrown in here, like AI wrote this. I know you can do better. Consider what the test is supposed to do, consider all of the command the app has, and plan the test out accordingly.

Comment on lines +26 to +27
test_table_name = "DS.FILE_TBL"
test_table_filename = "/cf/ds_file_tbl.tbl"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TBL test can not be dependent on an app outside of the cFE. This needs changed to either a table used by the TBL app itself or one of the cFE app tables.

Comment on lines +32 to +34
cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER")
cmd(f"<%= target_name %> CFE_TBL_CMD_VALIDATE with ACTIVE_TABLE_FLAG INACTIVE, TABLE_NAME '{test_table_name}'")
wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER >= {cmd_count + 1}", 100)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block is overkill.

This is resetting the cmd_count variable. The tlm() call is not needed here and the wait_check() should be changed to just a simple wait() for however long is safe to move on, which is usually less time than it takes for a tlm packet to be seen.

This needs to be changed to just the validate command with a wait() after it, if any wait is needed at all.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch out resetting cmd_count - I missed that.

wait_check() should be changed to just a simple wait() for however long is safe to move on, which is usually less time than it takes for a tlm packet to be seen.

I had experimented with watching it change as it was running, and it took a significant amount of time - I think I remember it taking more than one telemetry cycle. Is there an exact definition of how long it takes? It seems like it might vary. I looked for a telemetry point that defines when validation is done, and that one made the most sense. I don't think spending a few more seconds waiting for telemetry ONE extra time is a big deal.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine if you have a specific point to watch and makes sense.
There are 2 buffers though right? So I would try sending the validate and forgetting it and move with the rest of the commands, then send the activate later in the command list for that particular table.

Comment on lines +37 to +40
test_table_name = "HK.CopyTable"
test_table_filename = "/cf/hk_cpy_tbl.tbl"
cmd(f"<%= target_name %> CFE_TBL_CMD_LOAD with LOAD_FILENAME '{test_table_filename}'")
cmd(f"<%= target_name %> CFE_TBL_CMD_VALIDATE with ACTIVE_TABLE_FLAG INACTIVE, TABLE_NAME '{test_table_name}'")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 4 lines are not needed. This has already executed the load and activate commands

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. It uses a different table, but I see now that nothing after it depends on this load, for the purposes of acceptance testing.

Comment on lines +41 to +42
test_table_name = "TO_LAB.Subscriptions"
test_table_filename = "/cf/to_lab_sub_bad.tbl"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason to change the table being used. Just load the same table again.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If trying the send and forget I mentioned above, this would need to be a different table.

test_table_name = "TO_LAB.Subscriptions"
test_table_filename = "/cf/to_lab_sub_bad.tbl"
cmd(f"<%= target_name %> CFE_TBL_CMD_LOAD with LOAD_FILENAME '{test_table_filename}'")
cmd(f"<%= target_name %> CFE_TBL_CMD_VALIDATE with ACTIVE_TABLE_FLAG INACTIVE, TABLE_NAME '{test_table_name}'")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table does not need validated to have the abort be accepted. I have tested this via sending the command myself. Remove this line.

Copy link
Copy Markdown
Contributor Author

@czogby-nasa czogby-nasa May 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. It was included in the original test written by Ariel and Keegan. I trusted that they knew what they were doing there, and "load/validate/activate" is the usual sequence, so it seemed needed. Ask them why they thought it was needed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't care about the original test. this is not just a refactor of the basic test that we threw together to get a test out the door. That will be refactored later. this test has it's own goals to accomplish and should only loosely be based on the other one. I don't see why who wrote that has anything to do with how this test works. You should have sent the commands yourself to see what was needed at a bare minimum.

cmd(f"<%= target_name %> CFE_TBL_CMD_VALIDATE with ACTIVE_TABLE_FLAG INACTIVE, TABLE_NAME '{test_table_name}'")
cmd(f"<%= target_name %> CFE_TBL_CMD_ABORT_LOAD with TABLE_NAME '{test_table_name}'")
cmd(f"<%= target_name %> CFE_TBL_CMD_DUMP_REGISTRY with DUMP_FILENAME 'dump_registry.dat'")
cmd(f"<%= target_name %> CFE_TBL_CMD_SEND_REGISTRY with TABLE_NAME 'MD.DWELL_TABLE4'")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MD is not a cFE app. The send_registry command needs to use a table from the cFE.

Comment on lines +48 to +50
cmd(f"<%= target_name %> CFE_ES_CMD_STOP_APP with APPLICATION 'MD'")
wait(10)
cmd(f"<%= target_name %> CFE_TBL_CMD_DELETE_CDS with TABLE_NAME 'MD.DWELL_TABLE4'")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This set of commands is stopping the MD app. The MD app can now no longer be tested.
If the delete CDS command needs to stop an app to successfully complete then it can use the sample_app. The file header here should state that the test is dependent on the Sample_app, as it is an app designed to use in these situations. The app should be restarted after this but you do not need to verify that it completed (not the point of this test.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. There was originally a command at the end to re-start the MD app. I considered keeping it, but then I remembered you wrote in the ticket "Preservation of environment is not a concern other than not to ruin the system for later apps. Files created can be left on the system. No need to clean-up after the test." So I deleted it to keep it simple, since simple is what you're emphasizing, but I forgot that having MD stopped could "ruin the system for later app [tests]".

@czogby-nasa
Copy link
Copy Markdown
Contributor Author

czogby-nasa commented May 12, 2026

You have made this cFE app dependent on 4 optional cFS applications. DS, HK, and TO_Lab, and MD. This is unacceptable.

No, I did not. Ariel and Keegan did, in the original TBL test. And Mike Yang and Keegan did in the original SB test. And crossover has been a common thing in cFE/cFS tests when needed, and you previously never said anything about avoiding it here. It was not in the ticket description. Why should crossover be allowed in those test but not these? Do we need to open tickets to refactor their SB and TBL tests? See my earlier comment on the SB checkout test.

"This is unacceptable / Everything looks just thrown in here, like AI wrote this / just putting them in here without planning how they will be run"

No. Please take a step back. You're being very disrespectful, insulting, and aggressive. Not appropriate for the workplace. This is not an online forum debate with strangers on the internet. If you wanted clarification on these things, it would have been better to set up a call or an office visit. I evaluated each command before deciding whether or not it seemed needed, and whether or not the lines in-between are needed for those commands to work. Again, you never said anything about not being allowed to use CFS apps - and they were used in the functional tests (written by Mike Yang, Keegan, and Ariel) - why should they be allowed there but not here?

@ddstewar
Copy link
Copy Markdown
Contributor

You have made this cFE app dependent on 4 optional cFS applications. DS, HK, and TO_Lab, and MD. This is unacceptable.

No, I did not. Ariel and Keegan did, in the original TBL test. And Mike Yang and Keegan did in the original SB test. And crossover has been a common thing in cFE/cFS tests when needed, and you previously never said anything about avoiding it here. It was not in the ticket description. Why should crossover be allowed in those test but not these? Do we need to open tickets to refactor their SB and TBL tests? See my earlier comment on the SB checkout test.

Ariel and Keegan did not write this test. You did, so the statement stands. These comments only pertain to this test in isolation. not all of the tests for TBL.

"This is unacceptable / Everything looks just thrown in here, like AI wrote this / just putting them in here without planning how they will be run"

No. Please take a step back. You're being very disrespectful, insulting, and aggressive. Not appropriate for the workplace. This is not an online forum debate with strangers on the internet. If you wanted clarification on these things, it would have been better to set up a call or an office visit. I evaluated each command before deciding whether or not it seemed needed, and whether or not the lines in-between are needed for those commands to work. Again, you never said anything about not being allowed to use CFS apps - and they were used in the functional tests (written by Mike Yang, Keegan, and Ariel) - why should they be allowed there but not here?

I'm very frustrated at the state of this test. You may think I'm being all being those things but I simply stating my view of this test. I had to comment on every other line because of the way it was written. I made the issue text as detailed as possible because you wanted it that way, to avoid exactly this happening, yet it still happened.

From the issue itself:

  • Only execute setup commands required for the needed commands, these should be limited to the CFE or the app under test. Use the existing system files where possible if file manipulation is needed.

So yes, I did previously say in the issue that things like this should be limited to cFE or the app itself. I also talked to you in person about these tests and what their goal was, when they would be run and even answered your "what if's" that you had about them.

The other tests are not functional tests, it does not matter who wrote them so I don't know why you keep referencing that. Those tests will have issues written to refactor them into functional tests. They were rushed out and there was very little that needed verified at the time. Now we are getting to the part where a higher scrutiny will be on the tests and what they test. We need higher fidelity tests all around.

These checkout tests are the first step to running in the Git pipeline to check that nothing is broke before a PR is merged. The future functional tests will be run at a slower pace. perhaps once a week. There is no tie to the other tests other than you can use those a reference of what commands there are and how to use the parameters. Things will have to change for these checkout tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create TBL checkout test

3 participants