Bug 696964 - spicec exits with wrong return code (when --host is missing)
Summary: spicec exits with wrong return code (when --host is missing)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: spice-client
Version: 6.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Uri Lublin
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-15 12:39 UTC by Michal Haško
Modified: 2015-03-02 03:59 UTC (History)
5 users (show)

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).
Clone Of:
Environment:
Last Closed: 2011-12-06 15:22:20 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1518 0 normal SHIPPED_LIVE libcacard and spice-client bug fix and enhancement update 2011-12-06 00:50:43 UTC

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


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