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

shell-test does not appear to work on VxWorks #939

Closed
jphickey opened this issue Mar 31, 2021 · 2 comments · Fixed by #940 or #956
Closed

shell-test does not appear to work on VxWorks #939

jphickey opened this issue Mar 31, 2021 · 2 comments · Fixed by #940 or #956
Assignees
Labels
bug unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Milestone

Comments

@jphickey
Copy link
Contributor

Describe the bug
The "shell-test" program attempts to run the following command:

echo -n "ValueToEchoInTheFile"

But this does not appear to work correctly on VxWorks 6.9. The test reports:

[ FAIL] 01.005 shell-test.c:83 - Read: 
echo -n "ValueToEch, Written: ValueToEchoInTheFile

To Reproduce
Enable shell and run "shell-test" on MCP750

Expected behavior
Test should pass

System observed on:
MCP750 VxWorks 6.9

Additional context
I'm not familiar enough with VxWorks, it seems the interactive shell does not even have an "echo" command so I am not sure how this is expected to work to begin with.

If run directly on the shell as a test, I get:

-> echo -n "ValueToEchoInTheFile"
C interp: unknown symbol name 'echo'.

So it is not clear to me how this is expected to work.

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey added the bug label Mar 31, 2021
@jphickey
Copy link
Contributor Author

Although this is a "bug" - since shell functionality is typically disabled by default it is not clear how much of a priority this is. In the default config the shell function returns OS_ERR_NOT_IMPLEMENTED and the test is skipped so there is no issue. One has to re-enable shell and set other non-default parameters just to get to the point where this happens.

@skliper skliper added the unit-test Tickets related to the OSAL unit testing (functional and/or coverage) label Mar 31, 2021
@skliper skliper added this to the 6.0.0 milestone Mar 31, 2021
@jphickey jphickey self-assigned this Apr 1, 2021
@jphickey
Copy link
Contributor Author

jphickey commented Apr 1, 2021

I think I have a idea of what's going on here....

jphickey added a commit to jphickey/osal that referenced this issue Apr 1, 2021
The shell may add extra output beyond the intended content, but the
shell-test was only looking for exact match.  Extra output may
include whitespace and/or an echo of the command itself.

This reworks the shell test to allow for this extra output, as long
as the intended string appears in the content of the file it will
pass.
jphickey added a commit to jphickey/osal that referenced this issue Apr 1, 2021
The shell may add extra output beyond the intended content, but the
shell-test was only looking for exact match.  Extra output may
include whitespace and/or an echo of the command itself.

This reworks the shell test to allow for this extra output, as long
as the intended string appears in the content of the file it will
pass.
astrogeco added a commit that referenced this issue Apr 12, 2021
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
Fix nasa#56, Refactor CDS to use generic pool implementation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants