NR_SESSION=5
NR_LOOP=1000
COREDUMP_FILE=$(cat /proc/sys/kernel/core_pattern)
+APPS_PID=
TEST_DESC="Stress test - $NR_SESSION sessions per UID with $NR_APP apps"
function cleanup()
{
diag "Cleaning up!"
- killall -9 $LAUNCH_APP
+ for p in ${APPS_PID}; do
+ kill -s SIGKILL ${p}
+ wait ${p} 2>/dev/null
+ done
+ APPS_PID=
stop_lttng_sessiond
}
}
trap sighandler SIGINT
+trap sighandler SIGTERM
# Make sure we collect a coredump if possible.
ulimit -c unlimited
# Start NR_APP applications script that will spawn apps non stop.
./$TESTDIR/stress/$LAUNCH_APP $NR_APP &
+APPS_PID="${APPS_PID} ${!}"
TRACE_PATH=$(mktemp -d)
NR_LOOP=1000
COREDUMP_FILE=$(cat /proc/sys/kernel/core_pattern)
NUM_TESTS=16
+APPS_PID=
TEST_DESC="Stress test - $NR_SESSION sessions per UID streaming with $NR_APP apps"
function cleanup()
{
diag "Cleaning up!"
- killall -9 $LAUNCH_APP
+ for p in ${APPS_PID}; do
+ kill -s SIGKILL ${p}
+ wait ${p} 2>/dev/null
+ done
+ APPS_PID=
stop_lttng_sessiond
stop_lttng_relayd
}
}
trap sighandler SIGINT
+trap sighandler SIGTERM
# Make sure we collect a coredump if possible.
ulimit -c unlimited
# Start NR_APP applications script that will spawn apps non stop.
./$TESTDIR/stress/$LAUNCH_APP $NR_APP &
+APPS_PID="${APPS_PID} ${!}"
test_stress
out=$?
NR_LOOP=100000
COREDUMP_FILE=$(cat /proc/sys/kernel/core_pattern)
NUM_TESTS=16
+APPS_PID=
TEST_DESC="Stress test - $NR_SESSION sessions per UID streaming with $NR_APP apps. The relayd is killed sporadically"
function cleanup()
{
diag "Cleaning up!"
- killall -9 $LAUNCH_APP
- killall -9 $KILL_RELAYD_HELPER
+ for p in ${APPS_PID}; do
+ kill ${p}
+ wait ${p} 2>/dev/null
+ done
+ APPS_PID=
stop_lttng_sessiond
stop_lttng_relayd
}
}
trap sighandler SIGINT
+trap sighandler SIGTERM
# Make sure we collect a coredump if possible.
ulimit -c unlimited
# Start NR_APP applications script that will spawn apps non stop.
./$TESTDIR/stress/$LAUNCH_APP $NR_APP &
+APPS_PID="${APPS_PID} ${!}"
+
# Launch the helper script that will randomly kill the relayd at vitam eternam.
./$TESTDIR/stress/$KILL_RELAYD_HELPER 1 1 &
+APPS_PID="${APPS_PID} ${!}"
test_stress
out=$?