Tests fix: metadata event: print expected and actual event match count
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 16 May 2022 22:49:05 +0000 (18:49 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 13 Jun 2022 20:34:46 +0000 (16:34 -0400)
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 <jeremie.galarneau@efficios.com>
Change-Id: Ideac2593a5d4d239ee24f98f954dddf2b5be91fa

tests/utils/utils.sh

index b8b9a6b49b8d4af5055de467304072431eb50bf2..2752b0f7a76c84eec8ad2f70db5c9340c7162022 100644 (file)
@@ -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
 
 }
This page took 0.033331 seconds and 4 git commands to generate.