Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-67164

"pcp xsos unknown_arg" does not return proper exit code

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • rhel-10.0
    • rhel-9.6, rhel-10.0
    • pcp
    • None
    • pcp-6.3.2-2.el10
    • No
    • Low
    • 1
    • rhel-sst-pt-pcp
    • ssg_platform_tools
    • 21
    • 2
    • QE ack, Dev ack
    • False
    • Hide

      None

      Show
      None
    • No
    • Red Hat Enterprise Linux
    • PCP Sprint 13
    • Unspecified Release Note Type - Unknown
    • All
    • None

      What were you trying to do that didn't work?

      This is a follow-up of RHEL-56836. When pcp-xsos is run with an invalid argument, it correctly returns an error message (since pcp-6.3.2-1 build). However the exit/return code is "0". Similar utilities (like pcp-atop ) returns in such a situation an error code "1".

      What is the impact of this issue to you?

      If the pcp-xsos is used in a script, the invalid command seems to succeed even it failed.

      Please provide the package NVR for which the bug is seen:

      • pcp-6.3.2-1.el10
      • pcp-6.3.2-1.el9

      How reproducible is this bug?

      Always

      Steps to reproduce

      1.  Install pcp-zeroconf
        # yum install -y pcp-zeroconf
        
      2.  Run the pcp-xsos with an invalid argument
        # pcp xsos unknown_arg
        
      3. Check the error code
        # echo $?
        

      Expected results

      The returned error code is != 0

      Actual results

      The returned error code == 0

              nathans@redhat.com Nathan Scott
              jkurik@redhat.com Jan Kurik
              pcp-maint pcp-maint
              Jan Kurik Jan Kurik
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: