[Bug 1616596] 0001-ziomon-Use-exit-code-0-for-version-and-help.patch
bugproxy
bugproxy at us.ibm.com
Tue Sep 6 12:50:14 UTC 2016
------- Comment on attachment From michael.holzheu at de.ibm.com 2016-09-06 08:39 EDT-------
[PATCH] ziomon: Use exit code 0 for --version and --help
Besides of this also unify the exit codes for help in case of wrong
number of parameters:
# /usr/sbin/ziomon_util
Usage: ziomon_util [-h] [-v] [-V] [-i n] [-s n] [-Q <msgq_path> ...
# echo $?
255
# /usr/sbin/ziomon_mgr
Usage: ziomon_util [-h] [-v] [-V] [-i n] [-s n] [-Q <msgq_path> ...
# echo $?
0
With this patch we use exit code 1 (EXIT_FAILURE) in this case:
# ./ziomon_util
Usage: ziomon_util [-h] [-v] [-V] [-i n] [-s n] [-Q <msgq_path> ...
# echo $?
1
Signed-off-by: Michael Holzheu <holzheu at linux.vnet.ibm.com>
** Attachment added: "0001-ziomon-Use-exit-code-0-for-version-and-help.patch"
https://bugs.launchpad.net/bugs/1616596/+attachment/4735495/+files/0001-ziomon-Use-exit-code-0-for-version-and-help.patch
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to s390-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1616596
Title:
ziomon_util: Unexpected return code
Status in Ubuntu on IBM z Systems:
Confirmed
Status in s390-tools package in Ubuntu:
Confirmed
Bug description:
$ lsb_release -rd
Description: Ubuntu 16.04 LTS
Release: 16.04
$ apt-cache policy s390-tools
s390-tools:
Installed: 1.34.0-0ubuntu8.1
Candidate: 1.34.0-0ubuntu8.1
When benign options such as --help or --version are passed to ziomon_util the expected output is printed but the return code is non-zero. The unexpected return code is shown here:
ubuntu at s5lp1-gen01:~$ ziomon_util --help
Usage: ziomon_util [-h] [-v] [-V] [-i n] [-s n] [-Q <msgq_path> -q <msgq_id>
-m <msg_id>] -d n -a <n> -l <lun>
Start the monitor for the host adapter utilization.
Example: ziomon_util -d 60 -i 4 -a 0
-h, --help Print usage information and exit.
-v, --version Print version information and exit.
-V, --verbose Be verbose.
-s, --sample-length Duration between each sample in seconds.
Defaults to 2 seconds.
-i, --interval-length Aggregate samples over this duration (in seconds).
Defaults to 'duration'.
-d, --duration Overall duration in seconds.
-a, --adapter Host adapter no. to watch. Specify each host adapter
separately.
-l, --lun watch I/O error count of LUN. Specify each LUN
separately in h:b:t:l format.
-Q, --msg-queue-name Specify the message queue path name.
-q, --msg-queue-id Specify the message queue id.
-m, --msg-id Specify the message id to use.
-L, --msg-id-ioerr Specify the message id for I/O error count messages.
ubuntu at s5lp1-gen01:~$ echo $?
255
ubuntu at s5lp1-gen01:~$ ziomon_util --version
ziomon_util: ziomon utilization monitor, version 1.34.0-build-20160609
Copyright IBM Corp. 2008
ubuntu at s5lp1-gen01:~$ echo $?
255
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1616596/+subscriptions
More information about the foundations-bugs
mailing list