-
Notifications
You must be signed in to change notification settings - Fork 243
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
bracketed-paste default breaks tests #3116
Comments
Maybe the solution doesn't lie in changing the code but rather documentation and the jeos builds that are downloaded per default? What do you think, @chunfuwen @dzhengfy @ldoktor ?
|
Hello guys, thank you for spotting and addressing this. While reading this I noticed our |
Bash 5.1/libread 8.1 seemingly have opted for enabling 'bracketed-paste' per default. (Refer for example to pexpect issue pexpect/pexpect#669.)
This leads to control sequences being written to aexpects ShellSession.
E.g. for a running libvirt vm:
Therefore,
cmd_status_output
raises aShellStatusError
("Could not get exit status of command") in https://github.com/avocado-framework/aexpect/blob/master/aexpect/client.py#L1267As suggested by @huth, by setting
export TERM=dumb
after successful login (vm.wait_for_login
) this behavior can be suppressed:I don't think setting
TERM=dumb
should be added in each failing test due to this after thevm.wait_for_login()
call.I don't know if this should be fixed in aexpect but maybe it makes more sense that aexpect still allows for control characters to be read per default because there might be test scenarios where this would be important?
Maybe we could solve this by adding a new flag to the
virt_vm.wait_for_login
method so thatexport TERM=dumb
is executed before the method returns the session to the caller (bothqemu_kvm
andlibvirt_vm
inherit that method)? https://github.com/avocado-framework/avocado-vt/blob/master/virttest/virt_vm.py#L1152As control characters have now become breaking the default behavior should better be to set the
TERM
always, if I'm not missing anything.So, something like the following could work:
When I played around with this the control characters were not shown in an ssh session within the
ShellSession
object, therefore, https://github.com/avocado-framework/avocado-vt/blob/master/virttest/virt_vm.py#L1218 might not need this.The text was updated successfully, but these errors were encountered: