CURDIR=$(dirname $0)/
TESTDIR=$CURDIR/../..
-NUM_TESTS=8
+NUM_TESTS=10
TESTCMD="/bin/true"
check_skip_kernel_test "$NUM_TESTS" "Skipping all tests." ||
{
+ lttng_modules_loaded_fail
validate_lttng_modules_present
start_lttng_sessiond
test_all_event
stop_lttng_sessiond
+ lttng_modules_loaded_fail
}
CURDIR=$(dirname "$0")/
TESTDIR=$CURDIR/../..
-NUM_TESTS=12
+NUM_TESTS=14
TEST_APP_USERSPACE="$TESTDIR/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack"
TEST_APP_KERNELSPACE="$TESTDIR/utils/testapp/gen-syscall-events/gen-syscall-events"
PARSE_CALLSTACK="$TESTDIR/utils/parse-callstack.py"
check_skip_kernel_test "$NUM_TESTS" "Skipping all tests." ||
{
+ lttng_modules_loaded_fail
validate_lttng_modules_present
start_lttng_sessiond
test_kernel_callstack
stop_lttng_sessiond
+ lttng_modules_loaded_fail
}
CURDIR=$(dirname $0)/
TESTDIR=$CURDIR/../..
-NUM_TESTS=8
+NUM_TESTS=10
source $TESTDIR/utils/utils.sh
check_skip_kernel_test "$NUM_TESTS" "Skipping all tests." ||
{
+ lttng_modules_loaded_fail
start_lttng_sessiond
test_channel_buffer
test_channel_buffer_too_large
stop_lttng_sessiond
+ lttng_modules_loaded_fail
}
TESTDIR=$CURDIR/../..
SESSION_NAME="clock_override"
-NUM_TESTS=30
+NUM_TESTS=32
EVENT_NAME="lttng_test_filter_event"
TESTCMD="echo -n 10 > /proc/lttng-test-filter-event"
stop_lttng_tracing_ok $SESSION_NAME
destroy_lttng_session_ok $SESSION_NAME
+ modprobe --remove lttng-test
stop_lttng_sessiond
- modprobe --remove lttng-test lttng-clock-plugin-test lttng-clock
+ modprobe --remove lttng-clock-plugin-test lttng-clock
# Use Babeltrace with "-n all" to give a comma separated list for
# easy extraction of timestamps.
check_skip_kernel_test "$NUM_TESTS" "Skipping all tests." ||
{
+ lttng_modules_loaded_fail
validate_lttng_modules_present
trap signal_cleanup SIGTERM SIGINT
let "i++"
done
+ lttng_modules_loaded_fail
}
CURDIR=$(dirname $0)/
TESTDIR=$CURDIR/../..
-NUM_TESTS=21
+NUM_TESTS=23
TESTCMD="/bin/true"
check_skip_kernel_test $NUM_TESTS "Skipping all tests." ||
{
+ lttng_modules_loaded_fail
validate_lttng_modules_present
start_lttng_sessiond
test_enable_after_start
stop_lttng_sessiond
+ lttng_modules_loaded_fail
}
CURDIR=$(dirname $0)/
TESTDIR=$CURDIR/../..
-NUM_TESTS=7
+NUM_TESTS=9
source $TESTDIR/utils/utils.sh
check_skip_kernel_test "$NUM_TESTS" "Skipping all tests." ||
{
+ lttng_modules_loaded_fail
start_lttng_sessiond_notap
validate_lttng_modules_present
modprobe lttng-test
modprobe --remove lttng-test
stop_lttng_sessiond_notap
+ lttng_modules_loaded_fail
}
CURDIR=$(dirname $0)/
TESTDIR=$CURDIR/../..
-NUM_TESTS=30
+NUM_TESTS=32
PAYLOAD="test_logger"
SESSION_NAME="kernel_event_basic"
check_skip_kernel_test "$NUM_TESTS" "Skipping all tests." ||
{
+ lttng_modules_loaded_fail
validate_lttng_modules_present
start_lttng_sessiond
test_payload_limit
stop_lttng_sessiond
+ lttng_modules_loaded_fail
}
CURDIR=$(dirname "$0")/
TESTDIR=$CURDIR/../..
-TESTS_PER_NS=11
+TESTS_PER_NS=13
NUM_TESTS=$((TESTS_PER_NS * 8))
trace_path=$(mktemp -d -t "tmp.${FUNCNAME[0]}_trace_path.XXXXXX")
+ lttng_modules_loaded_fail
start_lttng_sessiond
create_lttng_session_ok "$session_name" "$trace_path"
destroy_lttng_session_ok "$session_name"
stop_lttng_sessiond
+ lttng_modules_loaded_fail
rm -rf "$trace_path"
}
TESTAPP_NAME="gen-ns-events"
TESTAPP_BIN="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME"
-TESTS_PER_NS=19
+TESTS_PER_NS=21
NUM_TESTS=$((TESTS_PER_NS * 6))
app_ns_inode=$(stat -c '%i' -L "/proc/$app_pid/ns/$ns")
ok $? "Get app current $ns namespace inode: $app_ns_inode" || app_ns_inode="invalid"
+ lttng_modules_loaded_fail
start_lttng_sessiond
create_lttng_session_ok "$session_name" "$trace_path"
# stop and destroy
destroy_lttng_session_ok "$session_name"
stop_lttng_sessiond
+ lttng_modules_loaded_fail
rm -rf "$trace_path"
rm -f "$file_sync_wait_after_unshare"
SESSION_NAME="rotation_destroy_flush"
NR_ITER=10
-NUM_TESTS=$((13*$NR_ITER))
+NUM_TESTS=$((15*$NR_ITER))
EVENT_NAME="lttng_test_filter_event"
CHANNEL_NAME="testchan"
PAGE_SIZE=$(getconf PAGE_SIZE)
function test_rotation_destroy_flush_single()
{
+ lttng_modules_loaded_fail
start_lttng_sessiond
modprobe lttng-test
modprobe --remove lttng-test
stop_lttng_sessiond
+ lttng_modules_loaded_fail
}
function test_rotation_destroy_flush()
SUPPORTED_SYSCALLS_COUNT=$(echo $SUPPORTED_SYSCALLS_LIST | awk -F '[\t,]' '{print NF}')
# Two tests validate their trace for every supported syscall
-NUM_TESTS=$((88+(2*SUPPORTED_SYSCALLS_COUNT)))
+NUM_TESTS=$((90+(2*SUPPORTED_SYSCALLS_COUNT)))
# shellcheck source=../../utils/utils.sh
source $TESTDIR/utils/utils.sh
check_skip_kernel_test "$NUM_TESTS" "Skipping all tests." ||
{
+ lttng_modules_loaded_fail
validate_lttng_modules_present
start_lttng_sessiond
test_epoll_pwait_concurrent_unmap
stop_lttng_sessiond
+ lttng_modules_loaded_fail
NEW_WARNING=$(dmesg | grep " WARNING:" | cut -d' ' -f1 | tail -1)
NEW_OOPS=$(dmesg | grep " OOPS:" | cut -d' ' -f1 | tail -1)
CURDIR=$(dirname $0)/
TESTDIR=$CURDIR/../..
-NUM_TESTS=214
+NUM_TESTS=216
# `gen-syscall-event` starts and waits for the creation a file passed by
# arguments to start executing 3 syscalls (open,read,close) and returning.
check_skip_kernel_test "$NUM_TESTS" "Skipping all tests." ||
{
+ lttng_modules_loaded_fail
validate_lttng_modules_present
start_lttng_sessiond
test_syscall_enable_channel_disable_one
stop_lttng_sessiond
+ lttng_modules_loaded_fail
}
SDT_TEST_BIN="$SDT_TEST_BIN_DIR/$SDT_TEST_BIN_NAME"
ELF_SYMBOL="test_function"
PROBE_EVENT_NAME=userspace_probe_test_event
-NUM_TESTS=93
+NUM_TESTS=95
OUTPUT_DEST=/dev/null
ERROR_OUTPUT_DEST=/dev/null
check_skip_kernel_test "$NUM_TESTS" "Skipping all tests." ||
{
+ lttng_modules_loaded_fail
validate_lttng_modules_present
start_lttng_sessiond
fi
stop_lttng_sessiond
+ lttng_modules_loaded_fail
}
PAGE_SIZE=$(getconf PAGE_SIZE)
TRACE_PATH=$(mktemp -d -t tmp.test_clear_kernel_trace_path.XXXXXX)
-NUM_TESTS=837
+NUM_TESTS=839
# shellcheck source=../utils/utils.sh
source "$TESTDIR/utils/utils.sh"
{
trap signal_cleanup SIGTERM SIGINT
+ lttng_modules_loaded_fail
validate_lttng_modules_present
start_lttng_relayd "-o $TRACE_PATH"
modprobe --remove lttng-test
stop_lttng_sessiond
stop_lttng_relayd
+ lttng_modules_loaded_fail
test_kernel_disallow_clear
}
LAST_APP_PID=
-NUM_TESTS=76
+NUM_TESTS=77
source $TESTDIR/utils/utils.sh
trap interrupt_cleanup SIGTERM SIGINT
+
for fct_test in ${TESTS[@]};
do
${fct_test}
break;
fi
done
+
+# Start and stop to clean up kernel modules
+start_lttng_sessiond_notap
+stop_lttng_sessiond_notap
+lttng_modules_loaded_fail
+
rm -rf $OUTPUT_DIR
OUTPUT_DEST=/dev/null 2>&1
SESSION_NAME="valid_filter"
NR_ITER=100
-NUM_GLOBAL_TESTS=2
+NUM_GLOBAL_TESTS=4
NUM_UST_TESTS=1122
NUM_KERNEL_TESTS=1056
NUM_TESTS=$(($NUM_UST_TESTS+$NUM_KERNEL_TESTS+$NUM_GLOBAL_TESTS))
issue_356_filter+="intfield > 6 && intfield > 7 && "
issue_356_filter+="intfield > 8 || intfield > 0"
+lttng_modules_loaded_fail
start_lttng_sessiond
### UST TESTS
test_valid_filter kernel -k "lttng_test_filter_event" "$filter" "validator_$validator"
if [ $? -eq 1 ]; then
+ # The module removal will fail if events are
+ # still being produced
+ while ! modprobe --remove lttng-test ; do
+ sleep 1
+ done
stop_lttng_sessiond
exit 1
fi
i=$(( i + 2 ))
done
- modprobe --remove lttng-test
+ # The module removal will fail if events are still being produced
+ while ! modprobe --remove lttng-test ; do
+ sleep 1
+ done
}
stop_lttng_sessiond
+lttng_modules_loaded_fail
clean_live_tracing
stop_lttng_relayd_notap
-stop_lttng_sessiond_notap
-
modprobe --remove lttng-test
+stop_lttng_sessiond_notap
TRACE_PATH=$(mktemp -d -t tmp.test_metadata_env_kernel_trace_path.XXXXXX)
-NUM_TESTS=13
+NUM_TESTS=15
source "$TESTDIR/utils/utils.sh"
check_skip_kernel_test "$NUM_TESTS" "Skipping kernel metadata tests." ||
{
+ lttng_modules_loaded_fail
validate_lttng_modules_present
modprobe lttng-test
modprobe --remove lttng-test
stop_lttng_sessiond
+ lttng_modules_loaded_fail
unset LTTNG_HOME
}
TRACE_PATH=$(mktemp -d -t tmp.test_regen_metadata_kernel_trace_path.XXXXXX)
-NUM_TESTS=32
+NUM_TESTS=34
source $TESTDIR/utils/utils.sh
check_skip_kernel_test "$NUM_TESTS" "Skipping all tests." ||
{
+ lttng_modules_loaded_fail
validate_lttng_modules_present
start_lttng_relayd "-o $TRACE_PATH"
modprobe --remove lttng-test
stop_lttng_sessiond
stop_lttng_relayd
+ lttng_modules_loaded_fail
}
TRACE_PATH=$(mktemp -d -t tmp.test_regenerate_statedump_kernel_trace_path.XXXXXX)
-NUM_TESTS=11
+NUM_TESTS=13
source $TESTDIR/utils/utils.sh
check_skip_kernel_test "$NUM_TESTS" "Skipping all tests." ||
{
+ lttng_modules_loaded_fail
validate_lttng_modules_present
start_lttng_sessiond
modprobe lttng-test
modprobe --remove lttng-test
stop_lttng_sessiond
+ lttng_modules_loaded_fail
}
TRACE_PATH=$(mktemp -d -t tmp.rotation_kernel_tracing.XXXXXX)
-NUM_TESTS=66
+NUM_TESTS=68
source $TESTDIR/utils/utils.sh
source $CURDIR/rotate_utils.sh
check_skip_kernel_test "$NUM_TESTS" "Skipping all tests." ||
{
+ lttng_modules_loaded_fail
validate_lttng_modules_present
start_lttng_relayd "-o $TRACE_PATH"
modprobe --remove lttng-test
stop_lttng_sessiond
stop_lttng_relayd
+ lttng_modules_loaded_fail
}
rm -rf $TRACE_PATH
TRACE_PATH=$(mktemp -d -t tmp.test_snapshots_kernel_trace_path.XXXXXX)
-NUM_TESTS=2061
+NUM_TESTS=2063
source $TESTDIR/utils/utils.sh
check_skip_kernel_test "$NUM_TESTS" "Skipping all tests." ||
{
-
+ lttng_modules_loaded_fail
validate_lttng_modules_present
start_lttng_sessiond
done
stop_lttng_sessiond
+ lttng_modules_loaded_fail
}
TRACE_PATH=$(mktemp -d -t tmp.test_streaming_kernel_trace_path.XXXXXX)
-NUM_TESTS=11
+NUM_TESTS=13
source $TESTDIR/utils/utils.sh
check_skip_kernel_test "$NUM_TESTS" "Skipping all tests." ||
{
+ lttng_modules_loaded_fail
validate_lttng_modules_present
start_lttng_relayd "-o $TRACE_PATH"
stop_lttng_sessiond
stop_lttng_relayd
+ lttng_modules_loaded_fail
}