From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?J=C3=A9r=C3=A9mie_Galarneau?= 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 11:17:22 -0400 Message-ID: References: <1433950061-27364-1-git-send-email-jonathan.rajotte-julien@efficios.com> <579469314.862.1434637120162.JavaMail.zimbra@efficios.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0116407744==" Return-path: Received: from mail-pa0-f52.google.com ([209.85.220.52]) by ltt.polymtl.ca with esmtp (Exim 4.80) (envelope-from ) id 1Z5bZI-0003x9-KM for lttng-dev@lists.lttng.org; Thu, 18 Jun 2015 11:17:36 -0400 Received: by pacyx8 with SMTP id yx8so63540286pac.2 for ; Thu, 18 Jun 2015 08:17:23 -0700 (PDT) In-Reply-To: <579469314.862.1434637120162.JavaMail.zimbra@efficios.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lttng-dev-bounces@lists.lttng.org To: Jonathan Rajotte Cc: lttng-dev , Jeremie Galarneau List-Id: lttng-dev@lists.lttng.org --===============0116407744== Content-Type: multipart/alternative; boundary=001a11c1dc94e673ee0518cc4d9b --001a11c1dc94e673ee0518cc4d9b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Merged, thanks! J=C3=A9r=C3=A9mie On Thu, Jun 18, 2015 at 10:18 AM, Mathieu Desnoyers < mathieu.desnoyers@efficios.com> wrote: > bump: J=C3=A9r=C3=A9mie, 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 > > --- > > 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 =3D true et 1 false > > + #Check for 2 success =3D true and 1 success =3D false > > extract_xml $OUTPUT_DEST $XPATH_ENABLE_EVENT_SUCCESS result > > num_ocur=3D$(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=3D$(echo "$result" | wc -l) > > - test "$num" -eq "5" > > + > > + #Since the number of events is prone to change we only look for >= =3D > 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 >=3D to 12 because > number of > > + #field is prone to change. > > extract_xml $OUTPUT_DEST "$XPATH_LIST_UST_EVENT""[./name =3D > > 'tp:tptest']/event_fields/event_field/name/text()" result > > num=3D$(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 > --=20 J=C3=A9r=C3=A9mie Galarneau EfficiOS Inc. http://www.efficios.com --001a11c1dc94e673ee0518cc4d9b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Merged, thanks!

J=C3=A9r=C3=A9mie
=

On Thu, Jun= 18, 2015 at 10:18 AM, Mathieu Desnoyers <mathieu.desnoyers@e= fficios.com> wrote:
bump: J= =C3=A9r=C3=A9mie, I know you are busy with Babeltrace, but can you quickly<= br> 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 chang= e it
> make more sense to look for a minimum of events. This is less rigourou= s
> 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 ()
>=C2=A0 =C2=A0 =C2=A0 =C2=A0$XML_VALIDATE $OUTPUT_DEST
>=C2=A0 =C2=A0 =C2=A0 =C2=A0ok $? "Mi test: Multiple enable ust eve= nt with inside fail xsd validation"
>
> -=C2=A0 =C2=A0 =C2=A0#Check for 2 success =3D true et 1 false
> +=C2=A0 =C2=A0 =C2=A0#Check for 2 success =3D true and 1 success =3D f= alse
>=C2=A0 =C2=A0 =C2=A0 =C2=A0extract_xml $OUTPUT_DEST $XPATH_ENABLE_EVENT= _SUCCESS result
>=C2=A0 =C2=A0 =C2=A0 =C2=A0num_ocur=3D$(grep -o "true" <&l= t;< "$result" | wc -l)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0test "$num_ocur" -eq "2"=
> @@ -511,16 +511,21 @@ function test_list_ust_event ()
>=C2=A0 =C2=A0 =C2=A0 =C2=A0$XML_VALIDATE $OUTPUT_DEST
>=C2=A0 =C2=A0 =C2=A0 =C2=A0ok $? "Mi test: list ust event xsd vali= dation"
>
> -=C2=A0 =C2=A0 =C2=A0#Extract events 5 events should be present
> +=C2=A0 =C2=A0 =C2=A0#Extract events
>=C2=A0 =C2=A0 =C2=A0 =C2=A0extract_xml $OUTPUT_DEST "$XPATH_LIST_U= ST_EVENT""/name/text()" result
>=C2=A0 =C2=A0 =C2=A0 =C2=A0num=3D$(echo "$result" | wc -l) > -=C2=A0 =C2=A0 =C2=A0test "$num" -eq "5"
> +
> +=C2=A0 =C2=A0 =C2=A0#Since the number of events is prone to change we= only look for >=3D from a
> +=C2=A0 =C2=A0 =C2=A0#base number. An alternative would be to look for= each events but this
> +=C2=A0 =C2=A0 =C2=A0#is complicated for nothing.
> +=C2=A0 =C2=A0 =C2=A0test "$num" -ge "5"
>=C2=A0 =C2=A0 =C2=A0 =C2=A0ok $? "Mi test: $num / 5 ust events dis= covered"
>
> -=C2=A0 =C2=A0 =C2=A0#Extract field from tp:tptest event. Expect 12 > +=C2=A0 =C2=A0 =C2=A0#Extract field from tp:tptest event. Expect >= =3D to 12 because number of
> +=C2=A0 =C2=A0 =C2=A0#field is prone to change.
>=C2=A0 =C2=A0 =C2=A0 =C2=A0extract_xml $OUTPUT_DEST "$XPATH_LIST_U= ST_EVENT""[./name =3D
>=C2=A0 =C2=A0 =C2=A0 =C2=A0'tp:tptest']/event_fields/event_fiel= d/name/text()" result
>=C2=A0 =C2=A0 =C2=A0 =C2=A0num=3D$(echo "$result" | wc -l) > -=C2=A0 =C2=A0 =C2=A0test "$num" -eq "12"
> +=C2=A0 =C2=A0 =C2=A0test "$num" -ge "12"
>=C2=A0 =C2=A0 =C2=A0 =C2=A0ok $? "Mi test: $num / 12 ust event fie= lds discovered"
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0#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.
ht= tp://www.efficios.com



--
J=C3=A9r=C3=A9mie Galarneau
EfficiOS In= c.
http://www.effi= cios.com
--001a11c1dc94e673ee0518cc4d9b-- --===============0116407744== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 7bit _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev --===============0116407744==--