[2/2] app/test: enable ipsec-related tests

Message ID 1736181948-8907-3-git-send-email-andremue@linux.microsoft.com (mailing list archive)
State Changes Requested
Delegated to: akhil goyal
Headers
Series compile ipsec on Windows |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation fail ninja build failure
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance success Performance Testing PASS
ci/github-robot: build fail github build: failed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-unit-arm64-testing fail Testing issues
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-compile-arm64-testing fail Testing issues
ci/intel-Testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-compile-amd64-testing success Testing PASS

Commit Message

Andre Muezerie Jan. 6, 2025, 4:45 p.m. UTC
Removed ifdefs which were bypassing the ipsec tests on Windows.

Removed "return" from void function to avoid warning on MSVC.

Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
---
 app/test/test_ipsec.c                 | 17 ++---------------
 app/test/test_ipsec_perf.c            | 13 -------------
 app/test/test_ipsec_sad.c             | 13 -------------
 app/test/test_security_inline_proto.c | 26 --------------------------
 4 files changed, 2 insertions(+), 67 deletions(-)
  

Patch

diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index ac63c3b6d3..b0e4384d0b 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -17,17 +17,6 @@ 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
 #include <rte_lcore.h>
-
-#ifdef RTE_EXEC_ENV_WINDOWS
-static int
-test_ipsec(void)
-{
-	printf("ipsec not supported on Windows, skipping test\n");
-	return TEST_SKIPPED;
-}
-
-#else
-
 #include <rte_ipsec.h>
 #include <rte_random.h>
 #include <rte_esp.h>
@@ -1185,9 +1174,9 @@  destroy_session(struct ipsec_unitest_params *ut,
 	uint8_t crypto_dev, uint32_t j)
 {
 	if (ut->ss[j].type == RTE_SECURITY_ACTION_TYPE_NONE)
-		return destroy_crypto_session(ut, crypto_dev, j);
+		destroy_crypto_session(ut, crypto_dev, j);
 	else
-		return destroy_dummy_sec_session(ut, j);
+		destroy_dummy_sec_session(ut, j);
 }
 
 static void
@@ -2615,6 +2604,4 @@  test_ipsec(void)
 	return unit_test_suite_runner(&ipsec_testsuite);
 }
 
-#endif /* !RTE_EXEC_ENV_WINDOWS */
-
 REGISTER_FAST_TEST(ipsec_autotest, true, true, test_ipsec);
diff --git a/app/test/test_ipsec_perf.c b/app/test/test_ipsec_perf.c
index a32a2086e9..d609bae57e 100644
--- a/app/test/test_ipsec_perf.c
+++ b/app/test/test_ipsec_perf.c
@@ -10,17 +10,6 @@ 
 #include <rte_ring.h>
 #include <rte_mbuf.h>
 #include <rte_cycles.h>
-
-#ifdef RTE_EXEC_ENV_WINDOWS
-static int
-test_libipsec_perf(void)
-{
-	printf("ipsec_perf not supported on Windows, skipping test\n");
-	return TEST_SKIPPED;
-}
-
-#else
-
 #include <rte_ipsec.h>
 #include <rte_random.h>
 
@@ -629,6 +618,4 @@  test_libipsec_perf(void)
 	return TEST_SUCCESS;
 }
 
-#endif /* !RTE_EXEC_ENV_WINDOWS */
-
 REGISTER_PERF_TEST(ipsec_perf_autotest, test_libipsec_perf);
diff --git a/app/test/test_ipsec_sad.c b/app/test/test_ipsec_sad.c
index 642643eb63..378ba3f871 100644
--- a/app/test/test_ipsec_sad.c
+++ b/app/test/test_ipsec_sad.c
@@ -8,17 +8,6 @@ 
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
-
-#ifdef RTE_EXEC_ENV_WINDOWS
-static int
-test_ipsec_sad(void)
-{
-	printf("ipsec_sad not supported on Windows, skipping test\n");
-	return TEST_SKIPPED;
-}
-
-#else
-
 #include <rte_ipsec_sad.h>
 #include <rte_memory.h>
 
@@ -897,6 +886,4 @@  test_ipsec_sad(void)
 	return unit_test_suite_runner(&ipsec_sad_tests);
 }
 
-#endif /* !RTE_EXEC_ENV_WINDOWS */
-
 REGISTER_TEST_COMMAND(ipsec_sad_autotest, test_ipsec_sad);
diff --git a/app/test/test_security_inline_proto.c b/app/test/test_security_inline_proto.c
index 480469f672..f085ec716f 100644
--- a/app/test/test_security_inline_proto.c
+++ b/app/test/test_security_inline_proto.c
@@ -14,30 +14,6 @@ 
 #include "test_security_inline_proto_vectors.h"
 #include "test_security_proto.h"
 
-#ifdef RTE_EXEC_ENV_WINDOWS
-static int
-test_inline_ipsec(void)
-{
-	printf("Inline ipsec not supported on Windows, skipping test\n");
-	return TEST_SKIPPED;
-}
-
-static int
-test_event_inline_ipsec(void)
-{
-	printf("Event inline ipsec not supported on Windows, skipping test\n");
-	return TEST_SKIPPED;
-}
-
-static int
-test_inline_ipsec_sg(void)
-{
-	printf("Inline ipsec SG not supported on Windows, skipping test\n");
-	return TEST_SKIPPED;
-}
-
-#else
-
 #include <rte_eventdev.h>
 #include <rte_event_eth_rx_adapter.h>
 #include <rte_event_eth_tx_adapter.h>
@@ -3619,8 +3595,6 @@  test_event_inline_ipsec(void)
 	return unit_test_suite_runner(&inline_ipsec_testsuite);
 }
 
-#endif /* !RTE_EXEC_ENV_WINDOWS */
-
 REGISTER_TEST_COMMAND(inline_ipsec_autotest, test_inline_ipsec);
 REGISTER_TEST_COMMAND(inline_ipsec_sg_autotest, test_inline_ipsec_sg);
 REGISTER_TEST_COMMAND(event_inline_ipsec_autotest, test_event_inline_ipsec);