From 124f15a5c09ada705f764dc5669e88dae1ea319a Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Wed, 7 Jan 2026 19:06:11 -0600 Subject: [PATCH] init trace buffer size when starting tracing --- tests/run-tests.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/run-tests.sh b/tests/run-tests.sh index 6f7b9f81..67554e6b 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -402,14 +402,14 @@ if [ -n "$T_INSMOD" ]; then cmd insmod "$T_MODULE" fi -if [ -n "$T_TRACE_MULT" ]; then - orig_trace_size=1408 - mult_trace_size=$((orig_trace_size * T_TRACE_MULT)) - msg "increasing trace buffer size from $orig_trace_size KiB to $mult_trace_size KiB" - echo $mult_trace_size > /sys/kernel/debug/tracing/buffer_size_kb -fi - start_tracing() { + if [ -n "$T_TRACE_MULT" ]; then + orig_trace_size=1408 + mult_trace_size=$((orig_trace_size * T_TRACE_MULT)) + msg "increasing trace buffer size from $orig_trace_size KiB to $mult_trace_size KiB" + echo $mult_trace_size > /sys/kernel/debug/tracing/buffer_size_kb + fi + nr_globs=${#T_TRACE_GLOB[@]} if [ $nr_globs -gt 0 ]; then echo 0 > /sys/kernel/debug/tracing/events/scoutfs/enable