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=$?