3 # Copyright (C) - 2013 David Goulet <dgoulet@efficios.com>
5 # This library is free software; you can redistribute it and/or modify it under
6 # the terms of the GNU Lesser General Public License as published by the Free
7 # Software Foundation; version 2.1 of the License.
9 # This library is distributed in the hope that it will be useful, but WITHOUT
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14 # You should have received a copy of the GNU Lesser General Public License
15 # along with this library; if not, write to the Free Software Foundation, Inc.,
16 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 # We use the .libs/ binary since it's run from the repository.
21 REPO_RELAYD_BIN
="lt-lttng-relayd"
23 # Number of seconds the we sleep before killing the relayd. If RANDOM_KILL is
24 # defined, it's between 1 and 10 seconds.
30 source $TESTDIR/utils
/utils.sh
34 return $
(echo $RANDOM % $NR_SEC + 1 |
bc)
37 function kill_relayd
()
39 if [ $RANDOM_KILL -eq 1 ]; then
40 # Something between 1 and NR_SEC seconds.
46 killall
-q -9 $REPO_RELAYD_BIN >/dev
/null
2>&1
49 # Do we have to run in an infinite loop ?
54 # Should it be a random kill or not ?
59 # MUST set TESTDIR before this point.
61 if [ $KILL_LOOP -eq 0 ]; then
This page took 0.033677 seconds and 5 git commands to generate.