From: jason.wessel@windriver.com (Jason Wessel)
Subject: [ltt-dev] [UST PATCH 2/2] fork and malloc test fixes
Date: Tue, 26 Apr 2011 16:55:56 -0500 [thread overview]
Message-ID: <1303854956-2787-2-git-send-email-jason.wessel@windriver.com> (raw)
In-Reply-To: <1303854956-2787-1-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 <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"
--
1.7.1
next prev parent reply other threads:[~2011-04-26 21:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-26 21:55 [ltt-dev] [UST PATCH 1/2] add mips support Jason Wessel
2011-04-26 21:55 ` Jason Wessel [this message]
2011-04-27 14:23 ` [ltt-dev] [UST PATCH 2/2] fork and malloc test fixes Yannick Brosseau
2011-04-28 13:33 ` Nils Carlson
2011-04-28 13:33 ` [ltt-dev] [UST PATCH 1/2] add mips support Nils Carlson
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=1303854956-2787-2-git-send-email-jason.wessel@windriver.com \
--to=jason.wessel@windriver.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox