-
Notifications
You must be signed in to change notification settings - Fork 215
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
Linux BSP shouldn't trim first argument #499
Comments
see also nasa/cFS#86 |
jphickey
added a commit
to jphickey/osal
that referenced
this issue
Jun 12, 2020
jphickey
added a commit
to jphickey/osal
that referenced
this issue
Jun 12, 2020
Keep the entire argc/argv from the shell. Do not prune the command name as getopt expects this to be there.
Thanks, I missed this previous bug report on the issue. Otherwise I would have fixed it earlier... |
astrogeco
added a commit
that referenced
this issue
Jun 23, 2020
Fix #499, store all arguments in generic-linux BSP
jphickey
pushed a commit
to jphickey/osal
that referenced
this issue
Aug 10, 2022
Partial fix (see also nasa#545), comments/documentation only
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: