Bug 836231

Summary: Improve error message when set wrong bool value in init file
Product: Red Hat Enterprise Linux 6 Reporter: yuping zhang <yupzhang>
Component: virt-topAssignee: Richard W.M. Jones <rjones>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: cwei, jwu, mjenner, mzhan, rbalakri, tzheng
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: virt-top-1.0.4-3.14.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-23 17:55:49 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:

Description yuping zhang 2012-06-28 12:44:23 UTC
Description of problem:
Set a wrong string in init file,the virt-top exit without pop up 
meaningful error message.

Version-Release number of selected component (if applicable):
virt-top-1.0.4-3.13.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.Create a init file like this :
# cat ~/.virt-toprc
# .virt-toprc virt-top configuration file
# generated on 2011-08-31 03:57:48 by root

delay 5
sort id
connect qemu:///system
csv-cpu true
script false
stream false
block-in-bytes true
end-time +20

# To send debug and error messages to a file, uncomment next line
debug virt-top.out

# Enable CSV output to the named file
csv virt-top.csv

# To protect this file from being overwritten, uncomment next line
#overwrite-init-file false

2. Change the line "csv-cpu true"  to "csv-cpu ture".

3.Run virt-top
#virt-top

Actual results:
# virt-top
Fatal error: exception Invalid_argument("bool_of_string")
# echo $?
2

Expected results:
Give meaningful error message,for example,the line content, invalid 
argument or something like that.

Additional info:

Comment 2 yuping zhang 2012-09-29 07:17:07 UTC
Test this issue with virt-top-1.0.4-3.14.el6.x86_64.

Test this issue with steps in description.
In step3:
# virt-top
/root/.virt-toprc: could not parse 'ture' in init file: expecting true|false[root@5-10-yuping ~]# 

The error message updated.But there is no return after the error message.It will display like above. 

And I found if there is a space before one line,then run virt-top:
# cat .virt-toprc
 # .virt-toprc virt-top configuration file
 # generated on 2011-08-31 03:57:48 by root

              delay 5
 ....

# virt-top
/root/.virt-toprc:4: configuration item ``'' ignored
virt-top will run successfully,but the error message still need to be updated.

I found the punctuation in error message is ``'',for example:
#virt-top
/root/.virt-toprc:5: configuration item ``ort'' ignored
I think maybe it should be "" or '',not ``''.

So I change the bug status to ASSIGNED.

Comment 4 RHEL Program Management 2013-10-14 00:35:17 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 5 Richard W.M. Jones 2016-08-23 17:55:49 UTC
We're not going to fix this for RHEL 6, so closing.