test/security: add more inline IPsec functional cases
[dpdk.git] / app / test / test_event_timer_adapter.c
index c36ab32..d6170bb 100644 (file)
@@ -3,14 +3,26 @@
  * Copyright(c) 2017-2018 Intel Corporation.
  */
 
+#include "test.h"
+
 #include <math.h>
 
-#include <rte_atomic.h>
 #include <rte_common.h>
 #include <rte_cycles.h>
 #include <rte_debug.h>
 #include <rte_eal.h>
 #include <rte_ethdev.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_event_timer_adapter_func(void)
+{
+       printf("event_timer_adapter not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <rte_eventdev.h>
 #include <rte_event_timer_adapter.h>
 #include <rte_mempool.h>
@@ -22,8 +34,6 @@
 #include <rte_service.h>
 #include <stdbool.h>
 
-#include "test.h"
-
 /* 4K timers corresponds to sw evdev max inflight events */
 #define MAX_TIMERS  (4 * 1024)
 #define BKT_TCK_NSEC
@@ -303,10 +313,8 @@ _timdev_setup(uint64_t max_tmo_ns, uint64_t bkt_tck_ns, uint64_t flags)
                                "failed to get adapter capabilities");
 
        if (flags & RTE_EVENT_TIMER_ADAPTER_F_PERIODIC &&
-           !(caps & RTE_EVENT_TIMER_ADAPTER_CAP_PERIODIC)) {
-               printf("Adapter does not support periodic timers\n");
-               return TEST_SKIPPED;
-       }
+           !(caps & RTE_EVENT_TIMER_ADAPTER_CAP_PERIODIC))
+               return -ENOTSUP;
 
        if (!(caps & RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT)) {
                timdev = rte_event_timer_adapter_create_ext(&config,
@@ -1072,8 +1080,6 @@ adapter_create(void)
        TEST_ASSERT_SUCCESS(rte_event_timer_adapter_free(adapter),
                        "Failed to free adapter");
 
-       rte_mempool_free(eventdev_test_mempool);
-
        return TEST_SUCCESS;
 }
 
@@ -1955,4 +1961,6 @@ test_event_timer_adapter_func(void)
        return unit_test_suite_runner(&event_timer_adptr_functional_testsuite);
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(event_timer_adapter_test, test_event_timer_adapter_func);