Red Hat Bugzilla – Bug 988700
"invalid char in expression" is not very friendly when use float type to set qemu i/o throttle
Last modified: 2013-08-01 09:27:34 EDT
# /usr/libexec/qemu-kvm -cpu SandyBridge -enable-kvm -m 4096 -smp 4,sockets=2,cores=2,threads=1 -no-kvm-pit-reinjection -name sluo -uuid 43425b70-86e5-4664-bf2c-3b7669918bac -rtc base=localtime,clock=host,driftfix=slew -device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=pci.0,addr=0x3 -drive file=/home/RHEL-Server-6.4-64-virtio.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop,serial="QEMU-DISK1" -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-system-disk,id=system-disk,bootindex=1 -device virtio-balloon-pci,id=ballooning,bus=pci.0,addr=0x5 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=2C:41:38:B6:41:21,bus=pci.0,addr=0x6,bootindex=2 -k en-us -boot menu=on -qmp tcp:0:4444,server,nowait -serial unix:/tmp/ttyS0,server,nowait -vnc :1 -spice port=5931,disable-ticketing -monitor stdio
(qemu) block_set_io_throttle drive-system-disk 9999999.999 0 0 0 0 0
invalid char in expression
This is not a bug. bps needs a integer value and 9999999.999 is not one. The dot is an invalid char as the parameter.
(In reply to Fam Zheng from comment #2)
> This is not a bug. bps needs a integer value and 9999999.999 is not one. The
> dot is an invalid char as the parameter.
yes, but this bug is just for the prompt 'invalid char in expression' which is not friendly. QEMU should disable and prompt that cannt use float type value, that's a expected result.
Not being friendly doesn't mean it's a bug, the information is correct and expected by what we have now. And it is not a io throttling specific logic, it's about hmp command line parsing, and applies to any HMP command that takes a integer as argument.
I agree the message can be improved and more friendly, if you feel it's desirable, please file another request for enhancement for HMP interface, so someone can invest in it later, if it's reasonable and worthwhile.
(In reply to Fam Zheng from comment #4)
> Not being friendly doesn't mean it's a bug, the information is correct and
> expected by what we have now. And it is not a io throttling specific logic,
> it's about hmp command line parsing, and applies to any HMP command that
> takes a integer as argument.
OK, that's make sense, it's HMP command uses a different parser.
> I agree the message can be improved and more friendly, if you feel it's
> desirable, please file another request for enhancement for HMP interface, so
> someone can invest in it later, if it's reasonable and worthwhile.
What's do you think it's worth to fix? we can fix a bug if yes.
Let's agree it's a bug in HMP (actually a request for improvement) but I don't think it's worth fixing.
We don't support HMP and the error message is not that bad, so I'm marking it WONTFIX.