From patchwork Mon Mar 18 11:18:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: fengchengwen X-Patchwork-Id: 787 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 31FA043CE3; Mon, 18 Mar 2024 12:21:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 028C34027F; Mon, 18 Mar 2024 12:21:03 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 9F3CE40A6B for ; Mon, 18 Mar 2024 12:21:00 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4TysmN149QzwPgh; Mon, 18 Mar 2024 19:18:28 +0800 (CST) Received: from dggpeml500024.china.huawei.com (unknown [7.185.36.10]) by mail.maildlp.com (Postfix) with ESMTPS id ACA4F140259; Mon, 18 Mar 2024 19:20:58 +0800 (CST) Received: from localhost.localdomain (10.50.165.33) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 18 Mar 2024 19:20:58 +0800 From: Chengwen Feng To: , CC: Subject: [PATCH v4 0/6] refine argparse library Date: Mon, 18 Mar 2024 11:18:32 +0000 Message-ID: <20240318111838.16991-1-fengchengwen@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240220131502.47510-1-fengchengwen@huawei.com> References: <20240220131502.47510-1-fengchengwen@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.50.165.33] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500024.china.huawei.com (7.185.36.10) 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 I found a couple of issues when I revisited the argparse_autotest output, so got this patchset. Chengwen Feng (6): argparse: refine error message argparse: remove dead code argparse: replace flag enum with marco argparse: fix argument flags operate as uint32 type test/argparse: refine testcases argparse: fix doc don't display two hyphens --- v4: address Thomas's comment on 4/6 commit: - remove unused macros TEST_ARGPARSE_FLAG_HAS_ARG_BITMASK and TEST_ARGPARSE_FLAG_VAL_TYPE_BITMASK. v3: - address Thomas's comment on 4/6 comit. - add commit: fix doc don't display two hyphens. v2: address David Marchand's comment: - replace flag enum with marco. - replace flag's hardcode with macro in test_argparse.c. app/test/test_argparse.c | 65 +++++++++++--------- doc/guides/prog_guide/argparse_lib.rst | 47 +++++++------- lib/argparse/rte_argparse.c | 61 +++++++++--------- lib/argparse/rte_argparse.h | 85 ++++++++++++-------------- 4 files changed, 127 insertions(+), 131 deletions(-)