From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3FD85A2EFC for ; Mon, 16 Sep 2019 18:19:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EB3911BF12; Mon, 16 Sep 2019 18:19:36 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id EDC311BF12 for ; Mon, 16 Sep 2019 18:19:34 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x8GGFXv0026289; Mon, 16 Sep 2019 09:19:33 -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=pfpt0818; bh=eraetlG1G6fm5VluwemZFE0OlqWE6EpZHJBJ9xTWXd8=; b=YUVDGYoYY+yFm3MnNEO/LtX7T6+lASK+CQCdsQma4Qh5ofEnQ2uiD4FKNq1CmanbSUfx tB3+qfOX7PIdOQMEiMFViNa5ukyzaQYSCyxHtze1PEJM+TsRiyutLv4GBaOEnqXDDTrE Vzj35pEumbCTZD/j4iXkpAPYJ4yos82vCZP2hW7a7ZMsE0xGgP1T3X+bUzNxfU3BQMJt IH//kT+KNqCEZc+ZHz6BKZIAlMv7i5bE2W7sY9dWDFyNxxVxhCnCD3xDl+kKlpAaXK10 ICOlqEUYPiVWcovXSwwwuDZd0YhDUEbNbMSQjeLKUAsUBBPJ+xX7MBS9yjIyRMzNtTDA 5w== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2v0wjpfucs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 16 Sep 2019 09:19:33 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 16 Sep 2019 09:19:32 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 16 Sep 2019 09:19:31 -0700 Received: from vvenus375.il.marvell.com (unknown [10.5.120.75]) by maili.marvell.com (Postfix) with ESMTP id 98E1C3F703F; Mon, 16 Sep 2019 09:19:29 -0700 (PDT) From: To: CC: , , , Date: Mon, 16 Sep 2019 19:37:59 +0300 Message-ID: <20190916163759.9727-1-michaelsh@marvell.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.70,1.0.8 definitions=2019-09-16_07:2019-09-11,2019-09-16 signatures=0 Subject: [dpdk-stable] [PATCH] examples/fips_validation: fix bad return value X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Michael Shamis Returning correct error value by fips_test_parse_header() allows graceful exit of fips application. Fixes: 07f403e773 ("examples/fips_validation: fix HMAC test") cc: stable@dpdk.org Signed-off-by: Michael Shamis --- examples/fips_validation/fips_validation.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c index 8d43b267e..f2792d853 100644 --- a/examples/fips_validation/fips_validation.c +++ b/examples/fips_validation/fips_validation.c @@ -125,13 +125,13 @@ fips_test_parse_header(void) info.algo = FIPS_TEST_ALGO_AES_CMAC; ret = parse_test_cmac_init(); if (ret < 0) - return 0; + return ret; } else if (strstr(info.vec[i], "CCM")) { algo_parsed = 1; info.algo = FIPS_TEST_ALGO_AES_CCM; ret = parse_test_ccm_init(); if (ret < 0) - return 0; + return ret; } else if (strstr(info.vec[i], "HMAC")) { algo_parsed = 1; info.algo = FIPS_TEST_ALGO_HMAC; @@ -143,7 +143,7 @@ fips_test_parse_header(void) info.algo = FIPS_TEST_ALGO_TDES; ret = parse_test_tdes_init(); if (ret < 0) - return 0; + return ret; } else if (strstr(info.vec[i], "SHA-")) { algo_parsed = 1; info.algo = FIPS_TEST_ALGO_SHA; -- 2.23.0