Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/fs/bcachefs/bcachefs-test-libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,10 @@ get_slowpath_counters()
grep -v ' 0$' || true
}

# Slowpath counters past their limit fail a test. A test whose design makes
# some of them unavoidable, in numbers the limit's slack doesn't allow for,
# declares them as a regex alternation before its end checks, e.g.:
# ktest_expect_counters="data_update_key_fail"
_check_bcachefs_counters()
{
local dev=$1
Expand Down Expand Up @@ -603,6 +607,10 @@ _check_bcachefs_counters()
local event="${linea[0]}"
local nr="${linea[1]}"

if [[ $event =~ ^(${ktest_expect_counters:-no_counters_expected})$ ]]; then
continue
fi

local max_fail=$((nr_commits / ratio))

if echo $event| grep data_update >/dev/null; then
Expand Down
Loading
Loading