Bug 696964

Summary: spicec exits with wrong return code (when --host is missing)
Product: Red Hat Enterprise Linux 6 Reporter: Michal Haško <mhasko>
Component: spice-clientAssignee: Uri Lublin <uril>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1CC: acathrow, dblechte, lkocman, mkenneth, pslavice
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spice-client-0.8.2-1.el6 Doc Type: Bug Fix
Doc Text:
Cause + Consequence When running spice-client without --host command line option, it shows an error message and exit with exit-status 0. Fix+Result When running spice-client without --host command line option, make spice-client exit with non-0 exit status (SPICEC_ERROR_CODE_CMD_LINE_ERROR == 14).
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 15:22:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Haško 2011-04-15 12:39:29 UTC
Description of problem:
When spicec is called without arguments, it exits with 0 return code, however an error message is displayed:

+=====================+===================================+=============+
| CALL                | ERROR MESSAGE                     | RETURN CODE |
+=====================+===================================+=============+
| spicec              | spicec: missing --host            | 0           |
+---------------------+-----------------------------------+-------------+
| spicec -h localhost | spicec: missing --port or --sport | 14          |
+---------------------+-----------------------------------+-------------+

Version-Release number of selected component (if applicable):
spice-client-0.8.0-2.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
$ spicec &> /dev/null; echo $?
  
Actual results:
0

Expected results:
14

Comment 2 Michal Haško 2011-05-10 09:35:36 UTC
Moreover, '$ spicec -p 3000' exits with 0

Comment 3 Michal Haško 2011-05-10 09:43:51 UTC
And '$ spicec -s 4000' exits with 0 as well

Comment 8 RHEL Program Management 2011-06-01 09:20:18 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.

Comment 11 Lubos Kocman 2011-10-07 10:59:08 UTC
Verified on spice-client-0.8.2-7.el6.x86_64

[lkocman@dhcp-29-219 Desktop]$ spicec -h manager.spice
spicec: missing --port or --sport
[lkocman@dhcp-29-219 Desktop]$ echo $?
14
[lkocman@dhcp-29-219 Desktop]$ spicec -s 3001
spicec: missing --host
[lkocman@dhcp-29-219 Desktop]$ echo $?
14
[lkocman@dhcp-29-219 Desktop]$ spicec -p 3001
spicec: missing --host
[lkocman@dhcp-29-219 Desktop]$ echo $?
14
[lkocman@dhcp-29-219 Desktop]$ spicec 
spicec: missing --host
[lkocman@dhcp-29-219 Desktop]$ echo $?
14

Comment 12 Uri Lublin 2011-11-20 12:30:55 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause + Consequence
  When running spice-client without --host command line option, it shows an error message and exit with exit-status 0.

Fix+Result
  When running spice-client without --host command line option, make spice-client exit with non-0 exit status (SPICEC_ERROR_CODE_CMD_LINE_ERROR == 14).

Comment 13 errata-xmlrpc 2011-12-06 15:22:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1518.html