X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Ffork%2Ffork.sh;fp=tests%2Ffork%2Ffork.sh;h=2c02e947434625caaa3717738502ce8284ea2386;hb=dd7a064c5953d06fbd6010f0a0f4a6f94df01a9f;hp=0000000000000000000000000000000000000000;hpb=72d022d60207b479177401cfdeddeb685d5aa85f;p=ust.git diff --git a/tests/fork/fork.sh b/tests/fork/fork.sh new file mode 100755 index 0000000..2c02e94 --- /dev/null +++ b/tests/fork/fork.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# +# Copyright 2010 Ericsson AB +# +# This file is part of LTTng-UST. +# +# LTTng-UST is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# LTTng-UST is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with LTTng-UST. If not, see . + +TESTDIR=$(dirname $0)/.. + +source $TESTDIR/test_functions.sh +source $TESTDIR/tap.sh + +starttest "fork()/exec() test" + +plan_tests 8 + +okx usttrace -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 +trace_matches -N "before_exec" "^ust.before_exec:" $trace_loc +trace_matches -N "potential_exec" "^ust.potential_exec:" $trace_loc +trace_matches -N "after_exec" "^ust.after_exec:" $trace_loc +check_trace_logs "$trace_loc"