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

long lines confuse PHD's serial listener #773

Open
iximeow opened this issue Oct 1, 2024 · 1 comment
Open

long lines confuse PHD's serial listener #773

iximeow opened this issue Oct 1, 2024 · 1 comment
Assignees
Labels
testing Related to testing and/or the PHD test framework.

Comments

@iximeow
Copy link
Member

iximeow commented Oct 1, 2024

at least, it's extremely likely it's carriage returns that come with long lines, something to that effect.

#756 landed with this kind of hokey workround: when writing a very long line to a guest, PHD would appear to hang. it's certainly that PHD is waiting for the guest to echo back what it wrote, but the guest wrote \r\n and the expected character is just a bit beyond that.

whatever it is, this really ought to be fixed in PHD, rather than a one-off helper in boot_order.rs.

@iximeow iximeow added the testing Related to testing and/or the PHD test framework. label Oct 1, 2024
@iximeow iximeow self-assigned this Oct 1, 2024
@iximeow
Copy link
Member Author

iximeow commented Nov 11, 2024

i did eventually take a look at doing something... better here, the options don't seem great.

theoretically there is a dumb or vanilla terminal type that should have ~infinite (65535?) columns, and so we'd practically never line wrap. that would be convenient. in practice Linuxes don't seem to like this much on PTYs for reasons i haven't dug into.

we can stty a very wide terminal, and we can put that in .profile or somewhere in guests so it's automatically set on boot, or include it as part of the login sequence. this works well for Linux guests! as in, it would be perfect. but somewhere between Windows, the SAC, and Cygwin, this doesn't actually take effect for Windows guests, so they still send control characters once you hit 80 columns

we can emulate receiving text as an 80 column terminal instead of just prefix matching on waits here. that is, when we get a new line of text we'd un-wrap it if we have read 80 characters since the last newline and then try to find the right strings int hat unwrapped buffer. this will probably work as long as guests think they are driving a terminal exactly 80 characters wide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Related to testing and/or the PHD test framework.
Projects
None yet
Development

No branches or pull requests

1 participant