Tests: base path: lttng load for session configuration
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Fri, 25 Oct 2019 22:12:03 +0000 (18:12 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 5 Nov 2019 19:51:15 +0000 (14:51 -0500)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/regression/tools/base-path/load-stream-extra-path.lttng [new file with mode: 0644]
tests/regression/tools/base-path/test_ust

diff --git a/tests/regression/tools/base-path/load-stream-extra-path.lttng b/tests/regression/tools/base-path/load-stream-extra-path.lttng
new file mode 100644 (file)
index 0000000..973d67a
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sessions>
+       <session>
+               <name>load-stream-extra-path</name>
+               <domains>
+                       <domain>
+                               <type>UST</type>
+                               <buffer_type>PER_UID</buffer_type>
+                               <channels>
+                                       <channel>
+                                               <name>channel0</name>
+                                               <enabled>true</enabled>
+                                               <overwrite_mode>DISCARD</overwrite_mode>
+                                               <subbuffer_size>524288</subbuffer_size>
+                                               <subbuffer_count>4</subbuffer_count>
+                                               <switch_timer_interval>0</switch_timer_interval>
+                                               <read_timer_interval>0</read_timer_interval>
+                                               <output_type>MMAP</output_type>
+                                               <blocking_timeout>0</blocking_timeout>
+                                               <monitor_timer_interval>1000000</monitor_timer_interval>
+                                               <tracefile_size>0</tracefile_size>
+                                               <tracefile_count>0</tracefile_count>
+                                               <live_timer_interval>0</live_timer_interval>
+                                               <events>
+                                                       <event>
+                                                               <name>tp:tptest</name>
+                                                               <enabled>true</enabled>
+                                                               <type>TRACEPOINT</type>
+                                                               <loglevel_type>ALL</loglevel_type>
+                                                       </event>
+                                               </events>
+                                               <contexts/>
+                                       </channel>
+                               </channels>
+                               <trackers/>
+                       </domain>
+                       <domain>
+                               <type>JUL</type>
+                               <buffer_type>PER_UID</buffer_type>
+                               <channels/>
+                       </domain>
+                       <domain>
+                               <type>LOG4J</type>
+                               <buffer_type>PER_UID</buffer_type>
+                               <channels/>
+                       </domain>
+                       <domain>
+                               <type>PYTHON</type>
+                               <buffer_type>PER_UID</buffer_type>
+                               <channels/>
+                       </domain>
+               </domains>
+               <started>false</started>
+               <output>
+                       <consumer_output>
+                               <enabled>true</enabled>
+                               <destination>
+                                       <net_output>
+                                               <control_uri>tcp4://127.0.0.1:5342/my/custom/path5</control_uri>
+                                               
+                                       </net_output>
+                               </destination>
+                       </consumer_output>
+               </output>
+       </session>
+</sessions>
index d7e324e7baff74b470b807b19ed49b95ff047479..d60a2302ad21e45349c8b9c534c3c239d5dbfbfc 100755 (executable)
@@ -27,7 +27,7 @@ EVENT_NAME="tp:tptest"
 
 TRACE_PATH=$(mktemp -d)
 
-NUM_TESTS=32
+NUM_TESTS=37
 
 source $TESTDIR/utils/utils.sh
 
@@ -117,7 +117,7 @@ function ust_app_snapshot_base_path ()
 function ust_app_snapshot_add_output_base_path ()
 {
        local session_name=$(randstring 16 0)
-       local base_path="my/custom/path3"
+       local base_path="my/custom/path4"
 
        diag "Test base path override for remote trace snapshot (URI on add-output)"
        create_lttng_session_no_output $session_name --snapshot
@@ -142,6 +142,27 @@ function ust_app_snapshot_add_output_base_path ()
        fi
 }
 
+function ust_app_stream_base_path_via_load ()
+{
+       local session_name="load-stream-extra-path"
+       local base_path="my/custom/path5"
+
+       diag "Test base path override for trace streaming using lttng load"
+       lttng_load_ok "-i $CURDIR/$session_name.lttng"
+       start_lttng_tracing_ok $session_name
+
+       $TESTAPP_BIN > /dev/null 2>&1
+
+       stop_lttng_tracing_ok $session_name
+       destroy_lttng_session_ok $session_name
+
+       # validate test
+       if validate_trace $EVENT_NAME "$TRACE_PATH/$HOSTNAME/$base_path"; then
+               # only delete if successful
+               rm -rf "$TRACE_PATH"
+       fi
+}
+
 plan_tests $NUM_TESTS
 
 print_test_banner "$TEST_DESC"
@@ -152,7 +173,9 @@ start_lttng_sessiond
 tests=( ust_app_stream_base_path
        ust_app_snapshot_create_base_path
        ust_app_snapshot_base_path
-       ust_app_snapshot_add_output_base_path )
+       ust_app_snapshot_add_output_base_path
+       ust_app_stream_base_path_via_load
+)
 for fct_test in ${tests[@]};
 do
        ${fct_test}
This page took 0.027434 seconds and 4 git commands to generate.