diff mbox series

test/ipsec: fix invalid crypto device failing

Message ID 20220712141701.27797-1-jspewock@iol.unh.edu (mailing list archive)
State Accepted
Delegated to: akhil goyal
Headers show
Series test/ipsec: fix invalid crypto device failing | expand

Checks

Context Check Description
ci/intel-Testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

jspewock@iol.unh.edu July 12, 2022, 2:17 p.m. UTC
From: Jeremy Spewock <jspewock@iol.unh.edu>

ipsec_autotest is now skipped if no compatible crypto devices are found.

Fixes issue where if at least one crypto device was found but no
compatible crypto devices for the ipsec_autotest test case are present
the case would fail with no error message. Now, when this situation is
encountered, the test case will be skipped with an explanation.

Fixes: 59d7353b0df0 ("test/ipsec: fix test suite setup")

Cc: stable@dpdk.org

Signed-off-by: Jeremy Spewock <jspewock@iol.unh.edu>
Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
---
 app/test/test_ipsec.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Ruifeng Wang Aug. 4, 2022, 8:27 a.m. UTC | #1
> -----Original Message-----
> From: jspewock@iol.unh.edu <jspewock@iol.unh.edu>
> Sent: Tuesday, July 12, 2022 10:17 PM
> To: dev@dpdk.org
> Cc: bernard.iremonger@intel.com; juraj.linkes@pantheon.tech;
> ohilyard@iol.unh.edu; Jeremy Spewock <jspewock@iol.unh.edu>;
> stable@dpdk.org
> Subject: [PATCH] test/ipsec: fix invalid crypto device failing
> 
> From: Jeremy Spewock <jspewock@iol.unh.edu>
> 
> ipsec_autotest is now skipped if no compatible crypto devices are found.
> 
> Fixes issue where if at least one crypto device was found but no
> compatible crypto devices for the ipsec_autotest test case are present
> the case would fail with no error message. Now, when this situation is
> encountered, the test case will be skipped with an explanation.
> 
> Fixes: 59d7353b0df0 ("test/ipsec: fix test suite setup")
> 
> Cc: stable@dpdk.org
> 
> Signed-off-by: Jeremy Spewock <jspewock@iol.unh.edu>
> Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
> ---
>  app/test/test_ipsec.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c index
> 7047e17960..7c03a06785 100644
> --- a/app/test/test_ipsec.c
> +++ b/app/test/test_ipsec.c
> @@ -320,8 +320,10 @@ testsuite_setup(void)
>  		}
>  	}
> 
> -	if (ts_params->valid_dev_found == 0)
> -		return TEST_FAILED;
> +	if (ts_params->valid_dev_found == 0) {
> +		RTE_LOG(WARNING, USER1, "No compatible crypto device
> found.\n");
> +		return TEST_SKIPPED;
> +	}
> 
>  	ts_params->mbuf_pool = rte_pktmbuf_pool_create(
>  			"CRYPTO_MBUFPOOL",
> --
> 2.35.1
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Akhil Goyal Aug. 26, 2022, 12:12 p.m. UTC | #2
> > From: Jeremy Spewock <jspewock@iol.unh.edu>
> >
> > ipsec_autotest is now skipped if no compatible crypto devices are found.
> >
> > Fixes issue where if at least one crypto device was found but no
> > compatible crypto devices for the ipsec_autotest test case are present
> > the case would fail with no error message. Now, when this situation is
> > encountered, the test case will be skipped with an explanation.
> >
> > Fixes: 59d7353b0df0 ("test/ipsec: fix test suite setup")
> >
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Jeremy Spewock <jspewock@iol.unh.edu>
> > Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> 
Applied to dpdk-next-crypto
diff mbox series

Patch

diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index 7047e17960..7c03a06785 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -320,8 +320,10 @@  testsuite_setup(void)
 		}
 	}
 
-	if (ts_params->valid_dev_found == 0)
-		return TEST_FAILED;
+	if (ts_params->valid_dev_found == 0) {
+		RTE_LOG(WARNING, USER1, "No compatible crypto device found.\n");
+		return TEST_SKIPPED;
+	}
 
 	ts_params->mbuf_pool = rte_pktmbuf_pool_create(
 			"CRYPTO_MBUFPOOL",