Bug 500118 - blkparse exits with 0 even if trace files do not exist
Summary: blkparse exits with 0 even if trace files do not exist
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: blktrace
Version: 5.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Eric Sandeen
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks: 583695
TreeView+ depends on / blocked
 
Reported: 2009-05-11 08:39 UTC by Milos Malik
Modified: 2014-01-27 11:09 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 583695 (view as bug list)
Environment:
Last Closed: 2009-09-02 09:41:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2009:1284 0 normal SHIPPED_LIVE New package: blktrace 2009-09-01 09:51:07 UTC

Description Milos Malik 2009-05-11 08:39:13 UTC
Description of problem:
When somebody runs blkparse with non-existent file as argument, it does not
complain. Exit code is zero.
This bug is similar to bz#499581 , but it involves blkparse instead of blkrawverify.

Version-Release number of selected component (if applicable):
blktrace-1.0.0-5.el5

How reproducible:
always

Steps to Reproduce:
# df -l
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      73545144   2242708  67506264   4% /
/dev/sda1               101086     12445     83422  13% /boot
tmpfs                   513200         0    513200   0% /dev/shm
# blktrace -d /dev/sda -w 10
Device: /dev/sda
  CPU  0:                    0 events,        1 KiB data
  CPU  1:                    0 events,        2 KiB data
  Total:                     0 events (dropped 0),        2 KiB data
# ls -l *.blktrace.*
-rw-r--r-- 1 root root  464 May 11 04:35 sda.blktrace.0
-rw-r--r-- 1 root root 1488 May 11 04:35 sda.blktrace.1
# rm -f *.blktrace.*
# blkparse -i sda

Throughput (R/W): 0KiB/s / 0KiB/s
Events (sda): 0 entries
Skips: 0 forward (0 -   0.0%)
# echo $?
0
#
  
Actual results:
no error message appears
exit code == 0

Expected results:
an error message appears (e.g. "no sda* files found")
exit code != 0

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

Comment 9 errata-xmlrpc 2009-09-02 09:41:23 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


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