]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: osd-scrub-snaps.sh minor cleanup
authorDavid Zafman <dzafman@redhat.com>
Tue, 15 Aug 2017 21:46:40 +0000 (14:46 -0700)
committerAbhishek Lekshmanan <abhishek@suse.com>
Wed, 23 Aug 2017 13:33:29 +0000 (15:33 +0200)
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 9f3d970a0dbb754ef34ffafa1c3e8d0d3c5982c7)

qa/standalone/scrub/osd-scrub-snaps.sh

index 020363683e94afb3f7af881ff7c4ff7989b2d6f2..590a1a3964a409ccebe3c5faf93f1f6c76e4f703 100755 (executable)
@@ -453,11 +453,11 @@ EOF
     err_strings[23]="log_channel[(]cluster[)] log [[]ERR[]] : scrub [0-9]*[.]0 .*:::obj15:head can't decode 'snapset' attr buffer"
     err_strings[24]="log_channel[(]cluster[)] log [[]ERR[]] : scrub [0-9]*[.]0 .*:::obj12:1 has no oi or legacy_snaps; cannot convert 1=[[]1[]]:[[]1[]].stray_clone_snaps=[{]1=[[]1[]][}]"
 
-    for i in `seq 0 ${#err_strings[@]}`
+    for err_string in "${err_strings[@]}"
     do
-        if ! grep "${err_strings[$i]}" $dir/osd.0.log > /dev/null;
+        if ! grep "$err_string" $dir/osd.0.log > /dev/null;
         then
-            echo "Missing log message '${err_strings[$i]}'"
+            echo "Missing log message '$err_string'"
             ERRORS=$(expr $ERRORS + 1)
         fi
     done