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

Wait for SSH command to complete after execution #16

Merged
merged 4 commits into from
Mar 13, 2024
Merged

Conversation

acerv
Copy link
Collaborator

@acerv acerv commented Mar 13, 2024

This patch resolves a problem that started to show up when fast commands, such as 'cat', were executed on target. The original code was killing the command once we faced a return_value == None. This is obviously wrong and it probably comes from multiple SSH module implementations.

The right thing to do is to wait for the process completion, once we finish to read stdout. In this way, return_value will be != None and we can process fast commands execution.

@acerv acerv added the bug Something isn't working label Mar 13, 2024
This patch fixes a documentation issue with the SSH module, where
reset command is saved as `reset_command` but it's `reset_cmd`.
This parameter has been introduced long time ago and never removed after
being replaced by --suite-timeout and --test-timeout parameters, which
are using asyncio features instead.
This patch resolves a problem that started to show up when fast commands,
such as 'cat', were executed on target. The original code was killing
the command once we faced a return_value == None. This is obviously wrong
and it probably comes from multiple SSH module implementations.

The right thing to do is to wait for the process completion, once we
finish to read stdout. In this way, return_value will be != None and we
can process fast commands execution.
@acerv acerv merged commit cf0680d into master Mar 13, 2024
24 checks passed
@acerv acerv deleted the tainted_flag branch March 14, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant