Bug 498945

Summary: btrace does not recognize "-n" and "-b" options
Product: Red Hat Enterprise Linux 5 Reporter: Milos Malik <mmalik>
Component: blktraceAssignee: Eric Sandeen <esandeen>
Status: CLOSED ERRATA QA Contact: BaseOS QE <qe-baseos-auto>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.3CC: ohudlick
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-02 09:41:14 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 Milos Malik 2009-05-04 14:54:58 UTC
Description of problem:
btrace script contains an getopt call:

while getopts "a:r:stSw:hv" c

If the man page is correct about supported command line options, the getopt call should like this way:

while getopts "a:b:n:r:stSw:hv" c

Version-Release number of selected component (if applicable):
blktrace-1.0.0-3

How reproducible:
always

Steps to Reproduce:
# man btrace | col -b | grep -- "-b "
       Usage: btrace [-s] [-t] [-w N] [-n N] [-b N] [-a <trace>...] <dev>...
       -b  N  Specifies buffer size for event extraction (scaled by 1024) (see
# man btrace | col -b | grep -- "-n "
       Usage: btrace [-s] [-t] [-w N] [-n N] [-b N] [-a <trace>...] <dev>...
       -n N Specifies the number of buffers to use (see blktrace (8)).
# /usr/bin/btrace -n
/usr/bin/btrace: illegal option -- n
Usage: btrace [-s] [-t] [-S] [-w N] [-a <trace>...] [-r <dbg mnt]<dev>...
# /usr/bin/btrace -b
/usr/bin/btrace: illegal option -- b
Usage: btrace [-s] [-t] [-S] [-w N] [-a <trace>...] [-r <dbg mnt]<dev>...

  
Actual results:
not all supported options are mentioned in the getopt call

Expected results:
all supported options are mentioned in the getopt call

Comment 1 Milos Malik 2009-05-04 15:11:43 UTC
# btrace
Usage: btrace [-s] [-t] [-S] [-w N] [-a <trace>...] [-r <dbg mnt] <dev>...

I'm wondering what's the meaning of "-S" option. The script does not react when
it's present on the command line and the man page does not talk about it.

Comment 2 Eric Sandeen 2009-05-04 20:49:29 UTC
Patch sent upstream, thanks.

http://marc.info/?l=linux-btrace&m=124146968616948&w=2

Comment 5 Eric Sandeen 2009-05-13 22:54:08 UTC
Committed & built in blktrace-1.0.0-6.el5

Comment 11 errata-xmlrpc 2009-09-02 09:41:14 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1284.html