Skip to content

fix: discard unconsumed rshell server output - #53

Open
abaczek wants to merge 2 commits into
stack/rshell-pr45from
fix/rshell-discard-output
Open

abaczek wants to merge 2 commits into
stack/rshell-pr45from
fix/rshell-discard-output

Conversation

@abaczek

@abaczek abaczek commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Discard stdout and stderr when RShellConnection starts its local server, avoiding blocked writes to unread pipes.
  • Keep command results on the HTTP API; report startup failures without reading discarded streams.
  • Document the diagnostic-output tradeoff and cover both streams with a real-process regression test.

Dependency and combined testing

Depends on #45. The base branch stack/rshell-pr45 mirrors the updated head of #45 so this PR shows only the output-discard change. The head branch contains both fixes.

To test both changes together:

python -m pip install --upgrade "git+https://github.com/intel/mfd-connect.git@fix/rshell-discard-output"

Use the updated rshell_client.py from this branch on the target. Output discard applies to servers automatically started by RShellConnection; manually started servers retain their chosen output configuration.

After #45 is merged, retarget this PR to main before merging it. Do not merge it into the staging base branch.

Validation

  • 103 RShell tests passed, including server, client, module startup and a subprocess writing 1 MiB to each output stream without readers.
  • mfd-code-standard passed (Ruff formatting and lint checks).

Signed-off-by: Arkadiusz Baczek <86051266+abaczek@users.noreply.github.com>
@coveralls-official

coveralls-official Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Coverage Status

Coverage is 81.064% — fix/rshell-discard-output into stack/rshell-pr45. No base build found for stack/rshell-pr45.

@mfd-intel-bot

Copy link
Copy Markdown
Contributor

We don't publish DEVs .whl.
To build .whl, run 'pip install git+https://github.com/intel/mfd-connect@fix/rshell-discard-output'

Signed-off-by: Arkadiusz Baczek <86051266+abaczek@users.noreply.github.com>
@abaczek

abaczek commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Fixed a teardown regression in this PR: stop_server() still tried to read stdout_text after stdout/stderr had been discarded. Successful test execution could therefore be followed by RemoteProcessStreamNotAvailable during disconnect.

Removed the obsolete stdout logging after shutdown. Extended the real-process regression to exercise disconnect(stop_client=True, stop_server=True), and made the shutdown unit test reject any stdout/stderr access. Both tests reproduce the original failure with the previous implementation; all 103 RShell tests and mfd-code-standard pass with the fix.

The fix is on the same fix/rshell-discard-output branch; new builds using that dependency will include it.

@a-gorczew

Copy link
Copy Markdown
Contributor

@abaczek Please capitalize the commit title.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants