Add parsing json as invalid cases: 1.json content that not enclosed in {}, it should be parsed as invalid, e.g. "abc":"not encloesed in {}" 2.json content that 'subsystems' not associate with array, it will report error and return failure, e.g. {"subsystems":"123"} 3.handle other invalid json formats, report and return failure, e.g. duplicate keys. Added `spdk_json_find` API return errcode: EPROTOTYPE - json not enclosed in {}. json config with content: 1."not enclosed in {}" 2."'subsystems' not be an array" 3."duplicate key in json" and some other invaild cases will be regarded as invalid json config, and will fail to start app. Fixes #2599 Signed-off-by: tongkunkun <tongkunkun_yewu@cmss.chinamobile.com> Change-Id: I02574c9acd7671e336d4c589ebbff8ed21eb3681 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13754 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: GangCao <gang.cao@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> |
||
---|---|---|
.. | ||
bdevio | ||
bdevperf | ||
bdev_raid.sh | ||
blockdev.sh | ||
Makefile | ||
nbd_common.sh | ||
nonarray.json | ||
nonenclosed.json |