From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 99006A00C5; Fri, 9 Sep 2022 11:35:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A4635427F6; Fri, 9 Sep 2022 11:35:48 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 7117440A7E for ; Fri, 9 Sep 2022 11:35:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662716144; x=1694252144; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mCFBmKWkSP2/lz1weGpnWzIADrzsL9YrNTl+QZc7/Nc=; b=FvCK7cmGG1FuLnu3IVO0H5mCPbxoEpPtmCCc4KSyQftGgGp3FKhbhrXW utN9Iauu7/cjWDgLB+GpsBKGYmcp75nspVWvCR2G8pKYUio0K8hRsoZQa yvo26sXC/hLgYR5A1Eo7FtCV/0RbRnrE/qbKa0ovbQoJKg6nTMPBVPw+S QRyJpZFif6JPAnXGWd0Ry74+f7aDnf48ucRM3LONiDzIVSHWAHeCQBhDN pT3Oo2X2LOu2IzUDjeZ/t/Ms9A7SubILW5plyn1MW5wVoNM6Lihm8ddrx 1YBYTGBJCL5C4/rAlTqRt5CatV18wP5bIjVYHGVUP+Oo5tdhY2SFQHZWx Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10464"; a="323644703" X-IronPort-AV: E=Sophos;i="5.93,302,1654585200"; d="scan'208";a="323644703" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2022 02:35:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,302,1654585200"; d="scan'208";a="740996338" Received: from silpixa00401385.ir.intel.com ([10.237.214.161]) by orsmga004.jf.intel.com with ESMTP; 09 Sep 2022 02:35:38 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH v3 00/13] telemetry JSON escaping and other enhancements Date: Fri, 9 Sep 2022 10:35:10 +0100 Message-Id: <20220909093523.471727-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220623164245.561371-1-bruce.richardson@intel.com> References: <20220623164245.561371-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 V3: * reorder patchset to put previous patch 6 (dict name limiting) at the start of the series * fix missed rename of TEST_OUTPUT to CHECK_OUTPUT in patch 10 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): telemetry: limit characters allowed in dictionary names 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: 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