projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
port: fix -Wdeprecated-declarations warning about sprintf on macOS clang 14
[lttng-tools.git]
/
tests
/
regression
/
tools
/
rotation
/
rotate_utils.sh
diff --git
a/tests/regression/tools/rotation/rotate_utils.sh
b/tests/regression/tools/rotation/rotate_utils.sh
index 2803517f21d0a3d0f08a18c93e70d8037b072562..146f7e25cc529fa0023b6ecfbac5f485418f3fcb 100644
(file)
--- a/
tests/regression/tools/rotation/rotate_utils.sh
+++ b/
tests/regression/tools/rotation/rotate_utils.sh
@@
-145,19
+145,27
@@
function rotate_timer_test ()
shopt -u extglob
}
shopt -u extglob
}
-function
wait_for
_archives ()
+function
trace_until_n
_archives ()
{
{
- local trace_path=$1
- local target_archive_count=$2
+ local produce_events=$1
+ local trace_path=$2
+ local target_archive_count=$3
+ local trace_size_cutoff=$4
local archive_count=0
local archive_count=0
+ local trace_size=0
diag "Waiting for $target_archive_count size-based rotations to occur"
diag "Waiting for $target_archive_count size-based rotations to occur"
- while [[ archive_count -lt $target_archive_count ]]
+ while [[ archive_count -lt $target_archive_count
&& $trace_size -lt $trace_size_cutoff
]]
do
do
- archive_count=$(find "$TRACE_PATH" -mindepth 2 -maxdepth 2 -type d -path "*archives*" | wc -l)
- $TESTAPP_BIN -i 2000 -w 0 > /dev/null 2>&1
+ archive_count=$(find "$trace_path" -mindepth 2 -maxdepth 2 -type d -path "*archives*" | wc -l)
+ trace_size=$(du -b "$trace_path" | tail -n1 | cut -f1)
+ $produce_events 2000
done
done
+ if [[ $trace_size -ge $trace_size_cutoff ]]; then
+ diag "Exceeded size cutoff of $trace_size_cutoff bytes while waiting for $target_archive_count rotations"
+ fi
+
[[ $archive_count -eq $target_archive_count ]]
ok $? "Found $target_archive_count trace archives resulting from trace archive rotations"
}
[[ $archive_count -eq $target_archive_count ]]
ok $? "Found $target_archive_count trace archives resulting from trace archive rotations"
}
This page took
0.023622 seconds
and
4
git commands to generate.