Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1263560

Summary: It will print many new lines if input a long monitor command till second line
Product: Red Hat Enterprise Linux 7 Reporter: Xujun Ma <xuma>
Component: qemu-kvm-rhevAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED WONTFIX QA Contact: Yiqian Wei <yiwei>
Severity: low Docs Contact:
Priority: low    
Version: 7.2CC: hannsj_uhl, huding, jinzhao, juzhang, knoel, michen, qzhang, virt-maint, xfu, xuma, zhengtli
Target Milestone: rc   
Target Release: 7.5   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-14 12:47:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1444027    

Description Xujun Ma 2015-09-16 07:31:28 UTC
Description of problem:
It will print many new lines if you input monitor command beyong a line.

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.3.0-22.el7.ppc64le

How reproducible:
100%

Steps to Reproduce:
1.Boot a guest with command:
/usr/libexec/qemu-kvm -monitor stdio -vnc 0:59

2.Input some letter beyong a line 


Actual results:
It will print a new line if you input one letter at second line. 

Expected results:
Does't print new line when input command letter at second line.

Additional info:

Comment 2 Gerd Hoffmann 2015-09-25 12:14:48 UTC
Hmm, yes, the line editor could be a bit more clever when it comes to long lines.  But monitor commands are usually short, is that an actual problem in practice?

Comment 3 Xujun Ma 2015-09-28 08:30:37 UTC
Yes,most of the time,the monitor commands we used are short.But sometimes,I used multiplex terminal like tmux to test several guests at the same time,and every terminal is so small that i can't input a normal command as "hot plug" disk with a long path. It's hard to use if user use a small size terminal,so it will be better to use if the issue is fixed.

Comment 5 Gerd Hoffmann 2017-01-10 08:52:37 UTC
(In reply to Gerd Hoffmann from comment #2)
> Hmm, yes, the line editor could be a bit more clever when it comes to long
> lines.

Well, not as easy as I expected.  The readline code doesn't know how many cols the terminal has.  It simply handles things with "jump to start of line" and "clear current line" terminal control sequences.  Which works fine as long as the command fits at one line.  There is no easy way to fix this without a rework of the readline code though.

Comment 6 Gerd Hoffmann 2017-01-10 08:54:46 UTC
(In reply to Xujun Ma from comment #3)
> Yes,most of the time,the monitor commands we used are short.But sometimes,I
> used multiplex terminal like tmux to test several guests at the same
> time,and every terminal is so small that i can't input a normal command as
> "hot plug" disk with a long path. It's hard to use if user use a small size
> terminal,so it will be better to use if the issue is fixed.

tmux supports vertical terminal splits (tmux split-window -v), so you can have multiple terminals in a single window and still have long lines ...

Comment 7 Gerd Hoffmann 2017-01-10 08:55:47 UTC
Defering for 7.5 for now, but I consider this a close/wontfix candidate.