Project

General

Profile

Actions

Bug #222

closed

BabelTrace 1.0.0-rc1 does not report an error code in error situations

Added by Jesus Garcia almost 12 years ago. Updated almost 12 years ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
Start date:
04/24/2012
Due date:
% Done:

0%

Estimated time:

Description

Hi Guys,

The latest version of babeltrace (rc1) does not report an error code in error situations (at least not this particular error).
In the following example there is a text file in the Pid directory and when babeltrace is invoked, it reports an error, but it returns 0:

SC-1:~ # ll /home/trace/Profile016_1/SC-1/ust/TestApp_type1-4459-20120423-231455/
total 20
rw-r--r- 1 root root 0 Apr 23 23:16 MyTextFile.txt
rw-r--r- 1 root root 0 Apr 23 23:16 MyTextFile2.txt
-rwxrwxrwx 1 root root 4096 Apr 23 23:15 channel0_0
-rwxrwxrwx 1 root root 4096 Apr 23 23:15 channel0_1
-rwxrwxrwx 1 root root 4096 Apr 23 23:15 channel0_2
-rwxrwxrwx 1 root root 4096 Apr 23 23:15 channel0_3
-rwxrwxrwx 1 root root 4096 Apr 23 23:15 metadata
SC-1:~ # babeltrace /home/trace/Profile016_1/SC-1/ust/TestApp_type1-4459-20120423-231455/
[error] Open file stream error.
[warning] [Context] Cannot open_trace of the format /home/trace/Profile016_1/SC-1/ust/TestApp_type1-4459-20120423-231455/ .

[warning] [Context] opening trace "/home/trace/Profile016_1/SC-1/ust/TestApp_type1-4459-20120423-231455/" from /home/trace/Profile016_1/SC-1/ust/TestApp_type1-4459-20120423-231455/ for reading.
SC-1:~ # echo $?
0
SC-1:~ # babeltrace -h
BabelTrace Trace Viewer and Converter 1.0.0-rc1

======================================================================

In the previous version of babaltrace, it reports the same errors, but it returns 1:

SC-1:/home/trace/Profile006_4/SC-1/ust # babeltrace /home/trace/Profile006_4/SC-1/ust/TestApp_type1-16635-20120424-101632/
[error] Open file stream error.
[error] [Context] Cannot open_trace of the format /home/trace/Profile006_4/SC-1/ust/TestApp_type1-16635-20120424-101632/ .

[error] [Context] opening trace "/home/trace/Profile006_4/SC-1/ust/TestApp_type1-16635-20120424-101632/" from /home/trace/Profile006_4/SC-1/ust/TestApp_type1-16635-20120424-101632/ for reading.
[error] opening trace "/home/trace/Profile006_4/SC-1/ust/TestApp_type1-16635-20120424-101632/" for reading.

SC-1:/home/trace/Profile006_4/SC-1/ust # echo $?
1
SC-1:/home/trace/Profile006_4/SC-1/ust # babeltrace --help
BabelTrace Trace Viewer and Converter 1.0.0-pre4

Actions

Also available in: Atom PDF