[lttng-dev] [PATCH lttng-tools] Fix: test_mi test

Jérémie Galarneau jeremie.galarneau at efficios.com
Thu Aug 6 16:38:25 EDT 2015


Merged in master, stable-2.7 and stable-2.6, thanks!

Jérémie

On Thu, Aug 6, 2015 at 3:52 PM, Mathieu Desnoyers <
mathieu.desnoyers at efficios.com> wrote:

> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> ---
>  tests/regression/tools/mi/test_mi | 20 +++++++++++++++++---
>  1 file changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/tests/regression/tools/mi/test_mi
> b/tests/regression/tools/mi/test_mi
> index a5c7493..5bd29ed 100755
> --- a/tests/regression/tools/mi/test_mi
> +++ b/tests/regression/tools/mi/test_mi
> @@ -27,8 +27,8 @@ RELAYD_BIN="lttng-relayd"
>  TESTAPP_PATH="$TESTDIR/utils/testapp"
>  TESTAPP_NAME="gen-ust-events"
>  TESTAPP_BIN="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME"
> -NR_USEC_WAIT=10000
> -
> +NR_USEC_WAIT=0
> +NR_ITER=10000
>
>  #Temp file output
>  OUTPUT_DIR=$(mktemp -d)
> @@ -500,14 +500,25 @@ function test_list_session ()
>
>  function test_list_ust_event ()
>  {
> +       local file_sync_after_first=$(mktemp -u)
> +       local file_sync_before_last=$(mktemp -u)
> +
>         OUTPUT_FILE="list_ust_event.xml"
>
>         #Test buid up
>         OUTPUT_DEST=$OUTPUT_DIR/$OUTPUT_FILE
>
>         #Begin testing
> -       $TESTAPP_BIN $NR_USEC_WAIT & 2>/dev/null
> +       $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT ${file_sync_after_first}
> ${file_sync_before_last} & 2>/dev/null
> +
> +       while [ ! -f "${file_sync_after_first}" ]; do
> +               sleep 0.5
> +       done
> +
>         list_lttng_with_opts "-u -f"
> +
> +       touch ${file_sync_before_last}
> +
>         $XML_VALIDATE $OUTPUT_DEST
>         ok $? "Mi test: list ust event xsd validation"
>
> @@ -530,6 +541,9 @@ function test_list_ust_event ()
>
>         #Wait for all background processes
>         wait
> +
> +       rm -f ${file_sync_after_first}
> +       rm -f ${file_sync_before_last}
>  }
>
>  function test_start_stop () {
> --
> 2.1.4
>
>


-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20150806/5487e59a/attachment.html>


More information about the lttng-dev mailing list