From bc921c7ecbc061ccef4847d967986c9fa902111f Mon Sep 17 00:00:00 2001 From: David Zafman Date: Sat, 15 Nov 2014 11:46:15 -0800 Subject: [PATCH] tests: ceph_objectstore_tool.py check for malformed JSON for erasure code objs Signed-off-by: David Zafman (cherry picked from commit 40717aa4c399e87d2c3e32038f78788eb213f87d) --- src/test/ceph_objectstore_tool.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/ceph_objectstore_tool.py b/src/test/ceph_objectstore_tool.py index 028ce09a42c43..d28efa4d17df2 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" -- 2.39.5