From: David Zafman Date: Sat, 15 Nov 2014 19:46:15 +0000 (-0800) Subject: tests: ceph_objectstore_tool.py check for malformed JSON for erasure code objs X-Git-Tag: v0.80.10~69^2~43 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bc921c7ecbc061ccef4847d967986c9fa902111f;p=ceph.git tests: ceph_objectstore_tool.py check for malformed JSON for erasure code objs Signed-off-by: David Zafman (cherry picked from commit 40717aa4c399e87d2c3e32038f78788eb213f87d) --- diff --git a/src/test/ceph_objectstore_tool.py b/src/test/ceph_objectstore_tool.py index 028ce09a42c4..d28efa4d17df 100755 --- a/src/test/ceph_objectstore_tool.py +++ b/src/test/ceph_objectstore_tool.py @@ -468,6 +468,9 @@ def main(argv): for JSON in JSONOBJ: jsondict = json.loads(JSON) db[jsondict['namespace']][jsondict['oid']]['json'] = JSON + if string.find(jsondict['oid'], EC_NAME) == 0 and 'shard_id' not in jsondict: + logging.error("Malformed JSON {json}".format(json=JSON)) + ERRORS += 1 # Test get-bytes print "Test get-bytes and set-bytes"