From bade86436a3004fc696c5dc4d17607f63653b933 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Mon, 16 May 2022 18:49:05 -0400 Subject: [PATCH] Tests fix: metadata event: print expected and actual event match count MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The validate_metadata_event() function prints the actual event match count twice when a test fails. Printing the expected vs actual counts was probably the intention of the original author. Signed-off-by: Jérémie Galarneau Change-Id: Ideac2593a5d4d239ee24f98f954dddf2b5be91fa --- tests/utils/utils.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index b8b9a6b49..2752b0f7a 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -1921,10 +1921,10 @@ function validate_metadata_event () local count=$($BABELTRACE_BIN --output-format=ctf-metadata $metadata_path | grep $event_name | wc -l) if [ "$count" -ne "$nr_event_id" ]; then - fail "Metadata match with the metadata of $count event(s) named $event_name" - diag "$count matching event id found in metadata" + fail "Metadata match with the metadata of $nr_event_id event(s) named $event_name" + diag "$count matching event names found in metadata" else - pass "Metadata match with the metadata of $count event(s) named $event_name" + pass "Metadata match with the metadata of $nr_event_id event(s) named $event_name" fi } -- 2.34.1