TRACE_PATH=$(mktemp -d)
SESSION_NAME="kernel_all_events_basic"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
lttng_enable_kernel_event $SESSION_NAME
TRACE_PATH=$(mktemp -d)
SESSION_NAME="kernel_event_basic"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
lttng_enable_kernel_event $SESSION_NAME "sched_switch"
lttng_enable_kernel_event $SESSION_NAME "sched_process_exit"
TRACE_PATH=$(mktemp -d)
SESSION_NAME="kernel_enable_after_start"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
lttng_enable_kernel_event $SESSION_NAME "sched_switch"
diag "Syscall simple listing"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
lttng_enable_kernel_syscall_ok $SESSION_NAME $EVENT_NAME
diag "Syscall simple listing"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
lttng_enable_kernel_syscall_ok $SESSION_NAME $EVENT_NAME
lttng_enable_kernel_syscall_ok $SESSION_NAME $EVENT_NAME2
diag "Syscall trace single"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
lttng_enable_kernel_syscall_ok $SESSION_NAME "open"
diag "Syscall trace two events"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
lttng_enable_kernel_syscall_ok $SESSION_NAME "open"
lttng_enable_kernel_syscall_ok $SESSION_NAME "close"
diag "Syscall trace all events"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
# enable all syscalls
lttng_enable_kernel_syscall_ok $SESSION_NAME
diag "Syscall trace all events and disable one"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
# enable all syscalls
lttng_enable_kernel_syscall_ok $SESSION_NAME
diag "Syscall trace all events and disable two"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
# enable all syscalls
lttng_enable_kernel_syscall_ok $SESSION_NAME
diag "Syscall trace all events and disable all"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
# enable all system calls
lttng_enable_kernel_syscall_ok $SESSION_NAME
diag "Syscall trace all events and enable/disable all"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
# enable all system calls
lttng_enable_kernel_syscall_ok $SESSION_NAME
diag "Syscall trace all events and enable/disable all twice"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
# enable all system calls
lttng_enable_kernel_syscall_ok $SESSION_NAME
diag "Syscall trace one event and disable one"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
# enable open system call
lttng_enable_kernel_syscall_ok $SESSION_NAME "open"
diag "Syscall trace two events and disable two"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
# enable open and close system calls
lttng_enable_kernel_syscall_ok $SESSION_NAME "open"
diag "Syscall trace two events and disable one"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
# enable open and close system calls
lttng_enable_kernel_syscall_ok $SESSION_NAME "open"
diag "Syscall trace one event and disable twice"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
lttng_enable_kernel_syscall_ok $SESSION_NAME "open"
# First disable will succeed
diag "Syscall trace all events and disable all twice"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
lttng_enable_kernel_syscall_ok $SESSION_NAME
# First disable will succeed
diag "Syscall enable an unknown event"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
# Enabling a syscall that does not exist succeeds, due to enabler
# semantic.
diag "Syscall enable all and enable one"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
lttng_enable_kernel_syscall_ok $SESSION_NAME
# Enabling an event already enabled succeeds, due to enabler semantic.
diag "Syscall disable all and disable one"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
lttng_enable_kernel_syscall_ok $SESSION_NAME
lttng_disable_kernel_syscall_ok $SESSION_NAME
diag "Syscall enable channel and disable all"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
lttng_enable_kernel_channel_ok $SESSION_NAME $CHANNEL_NAME
# sessiond semantic for "disable all" is to try to match all enalers
diag "Syscall enable channel and disable one"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
lttng_enable_kernel_channel_ok $SESSION_NAME $CHANNEL_NAME
lttng_disable_kernel_syscall_fail $SESSION_NAME "open" $CHANNEL_NAME
trace_path=$(mktemp -d)
# Create session
- create_lttng_session $SESSION_NAME $trace_path
+ create_lttng_session_ok $SESSION_NAME $trace_path
enable_ust_lttng_all_event_exclusion $SESSION_NAME $EV_EXCLUDE_NAME
diag "Filter: $test_invalid_filter"
# Create session
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
# Apply filter
enable_ust_lttng_event_filter $SESSION_NAME $EVENT_NAME "$test_invalid_filter"
diag "Test filter bytecode limits (64KiB)"
# Create session
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
# Apply filter
enable_ust_lttng_event_filter $SESSION_NAME $EVENT_NAME "$BYTECODE_LIMIT"
diag "Test filter expression with unsupported operator $test_op_str ($test_op_tkn)"
# Create session
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
# Create filter
if [ "$test_op_str" == "UNARY_BIN_NOT" ]; then
trace_path=$(mktemp -d)
# Create session
- create_lttng_session $SESSION_NAME $trace_path
+ create_lttng_session_ok $SESSION_NAME $trace_path
# Enable filter
enable_ust_lttng_event_filter $SESSION_NAME $EVENT_NAME $filter
OUTPUT_FILE="create_session.xml"
OUTPUT_DEST=$OUTPUT_DIR/$OUTPUT_FILE
- create_lttng_session $session_name $OUTPUT_DIR
+ create_lttng_session_ok $session_name $OUTPUT_DIR
$XML_VALIDATE $OUTPUT_DEST
ok $? "MI test: create session xsd validation"
#try to recreate a session. Expecting it to fail
- create_lttng_session $session_name $OUTPUT_DIR true
+ create_lttng_session_fail $session_name $OUTPUT_DIR
$XML_VALIDATE $OUTPUT_DEST
ok $? "MI test: expecting fail create session xsd validation"
is_command_success $OUTPUT_DEST true
#Test build up
OUTPUT_DEST=$DEVNULL
for (( i = 0; i < 3; i++ )); do
- create_lttng_session ${session_name[$i]} $OUTPUT_DIR
+ create_lttng_session_ok ${session_name[$i]} $OUTPUT_DIR
done
OUTPUT_DEST=$OUTPUT_DIR/$OUTPUT_FILE
#Test buid up
OUTPUT_DEST=$DEVNULL
for (( i = 0; i < 3; i++ )); do
- create_lttng_session ${session_name[$i]} $OUTPUT_DIR
+ create_lttng_session_ok ${session_name[$i]} $OUTPUT_DIR
done
OUTPUT_DEST=$OUTPUT_DIR/$OUTPUT_FILE
#Test buil up
OUTPUT_DEST=$DEVNULL
- create_lttng_session $session_name $OUTPUT_DIR
+ create_lttng_session_ok $session_name $OUTPUT_DIR
#Test the enable_channel command
OUTPUT_DEST=$OUTPUT_DIR/$OUTPUT_FILE
#Test build up
OUTPUT_DEST=$DEVNULL
- create_lttng_session $session_name $OUTPUT_DIR
+ create_lttng_session_ok $session_name $OUTPUT_DIR
enable_ust_lttng_channel $session_name $channel_name
OUTPUT_DEST=$OUTPUT_DIR/$OUTPUT_FILE
#Test buid up
OUTPUT_DEST=$DEVNULL
- create_lttng_session $session_name $OUTPUT_DIR
+ create_lttng_session_ok $session_name $OUTPUT_DIR
enable_ust_lttng_channel $session_name $channel_name
#Enable ust and jul events
#Test buid up
OUTPUT_DEST=$DEVNULL
- create_lttng_session $session_name $OUTPUT_DIR
+ create_lttng_session_ok $session_name $OUTPUT_DIR
enable_ust_lttng_channel $session_name $channel_name
#Enable ust and jul events
#Test buid up
OUTPUT_DEST=$DEVNULL
- create_lttng_session $session_name $OUTPUT_DIR
+ create_lttng_session_ok $session_name $OUTPUT_DIR
enable_ust_lttng_channel $session_name $channel_name
#Enable ust and jul events
#Test buid up
OUTPUT_DEST=$DEVNULL
- create_lttng_session $session_name $OUTPUT_DIR
+ create_lttng_session_ok $session_name $OUTPUT_DIR
#Test fail command
#No channel enable start command should return element success false
{
diag "Test basic save"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_ust_lttng_channel $SESSION_NAME $CHANNEL_NAME
enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
{
diag "Test basic save all"
- create_lttng_session $SESSION_NAME-1 $TRACE_PATH
- create_lttng_session $SESSION_NAME-2 $TRACE_PATH
- create_lttng_session $SESSION_NAME-3 $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME-3 $TRACE_PATH
enable_ust_lttng_channel $SESSION_NAME-1 $CHANNEL_NAME
enable_ust_lttng_channel $SESSION_NAME-2 $CHANNEL_NAME
{
diag "Test overwrite session file"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_ust_lttng_channel $SESSION_NAME $CHANNEL_NAME
enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
destroy_lttng_session $SESSION_NAME
# Create a new session with same name so we can force the overwrite
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_ust_lttng_channel $SESSION_NAME $CHANNEL_NAME
enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
diag "Test tracefile count limit : $count_limit tracefiles"
- create_lttng_session $session_name $trace_path
+ create_lttng_session_ok $session_name $trace_path
enable_lttng_channel_count_limit \
$session_name $channel_name $count_limit
diag "Test tracefile size limit : $size_limit bytes"
- create_lttng_session $session_name $trace_path
+ create_lttng_session_ok $session_name $trace_path
enable_lttng_channel_size_limit \
$session_name $channel_name $size_limit
function test_before_apps()
{
# BEFORE application is spawned
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
start_lttng_tracing $SESSION_NAME
local file_sync_after_first=$(mktemp -u)
local file_sync_before_last=$(mktemp -u)
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
$TESTAPP_BIN $NR_ITER $NR_USEC_WAIT ${file_sync_after_first} ${file_sync_before_last} &
diag "Start multiple applications AFTER tracing is started"
# BEFORE application is spawned
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_channel_per_pid $SESSION_NAME "channel0"
enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0"
start_lttng_tracing $SESSION_NAME
done
# BEFORE application is spawned
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_channel_per_pid $SESSION_NAME "channel0"
enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0"
start_lttng_tracing $SESSION_NAME
diag "Start application AFTER tracing is started"
# BEFORE application is spawned
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_channel_per_pid $SESSION_NAME "channel0"
enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0"
start_lttng_tracing $SESSION_NAME
# BEFORE application is spawned
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_channel_per_pid $SESSION_NAME "channel0"
enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0"
diag "Start with multiple channels"
# BEFORE application is spawned
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_channel_per_pid $SESSION_NAME "channel0"
enable_channel_per_pid $SESSION_NAME "channel1"
enable_channel_per_pid $SESSION_NAME "channel2"
start_lttng_sessiond
-create_lttng_session $SESSION_NAME $TRACE_PATH
+create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
start_lttng_tracing $SESSION_NAME
local file_sync_before_last=$(mktemp -u)
diag "Test JUL application BEFORE tracing starts"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_jul_lttng_event $SESSION_NAME $EVENT_NAME
# Run 5 times with a 1 second delay
{
diag "Test JUL application AFTER tracing starts"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_jul_lttng_event $SESSION_NAME $EVENT_NAME
start_lttng_tracing $SESSION_NAME
{
diag "Test JUL application with loglevel"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_jul_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "JUL_INFO"
start_lttng_tracing $SESSION_NAME
diag "Test JUL applications with lower loglevel"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_jul_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "JUL_SEVERE"
start_lttng_tracing $SESSION_NAME
diag "Test JUL applications with higher loglevel"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_jul_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "JUL_FINER"
start_lttng_tracing $SESSION_NAME
{
diag "Test JUL application with multiple loglevel"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_jul_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "JUL_INFO"
enable_jul_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "JUL_FINEST"
start_lttng_tracing $SESSION_NAME
return $?
fi
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_jul_lttng_event_loglevel $SESSION_NAME '*' "JUL_INFO"
enable_jul_lttng_event_loglevel $SESSION_NAME '*' "JUL_FINEST"
start_lttng_tracing $SESSION_NAME
{
diag "Test JUL with multiple session"
- create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
+ create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
enable_jul_loglevel_only $SESSION_NAME-1 '*' "JUL_INFO"
start_lttng_tracing $SESSION_NAME-1
- create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
+ create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
enable_jul_loglevel_only $SESSION_NAME-2 '*' "JUL_FINEST"
start_lttng_tracing $SESSION_NAME-2
{
diag "Test JUL with multiple session with disabled event"
- create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
+ create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
enable_jul_lttng_event $SESSION_NAME-1 $EVENT_NAME
enable_jul_lttng_event $SESSION_NAME-1 $EVENT_NAME2
disable_jul_lttng_event $SESSION_NAME-1 $EVENT_NAME
start_lttng_tracing $SESSION_NAME-1
- create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
+ create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
enable_jul_lttng_event $SESSION_NAME-2 $EVENT_NAME2
start_lttng_tracing $SESSION_NAME-2
{
diag "Test JUL with multiple session with disabled wildcard event"
- create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
+ create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
enable_jul_lttng_event $SESSION_NAME-1 '*'
- create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
+ create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
enable_jul_lttng_event $SESSION_NAME-2 '*'
disable_jul_lttng_event $SESSION_NAME-1 '*'
{
diag "Test JUL with multiple session with disabled all event"
- create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME
enable_jul_lttng_event $SESSION_NAME '*'
enable_jul_lttng_event $SESSION_NAME $EVENT_NAME
enable_jul_lttng_event $SESSION_NAME $EVENT_NAME2
{
diag "Test JUL with multiple session"
- create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
+ create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
enable_jul_lttng_event $SESSION_NAME-1 $EVENT_NAME
start_lttng_tracing $SESSION_NAME-1
- create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
+ create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
enable_jul_lttng_event $SESSION_NAME-2 $EVENT_NAME2
start_lttng_tracing $SESSION_NAME-2
{
diag "Test JUL two session with destroy"
- create_lttng_session $SESSION_NAME $TRACE_PATH/first-sess
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/first-sess
enable_jul_lttng_event $SESSION_NAME $EVENT_NAME
start_lttng_tracing $SESSION_NAME
return $?
fi
- create_lttng_session $SESSION_NAME $TRACE_PATH/second-sess
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/second-sess
enable_jul_lttng_event $SESSION_NAME $EVENT_NAME2
start_lttng_tracing $SESSION_NAME
{
diag "Test JUL filtering"
- create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME
# Enable all event with a filter.
enable_jul_filter $SESSION_NAME '*' 'msg == "JUL second logger fired"'
start_lttng_tracing $SESSION_NAME
return $?
fi
- create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME
# Enable first Logger but filter msg payload for the INFO one while
# triggering the finest and second TP.
enable_jul_filter $SESSION_NAME $EVENT_NAME 'msg == "JUL tp fired!"'
{
diag "Test JUL disable event"
- create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME
# Enable all event with a filter.
enable_jul_lttng_event $SESSION_NAME $EVENT_NAME
enable_jul_lttng_event $SESSION_NAME $EVENT_NAME2
{
diag "Test JUL disable event followed by an enable"
- create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME
# Enable all event with a filter.
enable_jul_lttng_event $SESSION_NAME $EVENT_NAME
disable_jul_lttng_event $SESSION_NAME $EVENT_NAME
diag "Test JUL a filter with a loglevel"
- create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME
# Enable an event with a filter and the loglevel-only option.
enable_jul_filter_loglevel_only $SESSION_NAME $BOGUS_EVENT_NAME "$FILTER" JUL_CONFIG
disable_jul_lttng_event $SESSION_NAME $BOGUS_EVENT_NAME
local file_sync_before_last=$(mktemp -u)
diag "Test LOG4J application BEFORE tracing starts"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME
# Run 5 times with a 1 second delay
{
diag "Test LOG4J application AFTER tracing starts"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME
start_lttng_tracing $SESSION_NAME
{
diag "Test LOG4J application with loglevel"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_log4j_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "LOG4J_INFO"
start_lttng_tracing $SESSION_NAME
diag "Test LOG4J applications with lower loglevel"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_log4j_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "LOG4J_FATAL"
start_lttng_tracing $SESSION_NAME
diag "Test LOG4J applications with higher loglevel"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_log4j_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "LOG4J_TRACE"
start_lttng_tracing $SESSION_NAME
{
diag "Test LOG4J application with multiple loglevel"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_log4j_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "LOG4J_INFO"
enable_log4j_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "LOG4J_DEBUG"
start_lttng_tracing $SESSION_NAME
return $?
fi
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_log4j_lttng_event_loglevel $SESSION_NAME '*' "LOG4J_INFO"
enable_log4j_lttng_event_loglevel $SESSION_NAME '*' "LOG4J_DEBUG"
start_lttng_tracing $SESSION_NAME
{
diag "Test LOG4J with multiple session"
- create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
+ create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
enable_log4j_loglevel_only $SESSION_NAME-1 '*' "LOG4J_INFO"
start_lttng_tracing $SESSION_NAME-1
- create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
+ create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
enable_log4j_loglevel_only $SESSION_NAME-2 '*' "LOG4J_DEBUG"
start_lttng_tracing $SESSION_NAME-2
{
diag "Test LOG4J with multiple session with disabled event"
- create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
+ create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
enable_log4j_lttng_event $SESSION_NAME-1 $EVENT_NAME
enable_log4j_lttng_event $SESSION_NAME-1 $EVENT_NAME2
disable_log4j_lttng_event $SESSION_NAME-1 $EVENT_NAME
start_lttng_tracing $SESSION_NAME-1
- create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
+ create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
enable_log4j_lttng_event $SESSION_NAME-2 $EVENT_NAME2
start_lttng_tracing $SESSION_NAME-2
{
diag "Test LOG4J with multiple session with disabled wildcard event"
- create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
+ create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
enable_log4j_lttng_event $SESSION_NAME-1 '*'
- create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
+ create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
enable_log4j_lttng_event $SESSION_NAME-2 '*'
disable_log4j_lttng_event $SESSION_NAME-1 '*'
{
diag "Test LOG4J with multiple session with disabled all event"
- create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME
enable_log4j_lttng_event $SESSION_NAME '*'
enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME
enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME2
{
diag "Test LOG4J with multiple session"
- create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
+ create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
enable_log4j_lttng_event $SESSION_NAME-1 $EVENT_NAME
start_lttng_tracing $SESSION_NAME-1
- create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
+ create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
enable_log4j_lttng_event $SESSION_NAME-2 $EVENT_NAME2
start_lttng_tracing $SESSION_NAME-2
{
diag "Test LOG4J two session with destroy"
- create_lttng_session $SESSION_NAME $TRACE_PATH/first-sess
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/first-sess
enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME
start_lttng_tracing $SESSION_NAME
return $?
fi
- create_lttng_session $SESSION_NAME $TRACE_PATH/second-sess
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/second-sess
enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME2
start_lttng_tracing $SESSION_NAME
{
diag "Test LOG4J filtering"
- create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME
# Enable all event with a filter.
enable_log4j_filter $SESSION_NAME '*' 'msg == "LOG4J second logger fired"'
start_lttng_tracing $SESSION_NAME
return $?
fi
- create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME
# Enable first Logger but filter msg payload for the INFO one while
# triggering the debug and second TP.
enable_log4j_filter $SESSION_NAME $EVENT_NAME 'msg == "LOG4J tp fired!"'
{
diag "Test LOG4J disable event"
- create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME
# Enable all event with a filter.
enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME
enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME2
{
diag "Test LOG4J disable event followed by an enable"
- create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME
# Enable all event with a filter.
enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME
disable_log4j_lttng_event $SESSION_NAME $EVENT_NAME
diag "Test LOG4J a filter with a loglevel"
- create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME
# Enable an event with a filter and the loglevel-only option.
enable_log4j_filter_loglevel_only $SESSION_NAME $BOGUS_EVENT_NAME "$FILTER" LOG4J_INFO
disable_log4j_lttng_event $SESSION_NAME $BOGUS_EVENT_NAME
start_lttng_sessiond
-create_lttng_session $SESSION_NAME $TRACE_PATH
+create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
start_lttng_tracing $SESSION_NAME
# BEFORE application is spawned
for i in `seq 0 3`; do
- create_lttng_session "$SESSION_NAME-$i" "$TRACE_PATH/$i"
+ create_lttng_session_ok "$SESSION_NAME-$i" "$TRACE_PATH/$i"
enable_ust_lttng_event "$SESSION_NAME-$i" "$EVENT_NAME$i"
start_lttng_tracing "$SESSION_NAME-$i"
done
TRACE_PATH=$(mktemp -d)
-create_lttng_session $SESSION_NAME $TRACE_PATH
+create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
start_lttng_tracing $SESSION_NAME
TRACE_PATH=$(mktemp -d)
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
# Execute test
${TESTS[$i]}
diag "Start application AFTER tracing is started"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_metadata_per_pid $SESSION_NAME
enable_channel_per_pid $SESSION_NAME "channel0"
enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0"
start_trace_app
# Start application before tracing
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_metadata_per_pid $SESSION_NAME
enable_channel_per_pid $SESSION_NAME "channel0"
enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0"
diag "Start application AFTER tracing is started"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_metadata_per_uid $SESSION_NAME
enable_channel_per_uid $SESSION_NAME "channel0"
enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0"
# Start application before tracing
start_trace_app
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_metadata_per_uid $SESSION_NAME
enable_channel_per_uid $SESSION_NAME "channel0"
enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0"
function test_python_before_start ()
{
diag "Test Python application BEFORE tracing starts"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_python_lttng_event $SESSION_NAME $EVENT_NAME
# Run 5 times with a 1 second delay
{
diag "Test Python application AFTER tracing starts"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_python_lttng_event $SESSION_NAME $EVENT_NAME
start_lttng_tracing $SESSION_NAME
{
diag "Test Python application with loglevel"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_python_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "INFO"
start_lttng_tracing $SESSION_NAME
diag "Test Python applications with lower loglevel"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_python_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "CRITICAL"
start_lttng_tracing $SESSION_NAME
diag "Test Python applications with higher loglevel"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_python_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "DEBUG"
start_lttng_tracing $SESSION_NAME
{
diag "Test Python application with multiple loglevel"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_python_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "INFO"
enable_python_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "DEBUG"
start_lttng_tracing $SESSION_NAME
return $?
fi
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_python_lttng_event_loglevel $SESSION_NAME '*' "INFO"
enable_python_lttng_event_loglevel $SESSION_NAME '*' "DEBUG"
start_lttng_tracing $SESSION_NAME
{
diag "Test Python with multiple session"
- create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
+ create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
enable_python_loglevel_only $SESSION_NAME-1 '*' "INFO"
start_lttng_tracing $SESSION_NAME-1
- create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
+ create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
enable_python_loglevel_only $SESSION_NAME-2 '*' "DEBUG"
start_lttng_tracing $SESSION_NAME-2
{
diag "Test Python with multiple session with disabled event"
- create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
+ create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
enable_python_lttng_event $SESSION_NAME-1 $EVENT_NAME
enable_python_lttng_event $SESSION_NAME-1 $EVENT_NAME2
disable_python_lttng_event $SESSION_NAME-1 $EVENT_NAME
start_lttng_tracing $SESSION_NAME-1
- create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
+ create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
enable_python_lttng_event $SESSION_NAME-2 $EVENT_NAME2
start_lttng_tracing $SESSION_NAME-2
{
diag "Test Python with multiple session with disabled wildcard event"
- create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
+ create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
enable_python_lttng_event $SESSION_NAME-1 '*'
- create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
+ create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
enable_python_lttng_event $SESSION_NAME-2 '*'
disable_python_lttng_event $SESSION_NAME-1 '*'
{
diag "Test Python with multiple session with disabled all event"
- create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME
enable_python_lttng_event $SESSION_NAME '*'
enable_python_lttng_event $SESSION_NAME $EVENT_NAME
enable_python_lttng_event $SESSION_NAME $EVENT_NAME2
{
diag "Test Python with multiple session"
- create_lttng_session $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
+ create_lttng_session_ok $SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
enable_python_lttng_event $SESSION_NAME-1 $EVENT_NAME
start_lttng_tracing $SESSION_NAME-1
- create_lttng_session $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
+ create_lttng_session_ok $SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
enable_python_lttng_event $SESSION_NAME-2 $EVENT_NAME2
start_lttng_tracing $SESSION_NAME-2
{
diag "Test Python two session with destroy"
- create_lttng_session $SESSION_NAME $TRACE_PATH/first-sess
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/first-sess
enable_python_lttng_event $SESSION_NAME $EVENT_NAME
start_lttng_tracing $SESSION_NAME
return $?
fi
- create_lttng_session $SESSION_NAME $TRACE_PATH/second-sess
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/second-sess
enable_python_lttng_event $SESSION_NAME $EVENT_NAME2
start_lttng_tracing $SESSION_NAME
{
diag "Test Python filtering"
- create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME
# Enable all event with a filter.
enable_python_filter $SESSION_NAME '*' 'msg == "python-ev-test2 fired"'
start_lttng_tracing $SESSION_NAME
return $?
fi
- create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME
# Enable first Logger but filter msg payload for the INFO one while
# triggering the debug and second TP.
enable_python_filter $SESSION_NAME $EVENT_NAME 'msg == "python-ev-test1 fired"'
{
diag "Test Python disable event"
- create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME
# Enable all event with a filter.
enable_python_lttng_event $SESSION_NAME $EVENT_NAME
enable_python_lttng_event $SESSION_NAME $EVENT_NAME2
{
diag "Test Python disable event followed by an enable"
- create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME
# Enable all event with a filter.
enable_python_lttng_event $SESSION_NAME $EVENT_NAME
disable_python_lttng_event $SESSION_NAME $EVENT_NAME
diag "Test Python a filter with a loglevel"
- create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH/$SESSION_NAME
# Enable an event with a filter and the loglevel-only option.
enable_python_filter_loglevel_only $SESSION_NAME $BOGUS_EVENT_NAME "$FILTER" "INFO"
disable_python_lttng_event $SESSION_NAME $BOGUS_EVENT_NAME
EVENT_NAME2="ev2"
EVENT_NAME3="ev3"
- create_lttng_session $SESSION_NAME $TRACE_PATH
- create_lttng_session $SESSION_NAME2 $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME2 $TRACE_PATH
enable_ust_lttng_channel $SESSION_NAME $CHAN_NAME
enable_ust_lttng_channel $SESSION_NAME2 $CHAN_NAME2
SESSION_NAME="ust_event_basic"
CHAN_NAME="mychan"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_ust_lttng_channel $SESSION_NAME $CHAN_NAME
function test_event_tracef()
{
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
start_lttng_tracing $SESSION_NAME
EVENT_NAME="*"
EVENT_NAME2="abc*"
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_ust_lttng_event $SESSION_NAME "$EVENT_NAME"
enable_ust_lttng_event $SESSION_NAME "$EVENT_NAME2"
{
for b in $(seq 1 $NR_LOOP); do
for a in $(seq 1 $NR_SESSION); do
- create_lttng_session $SESSION_NAME-$a $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME-$a $TRACE_PATH
check_sessiond
enable_channel_per_uid $SESSION_NAME-$a $CHANNEL_NAME
check_sessiond
function create_lttng_session ()
{
- local sess_name=$1
- local trace_path=$2
- local expected_to_fail=$3
+ local expected_to_fail=$1
+ local sess_name=$2
+ local trace_path=$3
$TESTDIR/../src/bin/lttng/$LTTNG_BIN create $sess_name -o $trace_path > $OUTPUT_DEST
ret=$?
- if [[ $expected_to_fail ]]; then
+ if [[ $expected_to_fail -eq "1" ]]; then
test "$ret" -ne "0"
ok $? "Expected fail on session creation $sess_name in $trace_path"
else
fi
}
+function create_lttng_session_ok ()
+{
+ create_lttng_session 0 "$@"
+}
+
+function create_lttng_session_fail ()
+{
+ create_lttng_session 1 "$@"
+}
+
+
function enable_ust_lttng_channel()
{
local sess_name=$1