if [ $withtap -eq "1" ]; then
diag "Killing $CONSUMERD_BIN pids: $(echo $PID_CONSUMERD | tr '\n' ' ')"
fi
+
kill $kill_opt $PID_CONSUMERD 1> $OUTPUT_DEST 2> $ERROR_OUTPUT_DEST
retval=$?
- set +x
if [ $? -eq 1 ]; then
if [ $withtap -eq "1" ]; then
fi
kill $kill_opt $PID_CONSUMERD 1> $OUTPUT_DEST 2> $ERROR_OUTPUT_DEST
retval=$?
- set +x
if [ $? -eq 1 ]; then
if [ $withtap -eq "1" ]; then
skip 0 "Babeltrace binary not found. Skipping trace validation"
fi
- traced=$($BABELTRACE_BIN $trace_path 2>/dev/null | wc -l)
+ events=$($BABELTRACE_BIN $trace_path 2>/dev/null)
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ fail "Failed to parse trace"
+ return $ret
+ fi
+
+ traced=$(echo -n "$events" | wc -l)
if [ "$traced" -eq 0 ]; then
pass "Validate empty trace"
else