Fix # 35: Created SB checkout test#54
Conversation
I tried running without the FM commands. CFE_SB_CMD_WRITE_PIPE_INFO gives the following error: So clearly the FM command before that is required. And it seems safer to also include the other 2, since they're similar commands. Only costs 0.15 of a second each. |
All of the SB commands that create files take a filename as a parameter. Change the name to something that does not already exist. It doesn't have anything to do with the execution time of (0.15 as you say) of the commands. We cannot have a cFE app dependent on a cFS optional app for testing. Besides that, the get_info commands do absolutely nothing in this test. The get info commands are there just to verify the file created exists, and there is no logic here verifying that command was accepted at all so they are useless. Regardless, that is an FM command, which is an optional cFS application and not a part of the cFE, so it and all of the FM commands need removed. This test needs to stand alone. I just tested the CFE_SB_CMD_WRITE_ROUTING_INFO command with the filename I then tried the CFE_SB_CMD_WRITE_MAP_INFO command with the filename I finally tested the CFE_SB_CMD_WRITE_PIPE_INFO command with the filename Terminal output: I tried the pipe info command with EVS Port1 1980-012-14:17:46.97860 66/1/CFE_SB 39: /cf/func_file_pipe.dat written:Size=1624,Entries=64 |
The files already existing wasn't an issue for 2 of the commands. I had already checked the /cf/ directory and saw that all 3 files existed for the 3 similar commands, but were only causing an error for one.
No, I never said that it had anything to do with that. Read more carefully. I meant that the FM commands only take a negligible amount of time and thus aren't worth worrying about how much time they take.
Tell that to the people who wrote the SB functional test this was simplified from (written by Mike Yang, with later changes by Keegan). Do we need to open a ticket to reformulate Mike and Keegan's SB functional test to not use any CFS apps? There have been discussions in the past about whether or not it's okay to use other apps in tests for an app. I recall that the conclusions were that if there's no other straightforward way then that's what needs to be done. I don't remember if those discussions considered the separation of CFE vs CFS, but they may have, and the crossover exists in at least one existing test (SB), and probably other tests.
Yes, these aren't needed and clearly should be removed.
I did need to update and rebuild cFS yesterday, because the TBL checkout test I was developing was getting the "no working buffers" error that had been recently discussed on Teams. That fixed the "no working buffers" error. I'm in the process now of seeing if I can get the SB checkout test working without the FM commands, after updating cFS. |
Files written into the /cf/ directory stick around forever until manually deleted, even between resets. For checkout tests, is it okay to assume that a custom filename hasn't already been created? Will the workflow these will run under reset the /cf/ directory when called for the checkout test suite? I could change it to write into /ram/ instead, but that would still require the FSW to have been reset since the last time this test was run - is that a reasonable thing to assume has already happened? |
I ran all of the command multiple times with the same file names for both. I saw no error for the command you specified, even when using the same filename. that's why I asked what version you were using. a make distclean would remove all files so if there were locks on a file that should have been removed as well.
You said it only takes .15 seconds, implying that the time doesn't matter. I'm saying the time is not the issue with these comments. The test can NOT rely on apps outside of the cFE. that is the issue with having file manager commands in an SB CHECKOUT test.
You were assigned the task of creating a checkout test for the app. The previous test should have nothing to do with this other than a baseline of what commands are available and how to format them. It was up to you to determine the proper parameters for the checkout test. Which is supposed to be an isolated test of a single app's command acceptance that runs fast. I have provided the comments to tell you that what has been done is not correct and needs changed. The other test will be refactored later. I don't know why it would matter what someone else wrote in a completely different test with completely different goals and trajectory.
There may be exceptions in other tests, but these particular tests need to rely only on themselves or cFE. Going forward if a future test or refactor needs to send commands to other cFS apps that will need protected from trying to execute that portion in the event that app is not present. If commanding changes to another app the Sample_app should be used whenever possible. We have to limit the dependance on cFS apps to an absolute minimum because theese tests can and will be run in systems that do not contain the app it is dependent on. All that is required to run 1 cFS is the cFE, therefor we can only rely on the cFE and the app that is being tested. the Sample_app is the first go-to as it is a model for howto build a cFS app and is easy to integrate.
Make sure to pull the current dev branch from https://github.com/nasa/cFS. |
The checkout tests will be run primarily in a git runner. so the system will be clean every run. That's why I don't care about any cleanup around these tests. the file existing already did not matter for me when I ran all 3 commands. I was able to send them each multiple times back to back and they were accepted every time. |
…ity with latest changes to cFS and COSMOS files
No description provided.