From: yannick.brosseau@gmail.com (Yannick Brosseau)
Subject: [ltt-dev] [UST PATCH 2/3] Use usttrace and libraries from the build directory in the test scripts
Date: Fri, 18 Feb 2011 12:59:39 -0500 [thread overview]
Message-ID: <1298051980-20312-2-git-send-email-yannick.brosseau@gmail.com> (raw)
In-Reply-To: <1298051980-20312-1-git-send-email-yannick.brosseau@gmail.com>
Signed-off-by: Yannick Brosseau <yannick.brosseau at gmail.com>
---
tests/dlopen/dlopen.sh | 5 +++--
tests/fork/fork.sh | 5 +++--
tests/manual_mode_tracing.sh | 20 +++++++++++---------
tests/same_line_marker/same_line_marker.sh | 5 +++--
.../test-libustinstr-malloc.sh | 5 +++--
tests/test-nevents/test-nevents.sh | 5 +++--
tests/tracepoint/run | 5 +++--
7 files changed, 29 insertions(+), 21 deletions(-)
diff --git a/tests/dlopen/dlopen.sh b/tests/dlopen/dlopen.sh
index 723f038..673fdbc 100755
--- a/tests/dlopen/dlopen.sh
+++ b/tests/dlopen/dlopen.sh
@@ -25,9 +25,10 @@ source $TESTDIR/tap.sh
starttest "dlopen"
plan_tests 4
+USTTRACE="$TESTDIR/../usttrace"
-LD_LIBRARY_PATH=$TESTDIR/dlopen/.libs okx usttrace $TESTDIR/dlopen/dlopen
-trace_loc=$(usttrace -W)
+LD_LIBRARY_PATH=$TESTDIR/dlopen/.libs okx $USTTRACE -L $TESTDIR/dlopen/dlopen
+trace_loc=$($USTTRACE -W)
trace_matches -N "from_library" -n 1 "^ust.from_library:" $trace_loc
trace_matches -N "from_main_before_lib" -n 1 "^ust.from_main_before_lib:" $trace_loc
trace_matches -N "from_main_after_lib" -n 1 "^ust.from_main_after_lib:" $trace_loc
diff --git a/tests/fork/fork.sh b/tests/fork/fork.sh
index 2c02e94..631c9d5 100755
--- a/tests/fork/fork.sh
+++ b/tests/fork/fork.sh
@@ -25,9 +25,10 @@ source $TESTDIR/tap.sh
starttest "fork()/exec() test"
plan_tests 8
+USTTRACE="$TESTDIR/../usttrace"
-okx usttrace -f $TESTDIR/fork/.libs/fork $TESTDIR/fork/.libs/fork2
-trace_loc=$(usttrace -W)
+okx $USTTRACE -L -f $TESTDIR/fork/.libs/fork $TESTDIR/fork/.libs/fork2
+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
trace_matches -N "after_fork_child" "^ust.after_fork_child:" $trace_loc
diff --git a/tests/manual_mode_tracing.sh b/tests/manual_mode_tracing.sh
index b60a957..bd85083 100755
--- a/tests/manual_mode_tracing.sh
+++ b/tests/manual_mode_tracing.sh
@@ -37,23 +37,25 @@ mkdir "$TRACE_DIR"
pidfilepath="/tmp/ust-testsuite-$USER-$(date +%Y%m%d%H%M%S%N)-ust-consumerd-pid"
mkfifo -m 0600 "$pidfilepath"
-ust-consumerd --pidfile "$pidfilepath" -o "$TRACE_DIR" >/dev/null 2>&1 &
+UST_CONSUMERD="$TESTDIR/../ust-consumerd/ust-consumerd"
+$UST_CONSUMERD --pidfile "$pidfilepath" -o "$TRACE_DIR" >/dev/null 2>&1 &
UST_CONSUMERD_PID="$(<$pidfilepath)"
LD_PRELOAD=/usr/local/lib/libust.so.0.0.0:/usr/local/lib/libustinstr-malloc.so find -L / >/dev/null 2>&1 &
PID=$!
TRACE=auto
+USTCTL="$TESTDIR/../ustctl/ustctl"
sleep 0.1
-okx ustctl list-markers $PID
-okx ustctl enable-marker $PID $TRACE ust/malloc
-okx ustctl enable-marker $PID $TRACE ust/free
-okx ustctl create-trace $PID $TRACE
-okx ustctl alloc-trace $PID $TRACE
-okx ustctl start-trace $PID $TRACE
+okx $USTCTL list-markers $PID
+okx $USTCTL enable-marker $PID $TRACE ust/malloc
+okx $USTCTL enable-marker $PID $TRACE ust/free
+okx $USTCTL create-trace $PID $TRACE
+okx $USTCTL alloc-trace $PID $TRACE
+okx $USTCTL start-trace $PID $TRACE
sleep 0.5
-okx ustctl stop-trace $PID $TRACE
-okx ustctl destroy-trace $PID $TRACE
+okx $USTCTL stop-trace $PID $TRACE
+okx $USTCTL destroy-trace $PID $TRACE
kill $PID
kill -SIGTERM ${UST_CONSUMERD_PID}
wait ${UST_CONSUMERD_PID}
diff --git a/tests/same_line_marker/same_line_marker.sh b/tests/same_line_marker/same_line_marker.sh
index e391ec3..c3688ed 100755
--- a/tests/same_line_marker/same_line_marker.sh
+++ b/tests/same_line_marker/same_line_marker.sh
@@ -25,7 +25,8 @@ source $TESTDIR/tap.sh
starttest "same_line_marker"
plan_tests 2
+USTTRACE="$TESTDIR/../usttrace"
-okx usttrace $TESTDIR/same_line_marker/same_line_marker
-trace_loc=$(usttrace -W)
+okx $USTTRACE -L $TESTDIR/same_line_marker/same_line_marker
+trace_loc=$($USTTRACE -W)
trace_matches -N "same_line_event" -n 2 "^ust.same_line_event:" $trace_loc
diff --git a/tests/test-libustinstr-malloc/test-libustinstr-malloc.sh b/tests/test-libustinstr-malloc/test-libustinstr-malloc.sh
index 2daa4b5..04ed64d 100755
--- a/tests/test-libustinstr-malloc/test-libustinstr-malloc.sh
+++ b/tests/test-libustinstr-malloc/test-libustinstr-malloc.sh
@@ -25,8 +25,9 @@ source $TESTDIR/tap.sh
starttest "libustinstr-malloc"
plan_tests 3
+USTTRACE="$TESTDIR/../usttrace"
-okx usttrace -lm $TESTDIR/test-libustinstr-malloc/.libs/prog
-trace_loc=$(usttrace -W)
+okx $USTTRACE -L -lm $TESTDIR/test-libustinstr-malloc/.libs/prog
+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"
diff --git a/tests/test-nevents/test-nevents.sh b/tests/test-nevents/test-nevents.sh
index 03ff87f..2a7a98a 100755
--- a/tests/test-nevents/test-nevents.sh
+++ b/tests/test-nevents/test-nevents.sh
@@ -25,9 +25,10 @@ source $TESTDIR/tap.sh
starttest "Test-nevents"
plan_tests 4
+USTTRACE="$TESTDIR/../usttrace"
-okx usttrace $TESTDIR/test-nevents/prog
-trace_loc=$(usttrace -W)
+okx $USTTRACE -L $TESTDIR/test-nevents/prog
+trace_loc=$($USTTRACE -W)
trace_matches -N "an_event" -n 100000 "^ust.an_event:" $trace_loc
trace_matches -N "another_event" -n 100000 "^ust.another_event:" $trace_loc
check_trace_logs "$trace_loc"
diff --git a/tests/tracepoint/run b/tests/tracepoint/run
index 0da9864..f0d9ed1 100755
--- a/tests/tracepoint/run
+++ b/tests/tracepoint/run
@@ -7,9 +7,10 @@ source $TESTDIR/tap.sh
starttest "Testing Tracepoints"
plan_tests 6
+USTTRACE="$TESTDIR/../usttrace"
-okx usttrace $TESTDIR/tracepoint/tracepoint_test
-trace_loc=$(usttrace -W)
+okx $USTTRACE -L $TESTDIR/tracepoint/tracepoint_test
+trace_loc=$($USTTRACE -W)
trace_matches -N "probe1" -n "5" "probe = 13" $trace_loc
trace_matches -N "probe2" -n "5" "probe = 42" $trace_loc
trace_matches -N "probe3" -n "1" "probe = \"probe3\"" $trace_loc
--
1.7.2.3
next prev parent reply other threads:[~2011-02-18 17:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-18 17:59 [ltt-dev] [UST PATCH 1/3] Try harder to find a usable lttv in the tests scripts v2 Yannick Brosseau
2011-02-18 17:59 ` Yannick Brosseau [this message]
2011-02-18 20:33 ` [ltt-dev] [UST PATCH 2/3] Use usttrace and libraries from the build directory in the test scripts Mathieu Desnoyers
2011-02-18 17:59 ` [ltt-dev] [UST PATCH 3/3] Test for the presence of valgrind in the valgrind test Yannick Brosseau
2011-02-18 20:34 ` Mathieu Desnoyers
2011-02-18 20:32 ` [ltt-dev] [UST PATCH 1/3] Try harder to find a usable lttv in the tests scripts v2 Mathieu Desnoyers
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=1298051980-20312-2-git-send-email-yannick.brosseau@gmail.com \
--to=yannick.brosseau@gmail.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