This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Bump the amount of characters printed on pexpect failures from 100 to 2000
Needs ReviewPublic

Authored by teemperor on Jul 27 2021, 6:31 AM.

Details

Summary

Right now when pexpect fails to find the search string in the output/buffer it just prints the last 100 characters.
Given that the usual pexpect terminal has the dimensions 24/80 (=1920 characters) this isn't enough to diagnose
bot failures with the curses UI which can repaint larger parts of the UI on every update.

This patch patches our embedded pexpect to print the last 2000 characters on failure as it seems this limit is hardcoded.

Diff Detail

Event Timeline

teemperor requested review of this revision.Jul 27 2021, 6:31 AM
teemperor created this revision.

Note that all the GUI tests spawn a terminal of dimensions (100, 500), not the default (24,80). And I am guessing this includes the control characters as well. So even 2000 may not be enough even.

Note that all the GUI tests spawn a terminal of dimensions (100, 500), not the default (24,80). And I am guessing this includes the control characters as well. So even 2000 may not be enough even.

Good point. I guess those values are just used because the original GUI test used that terminal size? I don't think I had any particular reason to choose something as big as 100/500 beside making it big enough to avoid truncating any content. That size actually made it kinda awkward to replay the output buffer.