Bug 989455 - qemu should quit with friendly prompt when use invalid number of vcpus
qemu should quit with friendly prompt when use invalid number of vcpus
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.5
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: Virtualization Maintenance
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-29 06:02 EDT by Sibiao Luo
Modified: 2013-07-31 22:46 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-30 09:46:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sibiao Luo 2013-07-29 06:02:35 EDT
Description of problem:
as subject.

Version-Release number of selected component (if applicable):
host info:
2.6.32-402.el6.x86_64
qemu-kvm-0.12.1.2-2.381.el6.x86_64
seabios-0.6.1.2-28.el6.x86_64
guest info:
2.6.32-402.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.specify the vcpu number to zero.
# /usr/libexec/qemu-kvm -S -M rhel6.5.0 -cpu Haswell -enable-kvm -m 4096 -smp *0* -vnc :1 -monitor stdio
QEMU 0.12.1 monitor - type 'help' for more information
(qemu) info cpus
* CPU #0: pc=0x00000000fffffff0 thread_id=20579 
(qemu) q
2.specify the vcpu number to 1.
# /usr/libexec/qemu-kvm -S -M rhel6.5.0 -cpu Haswell -enable-kvm -m 4096 -smp *1* -vnc :1 -monitor stdio
QEMU 0.12.1 monitor - type 'help' for more information
(qemu) info cpus
* CPU #0: pc=0x00000000fffffff0 thread_id=20582 
(qemu) q
3.specify the vcpu number to a float type.
# /usr/libexec/qemu-kvm -S -M rhel6.5.0 -cpu Haswell -enable-kvm -m 4096 -smp *2.9* -vnc :1 -monitor stdio
QEMU 0.12.1 monitor - type 'help' for more information
(qemu) info cpus
* CPU #0: pc=0x00000000fffffff0 thread_id=20587 
  CPU #1: pc=0x00000000fffffff0 (halted) thread_id=20588 
(qemu) q
4.specify the vcpu number to a negative number.
# /usr/libexec/qemu-kvm -S -M rhel6.5.0 -cpu Haswell -enable-kvm -m 4096 -smp *-1* -vnc :1 -monitor stdio
Invalid number of CPUs

Actual results:
after step 1-3, qemu are ok. 
after step 4, qemu quit with prompt, like: Invalid number of CPUs. 

Expected results:
Qemu should quit with friendly prompt when use invalid number of vcpus(e.g: zero, negative number, float type)

Additional info:
Comment 1 Sibiao Luo 2013-07-29 06:13:20 EDT
If specify the vcpu number to a string, qemu also ok.

# /usr/libexec/qemu-kvm -S -M rhel6.5.0 -cpu Haswell -enable-kvm -m 4096 -smp a -vnc :1 -monitor stdio
QEMU 0.12.1 monitor - type 'help' for more information
(qemu) info cpus
* CPU #0: pc=0x00000000fffffff0 thread_id=20939 
(qemu) q

# /usr/libexec/qemu-kvm -S -M rhel6.5.0 -cpu Haswell -enable-kvm -m 4096 -smp aaaaaa -vnc :1 -monitor stdio
QEMU 0.12.1 monitor - type 'help' for more information
(qemu) info cpus
* CPU #0: pc=0x00000000fffffff0 thread_id=20951 
(qemu) q

Note You need to log in before you can comment on or make changes to this bug.