This patchset contains fixes for the problem of handling characters returned by telemetry callbacks which require escaping when encoded in JSON format. It also includes unit tests to validate the correct encoding in such scenarios and a number of smaller enhancements to telemetry and telemetry testing.
RFC->V2: * limited characters allowed in dictionary element names and command names to side-step the encoding problems there. * added support for proper escaping of dictionary string values * added more testing and test cases * added other misc telemetry cleanups and refactoring Bruce Richardson (13): test/telemetry_json: print success or failure per subtest telemetry: fix escaping of invalid json characters test/telemetry_json: add test for string character escaping telemetry: add escaping of strings in arrays test/telemetry-json: add test for escaping strings in arrays telemetry: limit characters allowed in dictionary names telemetry: add escaping of strings in dicts test/telemetry_json: add test for string escaping in objects telemetry: limit command characters test/telemetry_data: refactor for maintainability test/telemetry_data: add test cases for character escaping telemetry: eliminate duplicate code for json output telemetry: make help command more helpful app/test/test_telemetry_data.c | 138 +++++++++++++++++++-------- app/test/test_telemetry_json.c | 98 +++++++++++++++++-- doc/guides/rel_notes/deprecation.rst | 8 -- lib/telemetry/rte_telemetry.h | 8 ++ lib/telemetry/telemetry.c | 51 +++++----- lib/telemetry/telemetry_data.c | 32 +++++++ lib/telemetry/telemetry_json.h | 72 ++++++++++++-- 7 files changed, 318 insertions(+), 89 deletions(-) -- 2.34.1