create_lttng_session_no_output $SESSION_NAME
diag "With UST consumer daemons"
- enable_ust_lttng_event $SESSION_NAME $UST_EVENT_NAME $CHANNEL_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $UST_EVENT_NAME $CHANNEL_NAME
skip $isroot "Root access is needed. Skipping kernel consumer health check test." "1" ||
{
diag "With UST consumer daemons"
create_lttng_session_no_output $SESSION_NAME
- enable_ust_lttng_event $SESSION_NAME $UST_EVENT_NAME $CHANNEL_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $UST_EVENT_NAME $CHANNEL_NAME
start_lttng_tracing $SESSION_NAME
destroy_lttng_session $SESSION_NAME
-U net://localhost >/dev/null 2>&1
ok $? "Create session in live mode with delay $DELAY_USEC"
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME
start_lttng_tracing $SESSION_NAME
}
OUTPUT_DEST=$OUTPUT_DIR/$OUTPUT_FILE
#Test the enable event for ust domain
- enable_ust_lttng_event $session_name ${event[0]} $channel_name
+ enable_ust_lttng_event_ok $session_name ${event[0]} $channel_name
$XML_VALIDATE $OUTPUT_DEST
ok $? "Mi test: Enable_event for ust domain xsd validation"
is_command_success $OUTPUT_DEST false
#Try to reenable an enabled event. Should fail
- enable_ust_lttng_event $session_name ${event[0]} $channel_name true
+ enable_ust_lttng_event_fail $session_name ${event[0]} $channel_name
$XML_VALIDATE $OUTPUT_DEST
ok $? "Mi test: Fail enable_event for ust domain xsd validation"
is_command_success $OUTPUT_DEST true
#Event[*] print all the element inside the array with the IFS in between
concat_event=$( IFS=$','; echo "${event[*]}" )
- enable_ust_lttng_event $session_name $concat_event $channel_name true
+ enable_ust_lttng_event_fail $session_name $concat_event $channel_name
$XML_VALIDATE $OUTPUT_DEST
ok $? "Mi test: Multiple enable ust event with inside fail xsd validation"
#Enable ust and jul events
concat_event=$( IFS=$','; echo "${event[*]}" )
- enable_ust_lttng_event $session_name $concat_event $channel_name
+ enable_ust_lttng_event_ok $session_name $concat_event $channel_name
#Begin testing
OUTPUT_DEST=$OUTPUT_DIR/$OUTPUT_FILE
#Enable ust and jul events
concat_event=$( IFS=$','; echo "${event[*]}" )
- enable_ust_lttng_event $session_name $concat_event $channel_name
+ enable_ust_lttng_event_ok $session_name $concat_event $channel_name
enable_jul_lttng_event $session_name $concat_event $channel_name
#Begin testing
#Enable ust and jul events
concat_event=$( IFS=$','; echo "${event[*]}" )
- enable_ust_lttng_event $session_name $concat_event $channel_name
+ enable_ust_lttng_event_ok $session_name $concat_event $channel_name
enable_jul_lttng_event $session_name $concat_event $channel_name
#Begin testing
create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_ust_lttng_channel_ok $SESSION_NAME $CHANNEL_NAME
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
lttng_save $SESSION_NAME "-o $TRACE_PATH"
enable_ust_lttng_channel_ok $SESSION_NAME-2 $CHANNEL_NAME
enable_ust_lttng_channel_ok $SESSION_NAME-3 $CHANNEL_NAME
- enable_ust_lttng_event $SESSION_NAME-1 $EVENT_NAME $CHANNEL_NAME
- enable_ust_lttng_event $SESSION_NAME-2 $EVENT_NAME $CHANNEL_NAME
- enable_ust_lttng_event $SESSION_NAME-3 $EVENT_NAME $CHANNEL_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME-1 $EVENT_NAME $CHANNEL_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME-2 $EVENT_NAME $CHANNEL_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME-3 $EVENT_NAME $CHANNEL_NAME
lttng_save "" "-a -o $TRACE_PATH"
create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_ust_lttng_channel_ok $SESSION_NAME $CHANNEL_NAME
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
lttng_save $SESSION_NAME "-o $TRACE_PATH"
# Create a new session with same name so we can force the overwrite
create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_ust_lttng_channel_ok $SESSION_NAME $CHANNEL_NAME
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
# This one MUST fail
save_lttng_fail $SESSION_NAME "-o $TRACE_PATH"
diag "Test UST snapshot streaming with default name with delete output"
create_lttng_session_no_output $SESSION_NAME
enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing $SESSION_NAME
start_test_app
diag "Test UST snapshot streaming with default name"
create_lttng_session_no_output $SESSION_NAME
enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing $SESSION_NAME
start_test_app
diag "Test UST snapshot streaming with default name with custom URL"
create_lttng_session_no_output $SESSION_NAME
enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing $SESSION_NAME
start_test_app
diag "Test UST snapshot streaming with custom name"
create_lttng_session_no_output $SESSION_NAME
enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing $SESSION_NAME
start_test_app
diag "Test UST snapshot output listing"
create_lttng_session_no_output $SESSION_NAME
enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing $SESSION_NAME
diag "Test local UST snapshots"
create_lttng_session_no_output $SESSION_NAME
enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing $SESSION_NAME
lttng_snapshot_add_output $SESSION_NAME $TRACE_PATH
enable_mmap_overwrite_subbuf_ust_channel $SESSION_NAME $CHANNEL_NAME $subbuf_size
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing $SESSION_NAME
snapshot_add_output $SESSION_NAME "file://$TRACE_PATH" "" $max_size
diag "Test local UST snapshots with > 4kB metadata"
create_lttng_session_no_output $SESSION_NAME
enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
- enable_ust_lttng_event $SESSION_NAME $LM_EVENT $CHANNEL_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $LM_EVENT $CHANNEL_NAME
start_lttng_tracing $SESSION_NAME
lttng_snapshot_add_output $SESSION_NAME $TRACE_PATH
$LM_BIN 1 1
diag "Test local UST snapshots"
create_lttng_session_no_output $SESSION_NAME
enable_channel_per_uid_mmap_overwrite $SESSION_NAME $CHANNEL_NAME
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing $SESSION_NAME
lttng_snapshot_add_output $SESSION_NAME $TRACE_PATH
diag "Test local UST snapshots post-mortem"
create_lttng_session_no_output $SESSION_NAME
enable_channel_per_uid_mmap_overwrite $SESSION_NAME $CHANNEL_NAME
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing $SESSION_NAME
lttng_snapshot_add_output $SESSION_NAME $TRACE_PATH
diag "Test $NR_SNAPSHOT local UST snapshots"
create_lttng_session_no_output $SESSION_NAME
enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing $SESSION_NAME
lttng_snapshot_add_output $SESSION_NAME $TRACE_PATH
{
NETWORK_URI="net://localhost"
create_lttng_session_with_uri $SESSION_NAME $NETWORK_URI
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME
start_lttng_tracing $SESSION_NAME
run_apps
diag "Waiting for applications to end"
diag "Test UST streaming BEFORE tracing starts"
lttng_create_session_uri
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME
# Run 5 times with a 1 second delay
$TESTAPP_BIN $NR_ITER $NR_USEC_WAIT ${file_sync_after_first} ${file_sync_before_last} /dev/null 2>&1 &
diag "Test UST streaming AFTER tracing starts"
lttng_create_session_uri
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME
start_lttng_tracing $SESSION_NAME
# Run 5 times with a 1 second delay
{
# BEFORE application is spawned
create_lttng_session_ok $SESSION_NAME $TRACE_PATH
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME
start_lttng_tracing $SESSION_NAME
$TESTAPP_BIN $NR_ITER $NR_USEC_WAIT &
local file_sync_before_last=$(mktemp -u)
create_lttng_session_ok $SESSION_NAME $TRACE_PATH
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME
$TESTAPP_BIN $NR_ITER $NR_USEC_WAIT ${file_sync_after_first} ${file_sync_before_last} &
ok $? "Application started in background."
# BEFORE application is spawned
create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_channel_per_pid $SESSION_NAME "channel0"
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0"
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME "channel0"
start_lttng_tracing $SESSION_NAME
for i in `seq 1 5`; do
# BEFORE application is spawned
create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_channel_per_pid $SESSION_NAME "channel0"
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0"
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME "channel0"
start_lttng_tracing $SESSION_NAME
for i in `seq 1 5`; do
# BEFORE application is spawned
create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_channel_per_pid $SESSION_NAME "channel0"
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0"
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME "channel0"
start_lttng_tracing $SESSION_NAME
$TESTAPP_BIN $NR_ITER $NR_USEC_WAIT &
# BEFORE application is spawned
create_lttng_session_ok $SESSION_NAME $TRACE_PATH
enable_channel_per_pid $SESSION_NAME "channel0"
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME "channel0"
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME "channel0"
$TESTAPP_BIN $NR_ITER $NR_USEC_WAIT ${file_sync_after_first} ${file_sync_before_last} &
ok $? "Start application to trace"
create_lttng_session_ok $SESSION_NAME $TRACE_PATH
-enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
+enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME
start_lttng_tracing $SESSION_NAME
for i in `seq 1 $NR_APP`; do
create_lttng_session_ok $SESSION_NAME $TRACE_PATH
-enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
+enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME
start_lttng_tracing $SESSION_NAME
# This is going to take 20 minutes
# BEFORE application is spawned
for i in `seq 0 3`; do
create_lttng_session_ok "$SESSION_NAME-$i" "$TRACE_PATH/$i"
- enable_ust_lttng_event "$SESSION_NAME-$i" "$EVENT_NAME$i"
+ enable_ust_lttng_event_ok "$SESSION_NAME-$i" "$EVENT_NAME$i"
start_lttng_tracing "$SESSION_NAME-$i"
done
create_lttng_session_ok $SESSION_NAME $TRACE_PATH
-enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
+enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME
start_lttng_tracing $SESSION_NAME
touch ${file_sync_before_last}
diag "Simple wildcard overlap"
- enable_ust_lttng_event $SESSION_NAME "$event_wild1"
- enable_ust_lttng_event $SESSION_NAME "$event_wild2"
+ enable_ust_lttng_event_ok $SESSION_NAME "$event_wild1"
+ enable_ust_lttng_event_ok $SESSION_NAME "$event_wild2"
start_lttng_tracing $SESSION_NAME
diag "Enable bad wildcard"
- enable_ust_lttng_event $SESSION_NAME "$event_wild1"
- enable_ust_lttng_event $SESSION_NAME "$event_wild2"
- enable_ust_lttng_event $SESSION_NAME "$event_wild3"
+ enable_ust_lttng_event_ok $SESSION_NAME "$event_wild1"
+ enable_ust_lttng_event_ok $SESSION_NAME "$event_wild2"
+ enable_ust_lttng_event_ok $SESSION_NAME "$event_wild3"
start_lttng_tracing $SESSION_NAME
diag "Simple wildcard 2"
- enable_ust_lttng_event $SESSION_NAME "$event_wild1"
- enable_ust_lttng_event $SESSION_NAME "$event_wild2"
+ enable_ust_lttng_event_ok $SESSION_NAME "$event_wild1"
+ enable_ust_lttng_event_ok $SESSION_NAME "$event_wild2"
start_lttng_tracing $SESSION_NAME
diag "Disable simple wildcard"
- enable_ust_lttng_event $SESSION_NAME "$event_wild1"
- enable_ust_lttng_event $SESSION_NAME "$event_wild2"
+ enable_ust_lttng_event_ok $SESSION_NAME "$event_wild1"
+ enable_ust_lttng_event_ok $SESSION_NAME "$event_wild2"
disable_ust_lttng_event $SESSION_NAME "$event_wild1"
disable_ust_lttng_event $SESSION_NAME "$event_wild2"
diag "Disable wildcard overlap"
- enable_ust_lttng_event $SESSION_NAME "$event_wild1"
- enable_ust_lttng_event $SESSION_NAME "$event_wild2"
+ enable_ust_lttng_event_ok $SESSION_NAME "$event_wild1"
+ enable_ust_lttng_event_ok $SESSION_NAME "$event_wild2"
disable_ust_lttng_event $SESSION_NAME "$event_wild1"
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"
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME "channel0"
start_lttng_tracing $SESSION_NAME
# Start application after tracing
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"
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME "channel0"
start_lttng_tracing $SESSION_NAME
check_app_tmp_file
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"
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME "channel0"
start_lttng_tracing $SESSION_NAME
# Start application after tracing
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"
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME "channel0"
start_lttng_tracing $SESSION_NAME
check_app_tmp_file
function test_event_tracef()
{
create_lttng_session_ok $SESSION_NAME $TRACE_PATH
- enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME
start_lttng_tracing $SESSION_NAME
$TESTAPP_BIN $NR_ITER $NR_USEC_WAIT
create_lttng_session_ok $SESSION_NAME $TRACE_PATH
- enable_ust_lttng_event $SESSION_NAME "$EVENT_NAME"
- enable_ust_lttng_event $SESSION_NAME "$EVENT_NAME2"
+ enable_ust_lttng_event_ok $SESSION_NAME "$EVENT_NAME"
+ enable_ust_lttng_event_ok $SESSION_NAME "$EVENT_NAME2"
start_lttng_tracing
stop_lttng_tracing
check_sessiond
enable_channel_per_uid $SESSION_NAME-$a $CHANNEL_NAME
check_sessiond
- enable_ust_lttng_event $SESSION_NAME-$a $EVENT_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME-$a $EVENT_NAME
check_sessiond
start_lttng_tracing $SESSION_NAME-$a
check_sessiond
enable_channel_per_uid $SESSION_NAME-$a $CHANNEL_NAME
check_sessiond
check_relayd
- enable_ust_lttng_event $SESSION_NAME-$a $EVENT_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME-$a $EVENT_NAME
check_sessiond
check_relayd
start_lttng_tracing $SESSION_NAME-$a
enable_channel_per_uid $SESSION_NAME-$a $CHANNEL_NAME
check_sessiond
check_relayd
- enable_ust_lttng_event $SESSION_NAME-$a $EVENT_NAME
+ enable_ust_lttng_event_ok $SESSION_NAME-$a $EVENT_NAME
check_sessiond
check_relayd
start_lttng_tracing $SESSION_NAME-$a
function enable_ust_lttng_event ()
{
- local sess_name=$1
- local event_name="$2"
- local channel_name=$3
- local expected_to_fail=$4
+ local expected_to_fail=$1
+ local sess_name=$2
+ local event_name="$3"
+ local channel_name=$4
if [ -z $channel_name ]; then
# default channel if none specified
$TESTDIR/../src/bin/lttng/$LTTNG_BIN enable-event "$event_name" $chan -s $sess_name -u >$OUTPUT_DEST
ret=$?
- if [[ $expected_to_fail ]]; then
+ if [[ $expected_to_fail -eq "1" ]]; then
test $ret -ne "0"
ok $? "Enable ust event $event_name for session $session_name on channel $channel_name failed as expected"
else
fi
}
+function enable_ust_lttng_event_ok ()
+{
+ enable_ust_lttng_event 0 "$@"
+}
+
+function enable_ust_lttng_event_fail ()
+{
+ enable_ust_lttng_event 1 "$@"
+}
+
function enable_jul_lttng_event()
{
sess_name=$1