Bug 836231 - Improve error message when set wrong bool value in init file
Improve error message when set wrong bool value in init file
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-top (Show other bugs)
6.3
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-28 08:44 EDT by yuping zhang
Modified: 2016-08-23 13:55 EDT (History)
6 users (show)

See Also:
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 13:55:49 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 yuping zhang 2012-06-28 08:44:23 EDT
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 03:17:07 EDT
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 Product and Program Management 2013-10-13 20:35:17 EDT
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 13:55:49 EDT
We're not going to fix this for RHEL 6, so closing.

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