projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix validate_trace_empty test check
[lttng-tools.git]
/
tests
/
utils
/
utils.sh
diff --git
a/tests/utils/utils.sh
b/tests/utils/utils.sh
index 9db0640b70f3135bdfc156340393eec3fb4ea043..89aca464002d9b950571852b244b4b392cffb8a6 100644
(file)
--- a/
tests/utils/utils.sh
+++ b/
tests/utils/utils.sh
@@
-1401,7
+1401,14
@@
function validate_trace_empty()
skip 0 "Babeltrace binary not found. Skipping trace validation"
fi
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
if [ "$traced" -eq 0 ]; then
pass "Validate empty trace"
else
This page took
0.025016 seconds
and
4
git commands to generate.