X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Frotation%2Ftest_ust;h=7c52f34bced2ac016ba31a43b3213299b5d5ffab;hb=bf1e8411c30b21bc8dd6184c9890e9885bb7d503;hp=76c4ad57963d61f6e672e5ee51e1cf3f18b85a85;hpb=3c4c35827bdf49a2e148829672e6ff1a9c1b1bb8;p=lttng-tools.git diff --git a/tests/regression/tools/rotation/test_ust b/tests/regression/tools/rotation/test_ust index 76c4ad579..7c52f34bc 100755 --- a/tests/regression/tools/rotation/test_ust +++ b/tests/regression/tools/rotation/test_ust @@ -17,7 +17,7 @@ EVENT_NAME="tp:tptest" TRACE_PATH=$(mktemp --tmpdir -d -t tmp.test_ust_rotation_trace_path.XXXXXX) -NUM_TESTS=138 +NUM_TESTS=152 source $TESTDIR/utils/utils.sh source $CURDIR/rotate_utils.sh @@ -59,7 +59,7 @@ function rotate_ust_test () destroy_lttng_session_ok $SESSION_NAME - validate_test_chunks "${local_path}" $today $app_path ust $per_pid + validate_test_chunks "${local_path}" $today $app_path ust } function test_ust_streaming_uid () @@ -255,6 +255,40 @@ function test_incompatible_sessions () destroy_lttng_session_ok $SESSION_NAME } +function test_ust_local_size_uid () +{ + diag "Rotate uid local session every 2MiB" + local size_threshold=$((2 * 1024 * 1024)) + + diag "Test ust local with size-based session rotation per-uid" + create_lttng_session_ok $SESSION_NAME $TRACE_PATH + enable_ust_lttng_channel_ok $SESSION_NAME "channel0" --buffers-uid + enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME "channel0" + lttng_enable_rotation_size_ok $SESSION_NAME $size_threshold + start_lttng_tracing_ok $SESSION_NAME + + wait_for_archives "$TRACE_PATH" 5 + + destroy_lttng_session_ok $SESSION_NAME +} + +function test_ust_local_size_pid () +{ + diag "Rotate uid local session every 2MiB" + local size_threshold=$((2 * 1024 * 1024)) + + diag "Test ust local with size-based session rotation per-pid" + create_lttng_session_ok $SESSION_NAME $TRACE_PATH + enable_ust_lttng_channel_ok $SESSION_NAME "channel0" --buffers-pid + enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME "channel0" + lttng_enable_rotation_size_ok $SESSION_NAME $size_threshold + start_lttng_tracing_ok $SESSION_NAME + + wait_for_archives "$TRACE_PATH" 3 + + destroy_lttng_session_ok $SESSION_NAME +} + plan_tests $NUM_TESTS print_test_banner "$TEST_DESC" @@ -267,6 +301,7 @@ tests=( test_ust_streaming_uid test_ust_local_uid \ test_ust_streaming_pid test_ust_local_pid \ test_ust_local_timer_uid test_ust_streaming_timer_uid \ test_ust_local_timer_pid test_ust_streaming_timer_pid \ + test_ust_local_size_uid test_ust_local_size_pid \ test_incompatible_sessions ) for fct_test in ${tests[@]};