[lttng-tools,v2,3/5] Tests: allow the use of regular expressions to match events
diff mbox series

Message ID 1518213412-16593-4-git-send-email-francis.deslauriers@efficios.com
State Accepted
Delegated to: Jérémie Galarneau
Headers show
Series
  • Support probes with the same name but different event payload
Related show

Commit Message

Francis Deslauriers Feb. 9, 2018, 9:56 p.m. UTC
Signed-off-by: Francis Deslauriers <francis.deslauriers at efficios.com>
---
 tests/utils/utils.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh
index e8dfcda..9bf1fcc 100644
--- a/tests/utils/utils.sh
+++ b/tests/utils/utils.sh
@@ -1457,7 +1457,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
@@ -1476,7 +1476,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