[v1] examples/fips_validation: fix test output for AES GMAC decrypt
Checks
Commit Message
AES GMAC decrypt test should output only whether test passed or
failed.
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
examples/fips_validation/fips_validation_gcm.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
Comments
Hi Gowrishankar,
> -----Original Message-----
> From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
> Sent: Monday, October 17, 2022 9:16 AM
> To: dev@dpdk.org
> Cc: Anoob Joseph <anoobj@marvell.com>; Dooley, Brian
> <brian.dooley@intel.com>; Akhil Goyal <gakhil@marvell.com>;
> jerinj@marvell.com; Gowrishankar Muthukrishnan
> <gmuthukrishn@marvell.com>
> Subject: [v1] examples/fips_validation: fix test output for AES GMAC decrypt
>
> AES GMAC decrypt test should output only whether test passed or failed.
>
> Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
> ---
> examples/fips_validation/fips_validation_gcm.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
<snip>
Reviewed-by: Brian Dooley <brian.dooley@intel.com>
@@ -330,11 +330,16 @@ parse_test_gcm_json_writeback(struct fips_val *val)
json_object_set_new(json_info.json_write_case, PT_JSON_STR,
json_string(info.one_line_text));
} else {
- json_object_set_new(json_info.json_write_case, PT_JSON_STR,
- json_string(""));
+ json_object_set_new(json_info.json_write_case, "testPassed",
+ json_true());
}
} else {
- json_object_set_new(json_info.json_write_case, "testPassed", json_false());
+ if (!info.interim_info.gcm_data.is_gmac)
+ json_object_set_new(json_info.json_write_case, PT_JSON_STR,
+ json_string(""));
+ else
+ json_object_set_new(json_info.json_write_case, "testPassed",
+ json_false());
}
}