Skip to content

[textinput] Only force tty output when stdout is redirected - #23039

Open
guitargeek wants to merge 1 commit into
root-project:masterfrom
guitargeek:followup-22948
Open

[textinput] Only force tty output when stdout is redirected#23039
guitargeek wants to merge 1 commit into
root-project:masterfrom
guitargeek:followup-22948

Conversation

@guitargeek

Copy link
Copy Markdown
Contributor

ec7998a made the display claim tty mode whenever /dev/tty could be opened, instead of only when stdout is not a terminal. The prompt was then printed even when IsInteractive() said otherwise, which broke roottest-root-rint-TabCom: its pty has no session leader, so the display is not interactive, but the "root [N]" prompts leaked into the output.

/dev/tty is the controlling terminal of the process, which is unrelated to the pty the test writes to. The test therefore only failed when ctest was run from a terminal, and the CI stayed green.

Restore the original condition, and query stdout for the terminal size whenever it is a terminal.

🤖 Done with the help of AI.

Follows up on:

@guitargeek guitargeek self-assigned this Aug 6, 2026
@guitargeek
guitargeek marked this pull request as draft August 6, 2026 13:24
@guitargeek
guitargeek marked this pull request as ready for review August 6, 2026 13:26
ec7998a made the display claim tty mode whenever /dev/tty could be
opened, instead of only when stdout is not a terminal. The prompt was
then printed even when IsInteractive() said otherwise, which broke
roottest-root-rint-TabCom: its pty has no session leader, so the display
is not interactive, but the "root [N]" prompts leaked into the output.

/dev/tty is the controlling terminal of the process, which is unrelated
to the pty the test writes to. The test therefore only failed when ctest
was run from a terminal, and the CI stayed green.

Restore the original condition, and query stdout for the terminal size
whenever it is a terminal.

🤖 Done with the help of AI.
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 15h 2m 20s ⏱️
 3 853 tests  3 852 ✅ 0 💤 1 ❌
79 408 runs  79 406 ✅ 1 💤 1 ❌

For more details on these failures, see this check.

Results for commit e363723.

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.

1 participant