[2/2] fips_validation: fix gcm test
diff mbox series

Message ID 20201022095927.587840-3-roy.fan.zhang@intel.com
State Accepted, archived
Delegated to: akhil goyal
Headers show
Series
  • fips_validation: fix issues
Related show

Checks

Context Check Description
ci/travis-robot success Travis build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Zhang, Roy Fan Oct. 22, 2020, 9:59 a.m. UTC
This patch fixes FIPS GCM test of the redundant plaintext string
write and insufficient test case support check for some corner
cases.

Fixes: d09abf2d1007 ("examples/fips_validation: update GCM test")
Cc: roy.fan.zhang@intel.com

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 examples/fips_validation/fips_validation_gcm.c |  1 -
 examples/fips_validation/main.c                | 10 +++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

Patch
diff mbox series

diff --git a/examples/fips_validation/fips_validation_gcm.c b/examples/fips_validation/fips_validation_gcm.c
index df3caa267..250d09bf9 100644
--- a/examples/fips_validation/fips_validation_gcm.c
+++ b/examples/fips_validation/fips_validation_gcm.c
@@ -175,7 +175,6 @@  parse_test_gcm_writeback(struct fips_val *val)
 		if (vec.status == RTE_CRYPTO_OP_STATUS_SUCCESS) {
 			fprintf(info.fp_wr, "%s", PT_STR);
 			if (!info.interim_info.gcm_data.is_gmac) {
-				fprintf(info.fp_wr, "%s", PT_STR);
 				tmp_val.val = val->val;
 				tmp_val.len = vec.pt.len;
 
diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index 07532c956..f3678f056 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -927,10 +927,14 @@  prepare_gmac_xform(struct rte_crypto_sym_xform *xform)
 
 	if (rte_cryptodev_sym_capability_check_auth(cap,
 			auth_xform->key.length,
-			auth_xform->digest_length, 0) != 0) {
-		RTE_LOG(ERR, USER1, "PMD %s key length %u IV length %u\n",
+			auth_xform->digest_length,
+			auth_xform->iv.length) != 0) {
+
+		RTE_LOG(ERR, USER1,
+			"PMD %s key length %u Digest length %u IV length %u\n",
 				info.device_name, auth_xform->key.length,
-				auth_xform->digest_length);
+				auth_xform->digest_length,
+				auth_xform->iv.length);
 		return -EPERM;
 	}