Use usttrace and libraries from the build directory in the test scripts
authorYannick Brosseau <yannick.brosseau@gmail.com>
Fri, 18 Feb 2011 21:57:07 +0000 (16:57 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Fri, 18 Feb 2011 21:57:07 +0000 (16:57 -0500)
Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests/dlopen/dlopen.sh
tests/fork/fork.sh
tests/manual_mode_tracing.sh
tests/same_line_marker/same_line_marker.sh
tests/test-libustinstr-malloc/test-libustinstr-malloc.sh
tests/test-nevents/test-nevents.sh
tests/tracepoint/run

index 723f038cee50656b90da7b1adc7a4a71fa0c89d4..673fdbc9fa448554995f2ba8a840aaed94d2fa6d 100755 (executable)
@@ -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
index 2c02e947434625caaa3717738502ce8284ea2386..631c9d5268f076d3b196e21fd056c4985e0ead2a 100755 (executable)
@@ -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
index b60a957084c458fd3e98822dc2a778c92c5a6f41..bd85083bc8a9e33f325e7f1fba74a9935cc6092c 100755 (executable)
@@ -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}
index e391ec3e497485d8757bd2c7b9da8c4b084e2567..c3688edebc4c800f4285016912f10f81ca5fc1b5 100755 (executable)
@@ -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
index 2daa4b5d2d9cbab128b66b002063e1397c74147b..04ed64df4d61a258bf01471d2d69a9b78af65474 100755 (executable)
@@ -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"
index 03ff87f85b24c4e3f84f8c8beb41817969e5c47e..2a7a98a7e513f13d962b2ef807522891b85444f5 100755 (executable)
@@ -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"
index 0da98641ccd4bbcdc0f8ef840c2e171fc8f6bd39..f0d9ed103f0eb8f469484b32d8db1b717f7d213b 100755 (executable)
@@ -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
This page took 0.028638 seconds and 4 git commands to generate.