3 function check_no_fail
() {
4 if [ "$?" -ne "0" ]; then
5 echo "$0: Stopping because of error"
12 if [ "$?" -ne "0" ]; then
13 echo "!!!!!!!!!!!!!!!!!!!!!!!!"
14 echo "$0: Stopping because of error"
15 echo "!!!!!!!!!!!!!!!!!!!!!!!!"
20 function starttest
() {
21 echo "------------------------------------"
22 echo "Starting test: $1"
23 echo "------------------------------------"
27 MATCHES
="$TESTDIR/trace_matches"
29 starttest
"Test-nevents"
30 NOFAIL usttrace
$TESTDIR/test-nevents
/prog
31 NOFAIL
$MATCHES -N "an_event (100000)" -n 100000 "^ust.an_event:" $
(usttrace
-W)
32 NOFAIL
$MATCHES -N "another_event (100000)" -n 100000 "^ust.another_event:" $
(usttrace
-W)
34 starttest
"fork()/exec() test"
35 NOFAIL usttrace
-f $TESTDIR/fork
/.libs
/fork
$TESTDIR/fork
/.libs
/fork2
36 NOFAIL
$MATCHES -N "fork - before_fork" "^ust.before_fork:" $
(usttrace
-W)
37 NOFAIL
$MATCHES -N "fork - after_fork_parent" "^ust.after_fork_parent:" $
(usttrace
-W)
38 NOFAIL
$MATCHES -N "fork - after_fork_child" "^ust.after_fork_child:" $
(usttrace
-W)
39 NOFAIL
$MATCHES -N "fork - before_exec" "^ust.before_exec:" $
(usttrace
-W)
40 NOFAIL
$MATCHES -N "fork - potential_exec" "^ust.potential_exec:" $
(usttrace
-W)
41 NOFAIL
$MATCHES -N "fork - after_exec" "^ust.after_exec:" $
(usttrace
-W)
43 starttest
"libmallocwrap"
44 NOFAIL usttrace
-lm $TESTDIR/test-libmallocwrap
/.libs
/prog
45 NOFAIL
$MATCHES -N "mallocwrap - malloc" -n 1000 "^ust.malloc:.*{ size = 1[0-9][0-9][0-9]," $
(usttrace
-W)
48 starttest
"Manual mode tracing"
49 TRACE_DIR
="/tmp/ust-testsuite-manual-trace"
53 NOFAIL ustd
-o "$TRACE_DIR" >/dev
/null
2>&1 &
56 LD_PRELOAD
=/usr
/local
/lib
/libust.so
.0.0.0:/usr
/local
/lib
/libmallocwrap.so
find / >/dev
/null
2>&1 &
59 NOFAIL ustctl
--list-markers "$PID" >/dev
/null
60 NOFAIL ustctl
--enable-marker ust
/malloc
$PID
61 NOFAIL ustctl
--enable-marker ust
/free
$PID
62 NOFAIL ustctl
--create-trace $PID
63 NOFAIL ustctl
--alloc-trace $PID
64 NOFAIL ustctl
--start-trace $PID
66 NOFAIL ustctl
--stop-trace $PID
67 NOFAIL ustctl
--destroy-trace $PID
71 NOFAIL
$MATCHES -N "manual - find - ust.malloc" "^ust.malloc:" "$TRACE_DIR"
73 echo "************************************"
75 echo "************************************"
This page took 0.034269 seconds and 4 git commands to generate.