]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: osd-backfill-stats.sh Fix check of multi backfill OSDs, skip remapped test 26330/head
authorDavid Zafman <dzafman@redhat.com>
Thu, 7 Feb 2019 23:48:48 +0000 (15:48 -0800)
committerDavid Zafman <dzafman@redhat.com>
Fri, 8 Feb 2019 04:05:58 +0000 (20:05 -0800)
Signed-off-by: David Zafman <dzafman@redhat.com>
qa/standalone/osd/osd-backfill-stats.sh

index e38bece05804cea6872f0703f625bc05d7817318..afa1cebaa967f08bc7af3124761cc71e86324906 100755 (executable)
@@ -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