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 29D0043026; Thu, 10 Aug 2023 14:36:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 257CA43255; Thu, 10 Aug 2023 14:36:47 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 3E7A343254 for ; Thu, 10 Aug 2023 14:36:45 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37A8XuHn020364; Thu, 10 Aug 2023 05:36:44 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=5Ya7UcfH3IssZSxl0dzSJ2aT+Luh6ew5Le3nX+vzeHU=; b=DYu8bS/kksepXEt/f8iRH24026Ox5Z9xBk9KrorSsoMAMKdEdc7TSvO/zNhfgazg7FMx KoSWWUTHKsRCq04BH72qG7p+vk52jZ4z0WawiF/1furgVpulURjB64EXPao8jKKCCH6c kL6lECaBHfiHlMJvfNJOr3I+p1/4ppk990Efwn+wql/tzeZ57nHHo0ADAcl7EfOoco/G JDGDah3H4gkyu9nj2id9A3qs0ugTH8jNPMqNxyi+72k2M0AhmmVJOF8WX1ZKQiQvepeg AHnXsVg8VpUpqhwviygiOpqzrqcykXBi2K0+HDzxVXV7mKxRN/8mUs7GWd4jSZhoBCrk 0w== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3scj5man3s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 10 Aug 2023 05:36:44 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 10 Aug 2023 05:36:42 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Thu, 10 Aug 2023 05:36:42 -0700 Received: from BG-LT91401.marvell.com (BG-LT91401.marvell.com [10.28.168.34]) by maili.marvell.com (Postfix) with ESMTP id 656F93F70AF; Thu, 10 Aug 2023 05:36:40 -0700 (PDT) From: Gowrishankar Muthukrishnan To: CC: , Chengwen Feng , "Vamsi Attunuru" , Vidya Sagar Velumuri , Gowrishankar Muthukrishnan Subject: [PATCH v2 1/3] test/dma: add test skip status Date: Thu, 10 Aug 2023 18:06:31 +0530 Message-ID: <20230810123633.2455-2-gmuthukrishn@marvell.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20230810123633.2455-1-gmuthukrishn@marvell.com> References: <20230810115933.2164-1-gmuthukrishn@marvell.com> <20230810123633.2455-1-gmuthukrishn@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: k-YAbHB0FOv7X2hQw28VuUg4ZHWvdimZ X-Proofpoint-GUID: k-YAbHB0FOv7X2hQw28VuUg4ZHWvdimZ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-10_10,2023-08-10_01,2023-05-22_02 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 Add status on skipped tests. Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_dmadev_api.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/app/test/test_dmadev_api.c b/app/test/test_dmadev_api.c index 4a181af90a..a1646472b0 100644 --- a/app/test/test_dmadev_api.c +++ b/app/test/test_dmadev_api.c @@ -9,6 +9,8 @@ #include #include +#include "test.h" + extern int test_dma_api(uint16_t dev_id); #define DMA_TEST_API_RUN(test) \ @@ -17,9 +19,6 @@ extern int test_dma_api(uint16_t dev_id); #define TEST_MEMCPY_SIZE 1024 #define TEST_WAIT_US_VAL 50000 -#define TEST_SUCCESS 0 -#define TEST_FAILED -1 - static int16_t test_dev_id; static int16_t invalid_dev_id; @@ -29,6 +28,7 @@ static char *dst; static int total; static int passed; static int failed; +static int skipped; static int testsuite_setup(int16_t dev_id) @@ -49,6 +49,7 @@ testsuite_setup(int16_t dev_id) total = 0; passed = 0; failed = 0; + skipped = 0; /* Set dmadev log level to critical to suppress unnecessary output * during API tests. @@ -78,12 +79,22 @@ testsuite_run_test(int (*test)(void), const char *name) if (test) { ret = test(); - if (ret < 0) { - failed++; - printf("%s Failed\n", name); - } else { + switch (ret) { + case TEST_SUCCESS: passed++; printf("%s Passed\n", name); + break; + case TEST_FAILED: + failed++; + printf("%s Failed\n", name); + break; + case TEST_SKIPPED: + skipped++; + printf("%s Skipped\n", name); + break; + default: + printf("Invalid test status\n"); + break; } } @@ -566,6 +577,7 @@ test_dma_api(uint16_t dev_id) printf("Total tests : %d\n", total); printf("Passed : %d\n", passed); printf("Failed : %d\n", failed); + printf("Skipped : %d\n", skipped); if (failed) return -1; -- 2.25.1