source $TESTDIR/utils/utils.sh
-# LTTng kernel modules check
-out=`ls /lib/modules/$(uname -r)/extra | grep lttng`
-if [ -z "$out" ]; then
- BAIL_OUT "LTTng modules not detected."
-fi
-
function lttng_create_session_uri
{
# Create session with default path
skip $isroot "Root access is needed. Skipping all kernel streaming tests." $NUM_TESTS ||
{
+ validate_lttng_modules_present
+
start_lttng_relayd "-o $TRACE_PATH"
start_lttng_sessiond
modprobe lttng-test
source $TESTDIR/utils/utils.sh
-# LTTng kernel modules check
-out=`ls /lib/modules/$(uname -r)/extra | grep lttng`
-if [ -z "$out" ]; then
- BAIL_OUT "LTTng modules not detected."
-fi
-
function test_kernel_local ()
{
diag "Test kernel local with statedump regeneration"
skip $isroot "Root access is needed. Skipping all kernel streaming tests." $NUM_TESTS ||
{
+ validate_lttng_modules_present
start_lttng_sessiond
modprobe lttng-test
source $TESTDIR/utils/utils.sh
source $CURDIR/rotate_utils.sh
-# LTTng kernel modules check
-out=`ls /lib/modules/$(uname -r)/extra | grep lttng`
-if [ -z "$out" ]; then
- BAIL_OUT "LTTng modules not detected."
-fi
-
function lttng_create_session_uri
{
# Create session with default path
skip $isroot "Root access is needed. Skipping all kernel streaming tests." $NUM_TESTS ||
{
+ validate_lttng_modules_present
+
start_lttng_relayd "-o $TRACE_PATH"
start_lttng_sessiond
modprobe lttng-test
source $TESTDIR/utils/utils.sh
-# LTTng kernel modules check
-out=`ls /lib/modules/$(uname -r)/extra | grep lttng`
-if [ -z "$out" ]; then
- BAIL_OUT "LTTng modules not detected."
-fi
-
function test_kernel_local_snapshot ()
{
diag "Test local kernel snapshots"
skip $isroot "Root access is needed. Skipping all kernel snapshot tests." $NUM_TESTS ||
{
+
+ validate_lttng_modules_present
+
start_lttng_sessiond
#tests=( test_kernel_1000_local_snapshots )
source $TESTDIR/utils/utils.sh
-# LTTng kernel modules check
-out=`ls /lib/modules/$(uname -r)/extra | grep lttng`
-if [ -z "$out" ]; then
- BAIL_OUT "LTTng modules not detected."
-fi
-
function snapshot_add_output ()
{
local sess_name=$1
skip $isroot "Root access is needed. Skipping all kernel streaming tests." $NUM_TESTS ||
{
+ validate_lttng_modules_present
+
start_lttng_relayd "-o $TRACE_PATH"
start_lttng_sessiond
source $TESTDIR/utils/utils.sh
-# LTTng kernel modules check
-out=`ls /lib/modules/$(uname -r)/extra | grep lttng`
-if [ -z "$out" ]; then
- BAIL_OUT "LTTng modules not detected."
-fi
-
function lttng_create_session_uri
{
# Create session with default path
skip $isroot "Root access is needed. Skipping all kernel streaming tests." $NUM_TESTS ||
{
+ validate_lttng_modules_present
+
start_lttng_relayd "-o $TRACE_PATH"
start_lttng_sessiond
echo
}
+# Check if base lttng-modules are present.
+# Bail out on failure
+function validate_lttng_modules_present ()
+{
+ modprobe -n lttng-tracer 2>/dev/null
+ if [ $? -ne 0 ]; then
+ BAIL_OUT "LTTng modules not detected."
+ fi
+}
+
function enable_kernel_lttng_event
{
local withtap="$1"