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 9A7E7A00C5; Thu, 11 Jun 2020 15:45:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 422ED1D9E; Thu, 11 Jun 2020 15:45:22 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id B7FDBA3; Thu, 11 Jun 2020 15:45:20 +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 05BDjJfs014545; Thu, 11 Jun 2020 06:45:19 -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-type; s=pfpt0818; bh=SaNp0Yqvu21Fat8gRIhBY8cUk/6YHBs7NnwcfPAdJxI=; b=R+FYkuv5qCsGKpXtWNaZx1A4mzv811oDTrmS1I5/NF/fd6X2Mh6d6dJARPvz8bFmQfYz 0ghC+rDzwJUKrtl0YhmWfCMiXqf45bjq2ZFbRCiughW5AbTnssZCmGja/orbjUfNQ9ke Ancn3eFy3GZY2N7Ru4l0QkSMWI1/gDUyJpSOGBgdtQbHGoF+pI4C0ui6ysFt+KAEFGe3 YCoSmMvv1djPyVs2Xi0wSOOsurryLS37sLTMRxDlUXsSQ5egbmT7rnK1X5yf9ih1qIWe SvFLHzN6qHqfDn3PVTghTSoyy9ld3Knu9wivdHGqRYTDbOsuKtHe+NfBke9NC6nB5+gH Lg== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 31j77dsxd8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 11 Jun 2020 06:45:19 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 11 Jun 2020 06:45:18 -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.2 via Frontend Transport; Thu, 11 Jun 2020 06:45:19 -0700 Received: from hyd1409.caveonetworks.com.com (unknown [10.29.45.15]) by maili.marvell.com (Postfix) with ESMTP id BF86D3F7040; Thu, 11 Jun 2020 06:45:15 -0700 (PDT) From: Archana Muniganti To: , , CC: Archana Muniganti , , , , , , Date: Thu, 11 Jun 2020 19:14:17 +0530 Message-ID: <1591883057-11008-3-git-send-email-marchana@marvell.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1591883057-11008-1-git-send-email-marchana@marvell.com> References: <1591883057-11008-1-git-send-email-marchana@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-11_14:2020-06-11, 2020-06-11 signatures=0 Subject: [dpdk-dev] [PATCH 3/3] examples/fips_validation: fix overwrite of COUNT for TDES vectors X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Application updates first line of each test vector with COUNT = i(where i = 1,2,3..) assuming first line contains COUNT string. But few of the TDES input test vectors don't contain COUNT string and thus COUNT is getting overwritten on other data. Fixes: 527cbf3d5ee3 ("examples/fips_validation: support TDES parsing") Signed-off-by: Archana Muniganti Signed-off-by: Kanaka Durga Kotamarthy --- examples/fips_validation/fips_validation.c | 8 ++++++++ examples/fips_validation/main.c | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c index 3aaec20..9bdf257 100644 --- a/examples/fips_validation/fips_validation.c +++ b/examples/fips_validation/fips_validation.c @@ -640,6 +640,14 @@ cb = &info.writeback_callbacks[0]; + if (!(strstr(info.vec[0], cb->key))) { + fprintf(info.fp_wr, "%s%u\n", cb->key, count); + i = 0; + } else { + snprintf(info.vec[0], strlen(info.vec[0]) + 4, "%s%u", cb->key, + count); + i = 1; + } snprintf(info.vec[0], strlen(info.vec[0]) + 4, "%s%u", cb->key, count); for (i = 1; i < info.nb_vec_lines; i++) { diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c index f9b2056..efd32a8 100644 --- a/examples/fips_validation/main.c +++ b/examples/fips_validation/main.c @@ -1070,7 +1070,10 @@ struct fips_test_ops { int test_mode = info.interim_info.tdes_data.test_mode; for (i = 0; i < TDES_EXTERN_ITER; i++) { - if (i != 0) + if (i == 0) { + if (!(strstr(info.vec[0], "COUNT"))) + fprintf(info.fp_wr, "%s%u\n", "COUNT = ", 0); + } else update_info_vec(i); fips_test_write_one_case(); -- 1.8.3.1