RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 598771 - guestfish 'help' command should indicate error in exit status with an unknown command
Summary: guestfish 'help' command should indicate error in exit status with an unknown...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs
Version: 6.1
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 597145 598772
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-02 02:14 UTC by Jinxin Zheng
Modified: 2010-11-10 21:02 UTC (History)
4 users (show)

Fixed In Version: libguestfs-1.2.7-1.11.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 597145
Environment:
Last Closed: 2010-11-10 21:02:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jinxin Zheng 2010-06-02 02:14:25 UTC
+++ This bug was initially created as a clone of Bug #597145 +++

Description of problem:
Issueing the 'help' command in guestfish with an unknown command name exits 
with a 0 exit code.

Version-Release number of selected component (if applicable):
guestfish 1.3.17

How reproducible:
Always

Steps to Reproduce:
1. guestfish help foo
2. echo $?
3.
  
Actual results:
the exit status of guestfish is 0

Expected results:
supposed to be some other than 0 to indicate an error.

Additional info:
I wanted to use help to test the availability of some new commands in a script, 
finding that it's impossible to determine only from the exit status of guestfish.
Therefore I must test the stderr in order to work the result out.

--- Additional comment from rjones on 2010-06-01 11:31:26 EDT ---

Patch posted upstream:
https://www.redhat.com/archives/libguestfs/2010-June/msg00013.html

Please clone this bug if you want this in RHEL 5/6.  It's a relatively
simple change to backport.

Comment 2 Richard W.M. Jones 2010-06-03 08:56:54 UTC
Scratch build for RHEL 6 here:
https://brewweb.devel.redhat.com/taskinfo?taskID=2489956

I have tested this build on RHEL 6 and it works.

Patch posted and ACKed here:
http://post-office.corp.redhat.com/archives/rhvirt-patches/2010-June/msg00061.html

Comment 3 RHEL Program Management 2010-06-07 16:01:48 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 8 Jinxin Zheng 2010-07-16 05:09:42 UTC
# guestfish help launch >/dev/null 
# echo $?
0

# guestfish help help >/dev/null 
# echo $?
0

# guestfish help blahblah >/dev/null 
blahblah: command not known, use -h to list all commands
# echo $?
1

guestfish help with non-existent command returns with the exit status 1, so move this bug to VERIFIED.

Comment 9 releng-rhel@redhat.com 2010-11-10 21:02:57 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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