From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marko Kovacevic Subject: Re: [PATCH v5 1/8] examples/cryptodev_fips_validate: add fips validation into examples Date: Wed, 24 Oct 2018 16:13:11 +0100 Message-ID: References: <20181012144501.19562-1-marko.kovacevic@intel.com> <20181017124937.38052-1-marko.kovacevic@intel.com> <20181017124937.38052-2-marko.kovacevic@intel.com> <64103ec5-2f25-1648-4d47-27a0f13e30e0@nxp.com> <8a58ae31-5d73-f97a-05fa-8d4fd06786c6@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: "roy.fan.zhang@intel.com" , "arkadiuszx.kusztal@intel.com" To: Akhil Goyal , "dev@dpdk.org" Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 932A45B3A for ; Wed, 24 Oct 2018 17:13:14 +0200 (CEST) In-Reply-To: <8a58ae31-5d73-f97a-05fa-8d4fd06786c6@nxp.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 24/10/2018 15:36, Akhil Goyal wrote: > > On 10/24/2018 7:47 PM, Marko Kovacevic wrote: >> On 24/10/2018 13:13, Akhil Goyal wrote: >>> On 10/17/2018 6:19 PM, Marko Kovacevic wrote: > snip [..] >>>> +int >>>> +fips_test_parse_one_case(void) >>>> +{ >>>> +    uint32_t i, j = 0; >>>> +    uint32_t is_interim = 0; >>>> +    int ret; >>>> + >>>> +    if (info.interim_callbacks) { >>>> +        for (i = 0; i < info.nb_vec_lines; i++) { >>>> +            for (j = 0; info.interim_callbacks[j].key != NULL; j++) >>>> +                if (strstr(info.vec[i], >>>> +                    info.interim_callbacks[j].key)) { >>> it looks interim_callback is a single structure and there is no need for >>> treating as an array. >> For some tests interim data could be multiple lines. > here you are not incrementing j, which means you are not using the other > ones. Also I cannot see it getting incremented in this function in rest > of the patches.   for (j = 0; info.interim_callbacks[j].key != NULL; j++) j is incremented as shown in the above line