Test: unix socket: test credential passing
[lttng-tools.git] / tests / stress / launch_ust_app
CommitLineData
605ac758
DG
1#!/bin/bash
2#
9d16b343 3# Copyright (C) 2013 David Goulet <dgoulet@efficios.com>
605ac758 4#
9d16b343 5# SPDX-License-Identifier: LGPL-2.1-only
605ac758 6#
605ac758
DG
7
8CURDIR=$(dirname $0)/
9TESTDIR=$CURDIR/..
10
11NR_APP=1
12NR_USEC_WAIT=5000000
13NR_APP_LOOP=1
14
15TESTAPP_PATH="$TESTDIR/utils/testapp"
16TESTAPP_NAME="gen-ust-events"
17TESTAPP_BIN="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME"
18
19source $TESTDIR/utils/utils.sh
20
21if [ ! -x "$TESTAPP_BIN" ]; then
22 BAIL_OUT "No UST nevents binary detected."
23fi
24
25# Number of application to spawn.
26if [ -n "$1" ]; then
27 NR_APP=$1
28fi
29
30# Number of seconds before the next loop is done in the app.
31if [ -n "$2" ]; then
32 NR_USEC_WAIT=$(echo $(( $2 * 1000000 )))
33fi
34
35# Number of loop the application should do meaning one TP is hit per loop.
36if [ -n "$3" ]; then
37 NR_APP_LOOP=$3
38fi
39
40# MUST set TESTDIR before this point.
41
42# Infinite loop. Spawns NR_APP apps for NR_USEC_WAIT doing NR_APP_LOOP.
43while :; do
44 for j in `seq 1 $NR_APP`; do
6c4a91d6 45 $TESTAPP_BIN -i $NR_APP_LOOP -w $NR_USEC_WAIT >/dev/null 2>&1 &
605ac758
DG
46 done
47 # Wait before the next round of applications.
48 sleep 3
49done
This page took 0.06382 seconds and 5 git commands to generate.