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.90~81^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=40717aa4c399e87d2c3e32038f78788eb213f87d;p=ceph.git tests: ceph_objectstore_tool.py check for malformed JSON for erasure code objs Signed-off-by: David Zafman --- diff --git a/src/test/ceph_objectstore_tool.py b/src/test/ceph_objectstore_tool.py index 4dbca79244a9..62caee4db5a4 100755 --- a/src/test/ceph_objectstore_tool.py +++ b/src/test/ceph_objectstore_tool.py @@ -469,6 +469,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"