From mboxrd@z Thu Jan 1 00:00:00 1970 From: jason.wessel@windriver.com (Jason Wessel) Date: Tue, 26 Apr 2011 16:55:56 -0500 Subject: [ltt-dev] [UST PATCH 2/2] fork and malloc test fixes In-Reply-To: <1303854956-2787-1-git-send-email-jason.wessel@windriver.com> References: <1303854956-2787-1-git-send-email-jason.wessel@windriver.com> Message-ID: <1303854956-2787-2-git-send-email-jason.wessel@windriver.com> 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 --- 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" -- 1.7.1