test/threads: add unit test
[dpdk.git] / app / test / test_ipsec.c
index 1bec63b..8da025b 100644 (file)
@@ -2,6 +2,8 @@
  * Copyright(c) 2018 Intel Corporation
  */
 
+#include "test.h"
+
 #include <time.h>
 
 #include <rte_common.h>
 #include <rte_cycles.h>
 #include <rte_bus_vdev.h>
 #include <rte_ip.h>
-
 #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>
 #include <rte_security_driver.h>
 
-#include "test.h"
 #include "test_cryptodev.h"
 
 #define VDEV_ARGS_SIZE 100
@@ -653,7 +664,7 @@ create_crypto_session(struct ipsec_unitest_params *ut,
        if (s == NULL)
                return -ENOMEM;
 
-       /* initiliaze SA crypto session for device */
+       /* initialize SA crypto session for device */
        rc = rte_cryptodev_sym_session_init(dev_id, s,
                        ut->crypto_xforms, qp->mp_session_private);
        if (rc == 0) {
@@ -2536,4 +2547,6 @@ test_ipsec(void)
        return unit_test_suite_runner(&ipsec_testsuite);
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(ipsec_autotest, test_ipsec);