[dpdk-dev] [PATCH 2/3] examples/fips_validation: ignore \r in input files

Zhang, Roy Fan roy.fan.zhang at intel.com
Tue Oct 6 10:47:10 CEST 2020


Hi Olivier,

The patch looks ok but the test file link you provided in the patch is CAVS 5.3. 
As mentioned in https://doc.dpdk.org/guides/sample_app_ug/fips_validation.html, the supported CAVS supported version is 21.0 (not latest one by newer than 5.3). In CAVS 21.0 test files there is no '\r' before '\n' (I suppose this is for Windows right).

Regards,
Fan

> -----Original Message-----
> From: Olivier Matz <olivier.matz at 6wind.com>
> Sent: Tuesday, October 6, 2020 8:42 AM
> To: dev at dpdk.org
> Cc: Kovacevic, Marko <marko.kovacevic at intel.com>; Akhil Goyal
> <akhil.goyal at nxp.com>; Zhang, Roy Fan <roy.fan.zhang at intel.com>; Kusztal,
> ArkadiuszX <arkadiuszx.kusztal at intel.com>; stable at dpdk.org
> Subject: [PATCH 2/3] examples/fips_validation: ignore \r in input files
> 
> Some test vectors contain '\r' before '\n' (see link). Ignore them.
> 
> Link: https://www.openssl.org/docs/fips/testvectors-linux-2007-10-10.tar.gz
> Fixes: 3d0fad56b74a ("examples/fips_validation: add crypto FIPS application")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>
> ---
>  examples/fips_validation/fips_validation.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/examples/fips_validation/fips_validation.c
> b/examples/fips_validation/fips_validation.c
> index 13f763c9aa..858f581ba3 100644
> --- a/examples/fips_validation/fips_validation.c
> +++ b/examples/fips_validation/fips_validation.c
> @@ -33,6 +33,8 @@ get_file_line(void)
> 
>  		if (loc >= MAX_LINE_CHAR - 1)
>  			return -ENOMEM;
> +		if (c == '\r')
> +			continue;
>  		if (c == '\n')
>  			break;
>  		line[loc++] = c;
> --
> 2.25.1



More information about the dev mailing list