+print_test_banner "$TEST_DESC"
+
+if [ "$(id -u)" == "0" ]; then
+ isroot=1
+else
+ isroot=0
+fi
+
+skip $isroot "Root access is needed to set bandwith limits. Skipping all tests." $NUM_TESTS ||
+{
+
+ # Catch sigint and try to cleanup limits
+ trap interrupt_cleanup SIGTERM SIGINT
+
+ BW_LIMITS=(3200 1600 800 400 200 100 50 25)
+ for BW in ${BW_LIMITS[@]};
+ do
+ diag "Test high-throughput with bandwidth limit set to ${BW}kbits"
+
+ set_bw_limit $BW
+ ok $? "Setting bandwidth limit"
+
+ start_lttng_sessiond
+ start_lttng_relayd "-o $TRACE_PATH"
+ test_high_throughput
+ result=$?
+ stop_lttng_relayd
+ stop_lttng_sessiond
+ reset_bw_limit
+ ok $? "Reset bandwith limits"
+ done
+}