All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Jeremie Galarneau <jgalar@efficios.com>
Cc: lttng-dev <lttng-dev@lists.lttng.org>
Subject: Re: [PATCH lttng-tools] Test: mi: test for greater or equal	to a minimum of events on ust listing.
Date: Thu, 18 Jun 2015 14:18:40 +0000 (UTC)	[thread overview]
Message-ID: <579469314.862.1434637120162.JavaMail.zimbra__44564.6123298959$1434637203$gmane$org@efficios.com> (raw)
In-Reply-To: <1433950061-27364-1-git-send-email-jonathan.rajotte-julien@efficios.com>

bump: Jérémie, I know you are busy with Babeltrace, but can you quickly
look into merging this fix ? It would repair the CI.

Thanks,

Mathieu

----- On Jun 10, 2015, at 11:27 AM, Jonathan Rajotte jonathan.rajotte-julien@efficios.com wrote:

> Since the number of events present in the tests apps in prone to change it
> make more sense to look for a minimum of events. This is less rigourous
> but more flexible to change.
> 
> Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
> ---
> tests/regression/tools/mi/test_mi | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/regression/tools/mi/test_mi
> b/tests/regression/tools/mi/test_mi
> index ccf9236..c44b598 100755
> --- a/tests/regression/tools/mi/test_mi
> +++ b/tests/regression/tools/mi/test_mi
> @@ -328,7 +328,7 @@ function test_ust_lttng_event ()
> 	$XML_VALIDATE $OUTPUT_DEST
> 	ok $? "Mi test: Multiple enable ust event with inside fail xsd validation"
> 
> -	#Check for 2 success = true et 1 false
> +	#Check for 2 success = true and 1 success = false
> 	extract_xml $OUTPUT_DEST $XPATH_ENABLE_EVENT_SUCCESS result
> 	num_ocur=$(grep -o "true" <<< "$result" | wc -l)
> 	test "$num_ocur" -eq "2"
> @@ -511,16 +511,21 @@ function test_list_ust_event ()
> 	$XML_VALIDATE $OUTPUT_DEST
> 	ok $? "Mi test: list ust event xsd validation"
> 
> -	#Extract events 5 events should be present
> +	#Extract events
> 	extract_xml $OUTPUT_DEST "$XPATH_LIST_UST_EVENT""/name/text()" result
> 	num=$(echo "$result" | wc -l)
> -	test "$num" -eq "5"
> +
> +	#Since the number of events is prone to change we only look for >= from a
> +	#base number. An alternative would be to look for each events but this
> +	#is complicated for nothing.
> +	test "$num" -ge "5"
> 	ok $? "Mi test: $num / 5 ust events discovered"
> 
> -	#Extract field from tp:tptest event. Expect 12
> +	#Extract field from tp:tptest event. Expect >= to 12 because number of
> +	#field is prone to change.
> 	extract_xml $OUTPUT_DEST "$XPATH_LIST_UST_EVENT""[./name =
> 	'tp:tptest']/event_fields/event_field/name/text()" result
> 	num=$(echo "$result" | wc -l)
> -	test "$num" -eq "12"
> +	test "$num" -ge "12"
> 	ok $? "Mi test: $num / 12 ust event fields discovered"
> 
> 	#Wait for all background processes
> --
> 2.1.4
> 
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

       reply	other threads:[~2015-06-18 14:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1433950061-27364-1-git-send-email-jonathan.rajotte-julien@efficios.com>
2015-06-18 14:18 ` Mathieu Desnoyers [this message]
     [not found] ` <579469314.862.1434637120162.JavaMail.zimbra@efficios.com>
2015-06-18 15:17   ` [PATCH lttng-tools] Test: mi: test for greater or equal to a minimum of events on ust listing Jérémie Galarneau
2015-06-10 15:27 Jonathan Rajotte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='579469314.862.1434637120162.JavaMail.zimbra__44564.6123298959$1434637203$gmane$org@efficios.com' \
    --to=mathieu.desnoyers@efficios.com \
    --cc=jgalar@efficios.com \
    --cc=lttng-dev@lists.lttng.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.