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 6D0904301C; Thu, 10 Aug 2023 13:59:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5910840DFB; Thu, 10 Aug 2023 13:59:50 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id DE5D340691 for ; Thu, 10 Aug 2023 13:59:48 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37AAUlsY010186; Thu, 10 Aug 2023 04:59:47 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=5Ya7UcfH3IssZSxl0dzSJ2aT+Luh6ew5Le3nX+vzeHU=; b=Jot0gsOX1AssDpeYNTSv7lBitrF8+h+f0tXYY9/04tTjYNSMhJKUfeyci6W3Jr8CU1KW 2dyVSbH/D6mAtyyIchiFBjsy2wQOBFvBTaHQJ+DKToJmVs5DmG8R2ZNd6z03a+2TEsDY W84Ggw0NyKkElOEFNq1rh+Ty1LfhKGaJof/oSSoCeFXA8GI+0TakzpdRRRN5uQgg6hF9 amP5U7pRX60UFvtgZ/K8ui6vV4Dov98UsfoKjhXFk73yaH2fdDh/YtzYN/IfTafyxQSO vNToqOV9PYhebyXSMIV2t6Tf1omSdu90jR4MCUqE/vInYI5ECgmVOg/tLPDQPjsFoKGU Sg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3scx7188p7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 10 Aug 2023 04:59:47 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 10 Aug 2023 04:59:39 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Thu, 10 Aug 2023 04:59:39 -0700 Received: from BG-LT91401.marvell.com (BG-LT91401.marvell.com [10.28.168.34]) by maili.marvell.com (Postfix) with ESMTP id 067E95B6933; Thu, 10 Aug 2023 04:59:36 -0700 (PDT) From: Gowrishankar Muthukrishnan To: CC: , Chengwen Feng , "Vamsi Attunuru" , Gowrishankar Muthukrishnan Subject: [PATCH] test/dma: add test skip status Date: Thu, 10 Aug 2023 17:29:33 +0530 Message-ID: <20230810115933.2164-1-gmuthukrishn@marvell.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: mYkFvTtdjo8jqIKqaKlWJ23OZQQCi0wC X-Proofpoint-ORIG-GUID: mYkFvTtdjo8jqIKqaKlWJ23OZQQCi0wC 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