[ltt-dev] [UST PATCH 2/2] fork and malloc test fixes

Yannick Brosseau yannick.brosseau at gmail.com
Wed Apr 27 10:23:49 EDT 2011


It might  be possible to detect the right path in the configure script.  
I'll have a look into that.

Yannick

On 2011-04-26 17:55, Jason Wessel wrote:
> When cross building the fork and malloc tests, the programs do not end
> up in .libs because the cross libtool does not put non-librarys in the
> .libs directory.
>
> Example error:
>
>   Output of './fork/../../usttrace -L -f ./fork/../fork/.libs/fork ./fork/../fork/.libs/fork2':
>   ./fork/../../usttrace: line 199: ./fork/../fork/.libs/fork: No such file or directory
>
> This patch allows the binaries to be found in an alternate location so
> the tests can start correctly.
>
> Signed-off-by: Jason Wessel<jason.wessel at windriver.com>
> ---
>   tests/fork/fork.sh                                 |    6 +++++-
>   .../test-libustinstr-malloc.sh                     |    6 +++++-
>   2 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/tests/fork/fork.sh b/tests/fork/fork.sh
> index 631c9d5..e9be3b7 100755
> --- a/tests/fork/fork.sh
> +++ b/tests/fork/fork.sh
> @@ -27,7 +27,11 @@ starttest "fork()/exec() test"
>   plan_tests 8
>   USTTRACE="$TESTDIR/../usttrace"
>
> -okx $USTTRACE -L -f $TESTDIR/fork/.libs/fork $TESTDIR/fork/.libs/fork2
> +if [ -f $TESTDIR/fork/fork ] ; then
> +   okx $USTTRACE -L -f $TESTDIR/fork/fork $TESTDIR/fork/fork2
> +else
> +   okx $USTTRACE -L -f $TESTDIR/fork/.libs/fork $TESTDIR/fork/.libs/fork2
> +fi
>   trace_loc=$($USTTRACE -W)
>   trace_matches -N "before_fork" "^ust.before_fork:" $trace_loc
>   trace_matches -N "after_fork_parent" "^ust.after_fork_parent:" $trace_loc
> diff --git a/tests/test-libustinstr-malloc/test-libustinstr-malloc.sh b/tests/test-libustinstr-malloc/test-libustinstr-malloc.sh
> index 04ed64d..0dcb523 100755
> --- a/tests/test-libustinstr-malloc/test-libustinstr-malloc.sh
> +++ b/tests/test-libustinstr-malloc/test-libustinstr-malloc.sh
> @@ -27,7 +27,11 @@ starttest "libustinstr-malloc"
>   plan_tests 3
>   USTTRACE="$TESTDIR/../usttrace"
>
> -okx $USTTRACE -L -lm $TESTDIR/test-libustinstr-malloc/.libs/prog
> +if [ -f $TESTDIR/test-libustinstr-malloc/prog ] ; then
> +  okx $USTTRACE -L -lm $TESTDIR/test-libustinstr-malloc/prog
> +else
> +  okx $USTTRACE -L -lm $TESTDIR/test-libustinstr-malloc/.libs/prog
> +fi
>   trace_loc=$($USTTRACE -W)
>   trace_matches -N "libustinstr-malloc - malloc" -n 1000 "^ust.malloc:.*{ size = 1[0-9][0-9][0-9]," $trace_loc
>   check_trace_logs "$trace_loc"
>    





More information about the lttng-dev mailing list