From 910a95b9c8668c0563156d09aa32f2df35c6fb42 Mon Sep 17 00:00:00 2001 From: David Zafman Date: Thu, 7 Feb 2019 15:48:48 -0800 Subject: [PATCH] test: osd-backfill-stats.sh Fix check of multi backfill OSDs, skip remapped test Signed-off-by: David Zafman --- qa/standalone/osd/osd-backfill-stats.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/qa/standalone/osd/osd-backfill-stats.sh b/qa/standalone/osd/osd-backfill-stats.sh index e38bece05804c..afa1cebaa967f 100755 --- a/qa/standalone/osd/osd-backfill-stats.sh +++ b/qa/standalone/osd/osd-backfill-stats.sh @@ -70,13 +70,17 @@ function check() { local misplaced_end=$8 local primary_start=${9:-} local primary_end=${10:-} + local check_setup=${11:-true} local log=$(grep -l +backfilling $dir/osd.$primary.log) - test -n "$log" || return 1 - if [ "$(echo "$log" | wc -w)" != "1" ]; + if [ $check_setup = "true" ]; then - echo "Test setup failure, a single OSD should have performed backfill" - return 1 + local alllogs=$(grep -l +backfilling $dir/osd.*.log) + if [ "$(echo "$alllogs" | wc -w)" != "1" ]; + then + echo "Test setup failure, a single OSD should have performed backfill" + return 1 + fi fi local addp=" " @@ -478,7 +482,7 @@ function TEST_backfill_remapped() { local misplaced=$(expr $objects \* 2) - check $dir $PG $primary replicated 0 0 $misplaced $objects || return 1 + check $dir $PG $primary replicated 0 0 $misplaced $objects "" "" false || return 1 delete_pool $poolname kill_daemons $dir || return 1 -- 2.39.5