+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
+}
+