Also add support for additional options.
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
#Test fail command
#No channel enable start command should return element success false
OUTPUT_DEST=$OUTPUT_DIR/$OUTPUT_FILE
#Test fail command
#No channel enable start command should return element success false
OUTPUT_DEST=$OUTPUT_DIR/$OUTPUT_FILE
- lttng_snapshot_add_output_ok $session_name $snapshot_path
+ lttng_snapshot_add_output_ok $session_name file://$snapshot_path
$XML_VALIDATE $OUTPUT_DEST
ok $? "Mi test: snapshot xsd validation"
$XML_VALIDATE $OUTPUT_DEST
ok $? "Mi test: snapshot xsd validation"
enable_lttng_mmap_overwrite_kernel_channel $SESSION_NAME $CHANNEL_NAME
lttng_enable_kernel_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
enable_lttng_mmap_overwrite_kernel_channel $SESSION_NAME $CHANNEL_NAME
lttng_enable_kernel_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
- lttng_snapshot_add_output_ok $SESSION_NAME $TRACE_PATH
+ lttng_snapshot_add_output_ok $SESSION_NAME file://$TRACE_PATH
lttng_snapshot_record $SESSION_NAME
stop_lttng_tracing_ok $SESSION_NAME
destroy_lttng_session_ok $SESSION_NAME
lttng_snapshot_record $SESSION_NAME
stop_lttng_tracing_ok $SESSION_NAME
destroy_lttng_session_ok $SESSION_NAME
lttng_enable_kernel_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
stop_lttng_tracing_ok $SESSION_NAME
lttng_enable_kernel_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
stop_lttng_tracing_ok $SESSION_NAME
- lttng_snapshot_add_output_ok $SESSION_NAME $TRACE_PATH
+ lttng_snapshot_add_output_ok $SESSION_NAME file://$TRACE_PATH
lttng_snapshot_record $SESSION_NAME
destroy_lttng_session_ok $SESSION_NAME
lttng_snapshot_record $SESSION_NAME
destroy_lttng_session_ok $SESSION_NAME
enable_lttng_mmap_overwrite_kernel_channel $SESSION_NAME $CHANNEL_NAME
lttng_enable_kernel_event $SESSION_NAME $EVENT1 $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
enable_lttng_mmap_overwrite_kernel_channel $SESSION_NAME $CHANNEL_NAME
lttng_enable_kernel_event $SESSION_NAME $EVENT1 $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
- lttng_snapshot_add_output_ok $SESSION_NAME $TRACE_PATH
+ lttng_snapshot_add_output_ok $SESSION_NAME file://$TRACE_PATH
# first snapshot with only 1 event
lttng_snapshot_record $SESSION_NAME
# first snapshot with only 1 event
lttng_snapshot_record $SESSION_NAME
$CHANNEL_NAME
lttng_enable_kernel_syscall_ok $SESSION_NAME -a $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
$CHANNEL_NAME
lttng_enable_kernel_syscall_ok $SESSION_NAME -a $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
- lttng_snapshot_add_output_ok $SESSION_NAME $TRACE_PATH
+ lttng_snapshot_add_output_ok $SESSION_NAME file://$TRACE_PATH
$CHANNEL_NAME
lttng_enable_kernel_syscall_ok $SESSION_NAME -a $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
$CHANNEL_NAME
lttng_enable_kernel_syscall_ok $SESSION_NAME -a $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
- lttng_snapshot_add_output_ok $SESSION_NAME $TRACE_PATH
+ lttng_snapshot_add_output_ok $SESSION_NAME file://$TRACE_PATH
enable_lttng_mmap_overwrite_kernel_channel $SESSION_NAME $CHANNEL_NAME
lttng_enable_kernel_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
enable_lttng_mmap_overwrite_kernel_channel $SESSION_NAME $CHANNEL_NAME
lttng_enable_kernel_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
- lttng_snapshot_add_output_ok $SESSION_NAME $TRACE_PATH
+ lttng_snapshot_add_output_ok $SESSION_NAME file://$TRACE_PATH
for i in $(seq 1 $NB_SNAP); do
diag "Snapshot $i/$NB_SNAP"
rm -rf $TRACE_PATH/snapshot/* 2>/dev/null
for i in $(seq 1 $NB_SNAP); do
diag "Snapshot $i/$NB_SNAP"
rm -rf $TRACE_PATH/snapshot/* 2>/dev/null
enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
- lttng_snapshot_add_output_ok $SESSION_NAME $TRACE_PATH
+ lttng_snapshot_add_output_ok $SESSION_NAME file://$TRACE_PATH
# Returns once the application has at least fired ONE tracepoint.
start_test_app
# Returns once the application has at least fired ONE tracepoint.
start_test_app
enable_mmap_small_discard_ust_channel $SESSION_NAME $CHANNEL_NAME
enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
enable_mmap_small_discard_ust_channel $SESSION_NAME $CHANNEL_NAME
enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
- lttng_snapshot_add_output_ok $SESSION_NAME $TRACE_PATH
+ lttng_snapshot_add_output_ok $SESSION_NAME file://$TRACE_PATH
# Run test apps, wait for them to complete.
start_test_app
# Run test apps, wait for them to complete.
start_test_app
enable_mmap_small_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
enable_mmap_small_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
- lttng_snapshot_add_output_ok $SESSION_NAME $TRACE_PATH
+ lttng_snapshot_add_output_ok $SESSION_NAME file://$TRACE_PATH
# Run test apps, wait for them to complete.
start_test_app
# Run test apps, wait for them to complete.
start_test_app
enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
enable_ust_lttng_event_ok $SESSION_NAME $LM_EVENT $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
enable_ust_lttng_event_ok $SESSION_NAME $LM_EVENT $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
- lttng_snapshot_add_output_ok $SESSION_NAME $TRACE_PATH
+ lttng_snapshot_add_output_ok $SESSION_NAME file://$TRACE_PATH
$LM_BIN 1 1
ok $? "Start application to trace"
lttng_snapshot_record $SESSION_NAME
$LM_BIN 1 1
ok $? "Start application to trace"
lttng_snapshot_record $SESSION_NAME
enable_channel_per_uid_mmap_overwrite $SESSION_NAME $CHANNEL_NAME
enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
enable_channel_per_uid_mmap_overwrite $SESSION_NAME $CHANNEL_NAME
enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
- lttng_snapshot_add_output_ok $SESSION_NAME $TRACE_PATH
+ lttng_snapshot_add_output_ok $SESSION_NAME file://$TRACE_PATH
# Returns once the application has at least fired ONE tracepoint.
start_test_app
# Returns once the application has at least fired ONE tracepoint.
start_test_app
enable_channel_per_uid_mmap_overwrite $SESSION_NAME $CHANNEL_NAME
enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
enable_channel_per_uid_mmap_overwrite $SESSION_NAME $CHANNEL_NAME
enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
- lttng_snapshot_add_output_ok $SESSION_NAME $TRACE_PATH
+ lttng_snapshot_add_output_ok $SESSION_NAME file://$TRACE_PATH
# Returns once the application has at least fired ONE tracepoint.
start_test_app
# Returns once the application has at least fired ONE tracepoint.
start_test_app
enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
start_lttng_tracing_ok $SESSION_NAME
- lttng_snapshot_add_output_ok $SESSION_NAME $TRACE_PATH
+ lttng_snapshot_add_output_ok $SESSION_NAME file://$TRACE_PATH
# Returns once the application has at least fired ONE tracepoint.
start_test_app
# Returns once the application has at least fired ONE tracepoint.
start_test_app
local expected_to_fail=$1
local sess_name=$2
local trace_path=$3
local expected_to_fail=$1
local sess_name=$2
local trace_path=$3
- $TESTDIR/../src/bin/lttng/$LTTNG_BIN snapshot add-output -s $sess_name $trace_path 1> $OUTPUT_DEST 2> $ERROR_OUTPUT_DEST
+ $TESTDIR/../src/bin/lttng/$LTTNG_BIN snapshot add-output -s $sess_name $trace_path $opts 1> $OUTPUT_DEST 2> $ERROR_OUTPUT_DEST
ret=$?
if [[ $expected_to_fail -eq 1 ]]; then
test "$ret" -ne "0"
ret=$?
if [[ $expected_to_fail -eq 1 ]]; then
test "$ret" -ne "0"
- ok $? "Added snapshot output file://$trace_path failed as expected"
+ ok $? "Added snapshot output $trace_path failed as expected"
- ok $ret "Added snapshot output file://$trace_path"
+ ok $ret "Added snapshot output $trace_path"