From: Francis Deslauriers Date: Fri, 9 Feb 2018 21:56:50 +0000 (-0500) Subject: Tests: allow the use of regular expressions to match events X-Git-Tag: v2.11.0-rc1~223 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=49538c322bafff98569dd8ba4319e5dc5f1b87d9;p=lttng-tools.git Tests: allow the use of regular expressions to match events Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau --- diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index 3a619201f..7704e5246 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -1496,7 +1496,7 @@ function validate_trace_exp() which $BABELTRACE_BIN >/dev/null skip $? -ne 0 "Babeltrace binary not found. Skipping trace validation" - traced=$($BABELTRACE_BIN $trace_path 2>/dev/null | grep ${event_exp} | wc -l) + traced=$($BABELTRACE_BIN $trace_path 2>/dev/null | grep --extended-regexp ${event_exp} | wc -l) if [ "$traced" -ne 0 ]; then pass "Validate trace for expression '${event_exp}', $traced events" else @@ -1515,7 +1515,7 @@ function validate_trace_only_exp() which $BABELTRACE_BIN >/dev/null skip $? -ne 0 "Babeltrace binary not found. Skipping trace matches" - local count=$($BABELTRACE_BIN $trace_path | grep ${event_exp} | wc -l) + local count=$($BABELTRACE_BIN $trace_path | grep --extended-regexp ${event_exp} | wc -l) local total=$($BABELTRACE_BIN $trace_path | wc -l) if [ "$count" -ne 0 ] && [ "$total" -eq "$count" ]; then