]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: Fail immediately if some operations fail
authorDavid Zafman <dzafman@redhat.com>
Fri, 8 Jun 2018 22:27:06 +0000 (15:27 -0700)
committerDavid Zafman <dzafman@redhat.com>
Mon, 18 Jun 2018 21:09:14 +0000 (14:09 -0700)
Signed-off-by: David Zafman <dzafman@redhat.com>
qa/standalone/scrub/osd-unexpected-clone.sh

index 8f0472f0e89b00e91b5200d5c2fbb9e71098d1de..552644048b7d72d7b16f09de4c29383a57c85a20 100755 (executable)
@@ -56,19 +56,19 @@ function TEST_recover_unexpected() {
     JSON=`objectstore_tool $dir $osd --op list foo | grep snapid.:1`
     echo "JSON is $JSON"
     rm -f $dir/_ $dir/data
-    objectstore_tool $dir $osd "$JSON" get-attr _ > $dir/_
-    objectstore_tool $dir $osd "$JSON" get-bytes $dir/data
+    objectstore_tool $dir $osd "$JSON" get-attr _ > $dir/_ || return 1
+    objectstore_tool $dir $osd "$JSON" get-bytes $dir/data || return 1
 
     rados -p foo rmsnap snap
 
     sleep 5
 
-    objectstore_tool $dir $osd "$JSON" set-bytes $dir/data
-    objectstore_tool $dir $osd "$JSON" set-attr _ $dir/_
+    objectstore_tool $dir $osd "$JSON" set-bytes $dir/data || return 1
+    objectstore_tool $dir $osd "$JSON" set-attr _ $dir/_ || return 1
 
     sleep 5
 
-    ceph pg repair 1.0
+    ceph pg repair 1.0 || return 1
 
     sleep 10