[dpdk-dev] [PATCH v5 1/8] examples/cryptodev_fips_validate: add fips validation into examples

Marko Kovacevic marko.kovacevic at intel.com
Wed Oct 24 17:13:11 CEST 2018


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



More information about the dev mailing list