-
Notifications
You must be signed in to change notification settings - Fork 253
Description
Describe the bug
As part of command line processing the logic for Linux BSP is to prune the first argument which is the command name, to be consistent with other (e.g. RTEMS) platforms that do not pass the command name to begin with.
However the CFE PSP passes the argument list to the C library getopt_long() and this expects the first argument to be the command name, so this breaks.
To Reproduce
Pass arguments (e.g. `-I' to set spacecraft ID value, etc) to start the CFE core on linux. Observe that the default value is still used, argument isn't processed.
Expected behavior
Command line arguments should be processed and used.
Just store/pass the full set of arguments, no real need to abstract, as anything doing argument processing is almost certainly platform-specific (e.g. CFE PSP) so it will know what to expect here.
System observed on:
Ubuntu 20.04
Additional context
First bug found by newly-minted PSP functional test. I attempted to use -I to force a test failure on the spacecraft ID value and it didn't work.
Reporter Info
Joseph Hickey, Vantage Systems, Inc.