From ac29b2c7c9ec339133b2b6d8f25617e7e81703b2 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Fri, 25 Oct 2019 18:12:03 -0400 Subject: [PATCH] Tests: base path: lttng load for session configuration MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- .../base-path/load-stream-extra-path.lttng | 66 +++++++++++++++++++ tests/regression/tools/base-path/test_ust | 29 +++++++- 2 files changed, 92 insertions(+), 3 deletions(-) create mode 100644 tests/regression/tools/base-path/load-stream-extra-path.lttng 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 index 000000000..973d67a6d --- /dev/null +++ b/tests/regression/tools/base-path/load-stream-extra-path.lttng @@ -0,0 +1,66 @@ + + + + load-stream-extra-path + + + UST + PER_UID + + + channel0 + true + DISCARD + 524288 + 4 + 0 + 0 + MMAP + 0 + 1000000 + 0 + 0 + 0 + + + tp:tptest + true + TRACEPOINT + ALL + + + + + + + + + JUL + PER_UID + + + + LOG4J + PER_UID + + + + PYTHON + PER_UID + + + + false + + + true + + + tcp4://127.0.0.1:5342/my/custom/path5 + tcp4://127.0.0.1:5343/ + + + + + + diff --git a/tests/regression/tools/base-path/test_ust b/tests/regression/tools/base-path/test_ust index d7e324e7b..d60a2302a 100755 --- a/tests/regression/tools/base-path/test_ust +++ b/tests/regression/tools/base-path/test_ust @@ -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} -- 2.34.1