]> git.droids-corp.org - dpdk.git/commitdiff
test: skip unsupported tests on Windows
authorJie Zhou <jizh@linux.microsoft.com>
Wed, 26 Jan 2022 05:10:42 +0000 (21:10 -0800)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 8 Feb 2022 13:19:40 +0000 (14:19 +0100)
Skip tests which are not yet supported for Windows:
- The libraries that tests depend on are not enabled on Windows yet
- The tests can compile but with issue still under investigation
    * test_func_reentrancy:
      Windows EAL has no protection against repeated calls.
    * test_lcores:
      Execution enters an infinite loops, requires investigation.
    * test_rcu_qsbr_perf:
      Execution hangs on Windows, requires investigation.

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
61 files changed:
app/test/test_acl.c
app/test/test_bpf.c
app/test/test_cryptodev.c
app/test/test_cryptodev_asym.c
app/test/test_cryptodev_blockcipher.c
app/test/test_cryptodev_security_ipsec.c
app/test/test_cryptodev_security_pdcp.c
app/test/test_debug.c
app/test/test_distributor.c
app/test/test_distributor_perf.c
app/test/test_eal_flags.c
app/test/test_eal_fs.c
app/test/test_efd.c
app/test/test_efd_perf.c
app/test/test_event_crypto_adapter.c
app/test/test_event_eth_rx_adapter.c
app/test/test_event_eth_tx_adapter.c
app/test/test_event_ring.c
app/test/test_event_timer_adapter.c
app/test/test_eventdev.c
app/test/test_external_mem.c
app/test/test_fib.c
app/test/test_fib6.c
app/test/test_fib6_perf.c
app/test/test_fib_perf.c
app/test/test_flow_classify.c
app/test/test_func_reentrancy.c
app/test/test_graph.c
app/test/test_graph_perf.c
app/test/test_hash_perf.c
app/test/test_ipfrag.c
app/test/test_ipsec.c
app/test/test_ipsec_perf.c
app/test/test_ipsec_sad.c
app/test/test_kni.c
app/test/test_lcores.c
app/test/test_lpm.c
app/test/test_lpm6.c
app/test/test_lpm6_perf.c
app/test/test_lpm_perf.c
app/test/test_malloc.c
app/test/test_mbuf.c
app/test/test_member.c
app/test/test_member_perf.c
app/test/test_mp_secondary.c
app/test/test_pie.c
app/test/test_rawdev.c
app/test/test_rcu_qsbr_perf.c
app/test/test_red.c
app/test/test_reorder.c
app/test/test_rib.c
app/test/test_rib6.c
app/test/test_sched.c
app/test/test_table.c
app/test/test_table_acl.c
app/test/test_table_combined.c
app/test/test_table_pipeline.c
app/test/test_table_ports.c
app/test/test_table_tables.c
app/test/test_timer_secondary.c
app/test/test_trace.c

index 5b32347954dc59fa482598ecb4f3bd7a8c8d3f50..4d51098925c496ce3f112ce9a6acaa524a6b8038 100644 (file)
 #include <rte_mbuf.h>
 #include <rte_byteorder.h>
 #include <rte_ip.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_acl(void)
+{
+       printf("ACL not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
 #include <rte_acl.h>
 #include <rte_common.h>
 
@@ -1741,4 +1751,6 @@ test_acl(void)
        return 0;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(acl_autotest, test_acl);
index 2d755a872f0f25e99e7c7007a1b7b19cbdfb5de9..d1e10adab545a5bc48436006c981d247fe5fa1fa 100644 (file)
 #include <rte_random.h>
 #include <rte_byteorder.h>
 #include <rte_errno.h>
+#include "test.h"
+
+#if !defined(RTE_LIB_BPF)
+
+static int
+test_bpf(void)
+{
+       printf("BPF not supported, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <rte_bpf.h>
 #include <rte_ether.h>
 #include <rte_ip.h>
 
-#include "test.h"
 
 /*
  * Basic functional tests for librte_bpf.
@@ -3248,6 +3260,8 @@ test_bpf(void)
        return rc;
 }
 
+#endif /* !RTE_LIB_BPF */
+
 REGISTER_TEST_COMMAND(bpf_autotest, test_bpf);
 
 #ifdef RTE_HAS_LIBPCAP
index ec4a61bdf970705986a669fefc19b8c9a3ca3aa6..8842e19d3d8f6d3d0a261d4f786842e34f6d9b73 100644 (file)
@@ -3,6 +3,8 @@
  * Copyright 2020 NXP
  */
 
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 #include <time.h>
 
 #include <rte_common.h>
@@ -16093,3 +16095,5 @@ REGISTER_TEST_COMMAND(cryptodev_nitrox_autotest, test_cryptodev_nitrox);
 REGISTER_TEST_COMMAND(cryptodev_bcmfs_autotest, test_cryptodev_bcmfs);
 REGISTER_TEST_COMMAND(cryptodev_cn9k_autotest, test_cryptodev_cn9k);
 REGISTER_TEST_COMMAND(cryptodev_cn10k_autotest, test_cryptodev_cn10k);
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
index 68f4d8e7a6f9b8b63fb6b6ed8624a146e5e39ac8..9d3a5589bb9c8a6c5384f34649c6b5ee6c438324 100644 (file)
@@ -3,6 +3,8 @@
  * Copyright (c) 2019 Intel Corporation
  */
 
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 #include <rte_bus_vdev.h>
 #include <rte_common.h>
 #include <rte_hexdump.h>
@@ -2412,3 +2414,5 @@ REGISTER_TEST_COMMAND(cryptodev_octeontx_asym_autotest,
                                          test_cryptodev_octeontx_asym);
 REGISTER_TEST_COMMAND(cryptodev_cn9k_asym_autotest, test_cryptodev_cn9k_asym);
 REGISTER_TEST_COMMAND(cryptodev_cn10k_asym_autotest, test_cryptodev_cn10k_asym);
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
index 5688a45377b28881ba7a69f8726c8786ae761005..0c6f3ff42d4b39ee8388804098de75e47e8b0c47 100644 (file)
@@ -2,6 +2,8 @@
  * Copyright(c) 2015-2017 Intel Corporation
  */
 
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_mbuf.h>
@@ -1221,3 +1223,5 @@ free_blockcipher_test_suite(struct unit_test_suite *ts)
 {
        free(ts);
 }
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
index e662ea279f8adb88bc6be1e23682df203ee834b2..229eadf5de48318153914d47652ddf1de3b977fb 100644 (file)
@@ -2,6 +2,8 @@
  * Copyright(C) 2021 Marvell.
  */
 
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 #include <rte_common.h>
 #include <rte_cryptodev.h>
 #include <rte_esp.h>
@@ -974,3 +976,5 @@ test_ipsec_pkt_update(uint8_t *pkt, const struct ipsec_test_flags *flags)
 
        return 0;
 }
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
index a7641bab7a6fbc99c1bb515835728667f986214b..30d86fb28e5fa047838d456616d2058abe482b57 100644 (file)
@@ -4,6 +4,8 @@
  * Copyright 2018-2019 NXP
  */
 
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 #include <time.h>
 
 #include <rte_common.h>
@@ -587,3 +589,5 @@ test_PDCP_PROTO_uplane_decap_all(void)
 
        return n - i;
 };
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
index 23b24db177394919cd2e52f2d566317e001c9688..2704f5b9272626dc705f6b00f75d2ea75fb8e918 100644 (file)
@@ -2,8 +2,21 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
+#include "test.h"
+
 #include <stdio.h>
 #include <stdint.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_debug(void)
+{
+       printf("debug not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <sys/resource.h>
 #include <sys/time.h>
 #include <sys/wait.h>
@@ -14,8 +27,6 @@
 #include <rte_eal.h>
 #include <rte_service_component.h>
 
-#include "test.h"
-
 /*
  * Debug test
  * ==========
@@ -127,4 +138,6 @@ test_debug(void)
        return 0;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(debug_autotest, test_debug);
index 961f326cd5594237dc0bcd01bb04ff3c08559c7f..3efa4af10439f5109bdce0228ba2002f8db5d35d 100644 (file)
 #include <rte_mempool.h>
 #include <rte_mbuf.h>
 #include <rte_mbuf_dyn.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_distributor(void)
+{
+       printf("distributor not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <rte_distributor.h>
 #include <rte_string_fns.h>
 
@@ -939,4 +950,6 @@ err:
        return -1;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(distributor_autotest, test_distributor);
index 92e330f194280287fca25a6433ff7b49b260f555..ee4321486d8a48b5773ceddce11608c716cc186f 100644 (file)
 #include <rte_cycles.h>
 #include <rte_common.h>
 #include <rte_mbuf.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_distributor_perf(void)
+{
+       printf("distributor perf not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <rte_distributor.h>
 #include <rte_pause.h>
 
@@ -264,4 +275,6 @@ test_distributor_perf(void)
        return 0;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(distributor_perf_autotest, test_distributor_perf);
index d7f4c2cd47f73df76d571ebe1604aa8f6ec48eaa..bc158d7a4a4f8ea6eb23b81fa1709794c61855be 100644 (file)
@@ -9,6 +9,94 @@
 
 #include <string.h>
 #include <stdarg.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_missing_c_flag(void)
+{
+       printf("missing_c_flag not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_main_lcore_flag(void)
+{
+       printf("main_lcore_flag not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_invalid_n_flag(void)
+{
+       printf("invalid_n_flag not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_no_hpet_flag(void)
+{
+       printf("no_hpet_flag not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_no_huge_flag(void)
+{
+       printf("no_huge_flag not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_allow_flag(void)
+{
+       printf("allow_flag not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_invalid_b_flag(void)
+{
+       printf("invalid_b_flag not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_invalid_vdev_flag(void)
+{
+       printf("invalid_vdev_flag not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_invalid_r_flag(void)
+{
+       printf("invalid_r_flag not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_memory_flags(void)
+{
+       printf("memory_flags not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_file_prefix(void)
+{
+       printf("file_prefix not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_misc_flags(void)
+{
+       printf("misc_flags not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <libgen.h>
 #include <stdlib.h>
 #include <errno.h>
@@ -1498,6 +1586,8 @@ test_memory_flags(void)
        return 0;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(eal_flags_c_opt_autotest, test_missing_c_flag);
 REGISTER_TEST_COMMAND(eal_flags_main_opt_autotest, test_main_lcore_flag);
 REGISTER_TEST_COMMAND(eal_flags_n_opt_autotest, test_invalid_n_flag);
index 39ac6961b383edc133c83c1247562d03d08db68a..b3686edcb459e0cadda0823b78e5dd46380a800a 100644 (file)
 
 #include "eal_filesystem.h"
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_eal_fs(void)
+{
+       printf("eal_fs not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 static int
 test_parse_sysfs_value(void)
 {
@@ -173,4 +183,6 @@ test_eal_fs(void)
        return 0;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(eal_fs_autotest, test_eal_fs);
index 1b249e0447a5ff7c3211860828ed109e5af581e2..7bea674086b9fa53ae1e23d9b309e2e03ebacbed 100644 (file)
@@ -1,6 +1,17 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2016-2017 Intel Corporation
  */
+#include "test.h"
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_efd(void)
+{
+       printf("EFD not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
 
 #include <rte_memcpy.h>
 #include <rte_malloc.h>
@@ -10,8 +21,6 @@
 #include <rte_debug.h>
 #include <rte_ip.h>
 
-#include "test.h"
-
 #define EFD_TEST_KEY_LEN 8
 #define TABLE_SIZE (1 << 21)
 #define ITERATIONS 3
@@ -462,4 +471,6 @@ test_efd(void)
        return 0;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(efd_autotest, test_efd);
index f3fe3b17366f00d73274e9f90d265d1c5e093f4e..d7f4d835491422689dc6bc5eea3623eac8feb4c9 100644 (file)
@@ -2,6 +2,18 @@
  * Copyright(c) 2016-2017 Intel Corporation
  */
 
+#include "test.h"
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_efd_perf(void)
+{
+       printf("EFD not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <stdio.h>
 #include <inttypes.h>
 
@@ -13,8 +25,6 @@
 #include <rte_memcpy.h>
 #include <rte_thash.h>
 
-#include "test.h"
-
 #define NUM_KEYSIZES 10
 #define NUM_SHUFFLES 10
 #define MAX_KEYSIZE 64
@@ -382,4 +392,6 @@ test_efd_perf(void)
        return 0;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(efd_perf_autotest, test_efd_perf);
index 3d7e9fb93cbbf0a0ed71c8992e2a55e93f031de0..688520db4ed06854c25ba8455772546220256e60 100644 (file)
@@ -3,16 +3,27 @@
  * All rights reserved.
  */
 
+#include "test.h"
 #include <string.h>
 #include <rte_common.h>
 #include <rte_mempool.h>
 #include <rte_mbuf.h>
 #include <rte_cryptodev.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_event_crypto_adapter(void)
+{
+       printf("event_crypto_adapter not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <rte_eventdev.h>
 #include <rte_bus_vdev.h>
 #include <rte_service.h>
 #include <rte_event_crypto_adapter.h>
-#include "test.h"
 
 #define PKT_TRACE                  0
 #define NUM                        1
@@ -1011,5 +1022,7 @@ test_event_crypto_adapter(void)
        return unit_test_suite_runner(&functional_testsuite);
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(event_crypto_adapter_autotest,
                test_event_crypto_adapter);
index 7cb91b152faeb6a8c7b2fc0a7ddd2a196a7924ae..e358a7056b6ad75c1f35fdd2265910b3c5fe5bed 100644 (file)
@@ -1,18 +1,37 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2017 Intel Corporation
  */
+
+#include "test.h"
+
 #include <string.h>
 #include <rte_common.h>
 #include <rte_mempool.h>
 #include <rte_mbuf.h>
 #include <rte_ethdev.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_event_eth_rx_adapter_common(void)
+{
+       printf("event_eth_rx_adapter not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_event_eth_rx_intr_adapter_common(void)
+{
+       printf("event_eth_rx_intr_adapter not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <rte_eventdev.h>
 #include <rte_bus_vdev.h>
 
 #include <rte_event_eth_rx_adapter.h>
 
-#include "test.h"
-
 #define MAX_NUM_RX_QUEUE       64
 #define NB_MBUFS               (8192 * num_ports * MAX_NUM_RX_QUEUE)
 #define MBUF_CACHE_SIZE                512
@@ -1027,6 +1046,8 @@ test_event_eth_rx_intr_adapter_common(void)
        return unit_test_suite_runner(&event_eth_rx_intr_tests);
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(event_eth_rx_adapter_autotest,
                test_event_eth_rx_adapter_common);
 REGISTER_TEST_COMMAND(event_eth_rx_intr_adapter_autotest,
index cfcc7843510e3dc166358ed1758a73a1fc4f70ff..2900532f832ccb6da6bd0b41e7d67fbf6f3e4278 100644 (file)
 
 #include "test.h"
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_event_eth_tx_adapter_common(void)
+{
+       printf("event_eth_tx_adapter not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #define MAX_NUM_QUEUE          RTE_PMD_RING_MAX_RX_RINGS
 #define TEST_INST_ID           0
 #define TEST_DEV_ID            0
@@ -696,5 +706,7 @@ test_event_eth_tx_adapter_common(void)
        return unit_test_suite_runner(&event_eth_tx_tests);
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(event_eth_tx_adapter_autotest,
                test_event_eth_tx_adapter_common);
index 70eb9845e1c29fdb38d332acf024330d100b1752..bc4a6e73f5ba2a107c00250f285d50d8b6107e27 100644 (file)
@@ -2,11 +2,21 @@
  * Copyright(c) 2010-2017 Intel Corporation
  */
 
+#include "test.h"
+
 #include <string.h>
 
-#include <rte_event_ring.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_event_ring(void)
+{
+       printf("event_ring not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
 
-#include "test.h"
+#else
+
+#include <rte_event_ring.h>
 
 /*
  * Event Ring
@@ -244,4 +254,6 @@ test_event_ring(void)
        return 0;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(event_ring_autotest, test_event_ring);
index 25bac2d155fee8dbfd709528a228ff8a3e572372..d6170bb5893db9a7c3e3f16b593d6be9afea07af 100644 (file)
@@ -3,6 +3,8 @@
  * Copyright(c) 2017-2018 Intel Corporation.
  */
 
+#include "test.h"
+
 #include <math.h>
 
 #include <rte_common.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>
@@ -21,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
@@ -1950,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);
index 10028fe11dddc94843aff4cb5b9dd88eb3e10787..4f51042bdaad46b6bfd9744197a72dd88e066b0b 100644 (file)
@@ -2,17 +2,28 @@
  * Copyright(c) 2016 Cavium, Inc
  */
 
+#include "test.h"
+
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_mbuf.h>
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_eventdev_common(void)
+{
+       printf("eventdev_common not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <rte_eventdev.h>
 #include <rte_dev.h>
 #include <rte_bus_vdev.h>
 
-#include "test.h"
-
 #define TEST_DEV_ID   0
 
 static int
@@ -1042,7 +1053,11 @@ test_eventdev_selftest_cn10k(void)
        return test_eventdev_selftest_impl("event_cn10k", "");
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(eventdev_common_autotest, test_eventdev_common);
+
+#ifndef RTE_EXEC_ENV_WINDOWS
 REGISTER_TEST_COMMAND(eventdev_selftest_sw, test_eventdev_selftest_sw);
 REGISTER_TEST_COMMAND(eventdev_selftest_octeontx,
                test_eventdev_selftest_octeontx);
@@ -1050,3 +1065,5 @@ REGISTER_TEST_COMMAND(eventdev_selftest_dpaa2, test_eventdev_selftest_dpaa2);
 REGISTER_TEST_COMMAND(eventdev_selftest_dlb2, test_eventdev_selftest_dlb2);
 REGISTER_TEST_COMMAND(eventdev_selftest_cn9k, test_eventdev_selftest_cn9k);
 REGISTER_TEST_COMMAND(eventdev_selftest_cn10k, test_eventdev_selftest_cn10k);
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
index 5edf88b9f613eccb296691f11f2624955b7137f5..0c64b610a9393ccdf6f7801c2685f691d77c8474 100644 (file)
@@ -2,11 +2,24 @@
  * Copyright(c) 2018 Intel Corporation
  */
 
+#include "test.h"
+
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <fcntl.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_external_mem(void)
+{
+       printf("external_mem not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <sys/mman.h>
 #include <sys/wait.h>
 
@@ -19,8 +32,6 @@
 #include <rte_ring.h>
 #include <rte_string_fns.h>
 
-#include "test.h"
-
 #define EXTERNAL_MEM_SZ (RTE_PGSIZE_4K << 10) /* 4M of data */
 
 static int
@@ -574,4 +585,6 @@ test_external_mem(void)
        return ret;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(external_mem_autotest, test_external_mem);
index eb69d6e2fd4ca720b3ab9d902b8961acff8ee070..a2d1ea8f3abc12b2d90df986b1104e1c7e2de66e 100644 (file)
@@ -9,10 +9,28 @@
 
 #include <rte_ip.h>
 #include <rte_log.h>
-#include <rte_fib.h>
 
 #include "test.h"
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_fib(void)
+{
+       printf("fib not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_slow_fib(void)
+{
+       printf("slow_fib not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
+#include <rte_fib.h>
+
 typedef int32_t (*rte_fib_test)(void);
 
 static int32_t test_create_invalid(void);
@@ -415,5 +433,7 @@ test_slow_fib(void)
        return unit_test_suite_runner(&fib_slow_tests);
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(fib_autotest, test_fib);
 REGISTER_TEST_COMMAND(fib_slow_autotest, test_slow_fib);
index 15ad09178ae2c6629b6440f8cbc0bb572eec8d34..cd971e6ecdfbe2625cb82d3be5071f7188dcca90 100644 (file)
@@ -9,11 +9,29 @@
 
 #include <rte_memory.h>
 #include <rte_log.h>
-#include <rte_rib6.h>
-#include <rte_fib6.h>
 
 #include "test.h"
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_fib6(void)
+{
+       printf("fib not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_slow_fib6(void)
+{
+       printf("slow_fib not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
+#include <rte_rib6.h>
+#include <rte_fib6.h>
+
 typedef int32_t (*rte_fib6_test)(void);
 
 static int32_t test_create_invalid(void);
@@ -424,5 +442,7 @@ test_slow_fib6(void)
        return unit_test_suite_runner(&fib6_slow_tests);
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(fib6_autotest, test_fib6);
 REGISTER_TEST_COMMAND(fib6_slow_autotest, test_slow_fib6);
index e565799155d9f06b3a351a606671c5cf973bb782..21d2b65318e961848f1c75b0d2e85a2d680c3ab5 100644 (file)
 #include <rte_cycles.h>
 #include <rte_random.h>
 #include <rte_memory.h>
-#include <rte_fib6.h>
 
 #include "test.h"
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_fib6_perf(void)
+{
+       printf("fib6_perf not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
+#include <rte_fib6.h>
+
 #include "test_lpm6_data.h"
 
 #define TEST_FIB_ASSERT(cond) do {                             \
@@ -155,4 +167,6 @@ test_fib6_perf(void)
        return 0;
 }
 
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
 REGISTER_TEST_COMMAND(fib6_perf_autotest, test_fib6_perf);
index 7a25fe8df752c1b20c22539d08cfed67c26c9156..9787874cc9b7fce8153271113fefb9ff95079ba9 100644 (file)
 #include <rte_random.h>
 #include <rte_branch_prediction.h>
 #include <rte_ip.h>
-#include <rte_fib.h>
 
 #include "test.h"
 #include "test_xmmt_ops.h"
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_fib_perf(void)
+{
+       printf("fib_perf not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
+#include <rte_fib.h>
+
 #define TEST_FIB_ASSERT(cond) do {                             \
        if (!(cond)) {                                          \
                printf("Error at line %d:\n", __LINE__);        \
@@ -409,4 +420,6 @@ test_fib_perf(void)
        return 0;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(fib_perf_autotest, test_fib_perf);
index 4f64be53572466a3aa64ed21a154222b64fb241d..6e274d88e64560cf9c9d6618cb165aeb2e46d621 100644 (file)
 #include <rte_mbuf.h>
 #include <rte_byteorder.h>
 #include <rte_ip.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_flow_classify(void)
+{
+       printf("flow_classify not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <rte_acl.h>
 #include <rte_common.h>
 #include <rte_table_acl.h>
@@ -879,4 +890,6 @@ test_flow_classify(void)
        return TEST_SUCCESS;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(flow_classify_autotest, test_flow_classify);
index ce40c3ce9631b0547937e30c0977823082859846..4ab4167eb03178bf302237d3d7af7b222d19021a 100644 (file)
@@ -489,6 +489,9 @@ test_func_reentrancy(void)
        uint32_t case_id;
        struct test_case *pt_case = NULL;
 
+       if (RTE_EXEC_ENV_IS_WINDOWS)
+               return TEST_SKIPPED;
+
        if (rte_lcore_count() < 2) {
                printf("Not enough cores for func_reentrancy_autotest, expecting at least 2\n");
                return TEST_SKIPPED;
index 81bdcb9bea9750ee91187808dca82cee8614c028..35e1a95b894820791467f73d129529d96ec01f77 100644 (file)
@@ -1,6 +1,9 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(C) 2020 Marvell International Ltd.
  */
+
+#include "test.h"
+
 #include <assert.h>
 #include <inttypes.h>
 #include <signal.h>
 #include <unistd.h>
 
 #include <rte_errno.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_node_list_dump(void)
+{
+       printf("node_list_dump not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <rte_graph.h>
 #include <rte_graph_worker.h>
 #include <rte_mbuf.h>
 #include <rte_mbuf_dyn.h>
 #include <rte_random.h>
 
-#include "test.h"
-
 static uint16_t test_node_worker_source(struct rte_graph *graph,
                                        struct rte_node *node, void **objs,
                                        uint16_t nb_objs);
@@ -841,4 +853,7 @@ test_node_list_dump(void)
 
        return TEST_SUCCESS;
 }
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(node_list_dump, test_node_list_dump);
index 296d99a9d3fa3afcbab26932b8bbf69953dae805..1d065438a69408656ecea588dc08b09f9da10c6b 100644 (file)
@@ -1,6 +1,9 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(C) 2020 Marvell International Ltd.
  */
+
+#include "test.h"
+
 #include <inttypes.h>
 #include <signal.h>
 #include <stdio.h>
 #include <rte_common.h>
 #include <rte_cycles.h>
 #include <rte_errno.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_graph_perf_func(void)
+{
+       printf("graph_perf not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <rte_graph.h>
 #include <rte_graph_worker.h>
 #include <rte_lcore.h>
 #include <rte_malloc.h>
 #include <rte_mbuf.h>
 
-#include "test.h"
-
 #define TEST_GRAPH_PERF_MZ          "graph_perf_data"
 #define TEST_GRAPH_SRC_NAME         "test_graph_perf_source"
 #define TEST_GRAPH_SRC_BRST_ONE_NAME "test_graph_perf_source_one"
@@ -1060,4 +1071,6 @@ test_graph_perf_func(void)
        return unit_test_suite_runner(&graph_perf_testsuite);
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(graph_perf_autotest, test_graph_perf_func);
index 7e98ec3964a4528684c98c2652416e0face37797..104a70b3974ec727077291d6cdd295d8241c4c60 100644 (file)
@@ -723,6 +723,10 @@ static int
 test_hash_perf(void)
 {
        unsigned int with_pushes, with_locks;
+
+       if (RTE_EXEC_ENV_IS_WINDOWS)
+               return TEST_SKIPPED;
+
        for (with_locks = 0; with_locks <= 1; with_locks++) {
                if (with_locks)
                        printf("\nWith locks in the code\n");
index 1ced25a1231a1435475dcab2077ba9eb8456e1de..baff5ed083ca81810bfa39d0c1288cc6d1869ec6 100644 (file)
@@ -2,19 +2,30 @@
  * Copyright(c) 2020 Red Hat, Inc.
  */
 
+#include "test.h"
+
 #include <time.h>
 
 #include <rte_common.h>
 #include <rte_cycles.h>
 #include <rte_hexdump.h>
 #include <rte_ip.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_ipfrag(void)
+{
+       printf("ipfrag not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <rte_ip_frag.h>
 #include <rte_mbuf.h>
 #include <rte_memcpy.h>
 #include <rte_random.h>
 
-#include "test.h"
-
 #define NUM_MBUFS 128
 #define BURST 32
 
@@ -322,4 +333,6 @@ test_ipfrag(void)
        return unit_test_suite_runner(&ipfrag_testsuite);
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(ipfrag_autotest, test_ipfrag);
index bc2a3dbc2e0a84af4c13780bc960b0565abd52d2..8da025bf662104825fcd0959e6205ebc6ff99e07 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
@@ -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);
index 92106bf374e541b03dde62f98d6bb7f03afca024..346a8516489b436f1557b3211acd3fe2eb5d2d41 100644 (file)
@@ -2,16 +2,28 @@
  * Copyright(c) 2020 Intel Corporation
  */
 
+#include "test.h"
+
 #include <stdio.h>
 #include <rte_ip.h>
 #include <rte_malloc.h>
 #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>
 
-#include "test.h"
 #include "test_cryptodev.h"
 
 #define RING_SIZE      4096
@@ -611,4 +623,6 @@ test_libipsec_perf(void)
        return TEST_SUCCESS;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(ipsec_perf_autotest, test_libipsec_perf);
index 491164689e3c212fef1bbd97a52bece378a1f57b..7534f16f89d0deab31eb98f8185244f36e57db20 100644 (file)
@@ -2,15 +2,26 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
+#include "test.h"
+
 #include <stdio.h>
 #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>
 
-#include "test.h"
 #include "test_xmmt_ops.h"
 
 typedef int32_t (*rte_ipsec_sad_test)(void);
@@ -884,4 +895,6 @@ 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);
index 2761de9b07c2fd30545d3804b21c870c3c364892..622315c8b17874e56d5f3dbde36d3a99666ab8e3 100644 (file)
@@ -2,15 +2,12 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
+#include "test.h"
+
 #include <stdio.h>
 #include <stdint.h>
 #include <unistd.h>
 #include <string.h>
-#include <sys/wait.h>
-#include <dirent.h>
-
-#include "test.h"
-
 #if !defined(RTE_EXEC_ENV_LINUX) || !defined(RTE_LIB_KNI)
 
 static int
@@ -22,6 +19,9 @@ test_kni(void)
 
 #else
 
+#include <sys/wait.h>
+#include <dirent.h>
+
 #include <rte_string_fns.h>
 #include <rte_mempool.h>
 #include <rte_ethdev.h>
index a0d8c6aa41dd02513644153c21db49b820293a83..a6bb4124ad03a084467569b75d043647f515378e 100644 (file)
@@ -384,6 +384,9 @@ test_lcores(void)
        unsigned int eal_threads_count = 0;
        unsigned int i;
 
+       if (RTE_EXEC_ENV_IS_WINDOWS)
+               return TEST_SKIPPED;
+
        for (i = 0; i < RTE_MAX_LCORE; i++) {
                if (!rte_lcore_has_role(i, ROLE_OFF))
                        eal_threads_count++;
index 37b460af3a962d1694afdaa540431a21a094285e..bceb9ae743d75032d7f4d64cfd87456dcb78b50b 100644 (file)
@@ -2,6 +2,18 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
+#include "test.h"
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_lpm(void)
+{
+       printf("lpm not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
@@ -10,7 +22,6 @@
 #include <rte_lpm.h>
 #include <rte_malloc.h>
 
-#include "test.h"
 #include "test_xmmt_ops.h"
 
 #define TEST_LPM_ASSERT(cond) do {                                            \
@@ -1584,4 +1595,6 @@ test_lpm(void)
        return global_status;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(lpm_autotest, test_lpm);
index 17221f992aee04cc80d572cc257bc89ab2764941..1f44392db73969960a95e1808e30efa6a233e94e 100644 (file)
@@ -2,15 +2,26 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
+#include "test.h"
+
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include <rte_memory.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_lpm6(void)
+{
+       printf("lpm6 not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <rte_lpm6.h>
 
-#include "test.h"
 #include "test_lpm6_data.h"
 
 #define TEST_LPM_ASSERT(cond) do {                                            \
@@ -1792,4 +1803,6 @@ test_lpm6(void)
        return global_status;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(lpm6_autotest, test_lpm6);
index 0b43ad824a62cd374c8d1fd250d6cd54f64ed876..aaf2773b6faced665a89e9fc4ca6841a039ba18b 100644 (file)
@@ -2,6 +2,18 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
+#include "test.h"
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_lpm6_perf(void)
+{
+       printf("lpm6_perf not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
@@ -12,7 +24,6 @@
 #include <rte_memory.h>
 #include <rte_lpm6.h>
 
-#include "test.h"
 #include "test_lpm6_data.h"
 
 #define TEST_LPM_ASSERT(cond) do {                                            \
@@ -160,4 +171,6 @@ test_lpm6_perf(void)
        return 0;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(lpm6_perf_autotest, test_lpm6_perf);
index 2bed00d0648f5fc5ddebf5c856e2b71a0a995876..e858716f909b5c1469c135b47cb775e3ae64b321 100644 (file)
@@ -3,6 +3,17 @@
  * Copyright(c) 2020 Arm Limited
  */
 
+#include "test.h"
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_lpm_perf(void)
+{
+       printf("lpm_perf not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
@@ -15,7 +26,6 @@
 #include <rte_ip.h>
 #include <rte_lpm.h>
 
-#include "test.h"
 #include "test_xmmt_ops.h"
 
 struct rte_lpm *lpm;
@@ -763,4 +773,6 @@ test_lpm_perf(void)
        return 0;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(lpm_perf_autotest, test_lpm_perf);
index 6d9249f831be19d940d8af65874e3a5ce375c1f8..8db500c514e7a9abd00768f06f5dd900d5eef43f 100644 (file)
@@ -2,13 +2,17 @@
  * Copyright(c) 2010-2019 Intel Corporation
  */
 
+#include "test.h"
+
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
 #include <stdarg.h>
 #include <errno.h>
 #include <stdlib.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <sys/mman.h>
+#endif
 #include <sys/queue.h>
 #include <unistd.h>
 
 #include <rte_random.h>
 #include <rte_string_fns.h>
 
-#include "test.h"
-
 #define N 10000
 
-
 static int
 is_mem_on_socket(int32_t socket);
 
@@ -47,8 +48,8 @@ addr_to_socket(void *addr);
 static int
 is_memory_overlap(void *p1, size_t len1, void *p2, size_t len2)
 {
-       unsigned long ptr1 = (unsigned long)p1;
-       unsigned long ptr2 = (unsigned long)p2;
+       uintptr_t ptr1 = (uintptr_t)p1;
+       uintptr_t ptr2 = (uintptr_t)p2;
 
        if (ptr2 >= ptr1 && (ptr2 - ptr1) < len1)
                return 1;
@@ -60,7 +61,7 @@ is_memory_overlap(void *p1, size_t len1, void *p2, size_t len2)
 static int
 is_aligned(void *p, int align)
 {
-       unsigned long addr = (unsigned long)p;
+       uintptr_t addr = (uintptr_t)p;
        unsigned mask = align - 1;
 
        if (addr & mask)
@@ -373,6 +374,14 @@ test_multi_alloc_statistics(void)
        return 0;
 }
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_realloc(void)
+{
+       return TEST_SKIPPED;
+}
+#else
+
 static int
 test_realloc_socket(int socket)
 {
@@ -671,6 +680,8 @@ end:
        return ret;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 static int
 test_random_alloc_free(void *_ __rte_unused)
 {
index f54d1d7c006a1c1d57acaacf25e9bf2815ace4bf..f762befb695492237c19319cbea3111007a2cc0b 100644 (file)
@@ -2,6 +2,8 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
+#include "test.h"
+
 #include <string.h>
 #include <stdarg.h>
 #include <stdio.h>
@@ -33,8 +35,6 @@
 #include <rte_tcp.h>
 #include <rte_mbuf_dyn.h>
 
-#include "test.h"
-
 #define MEMPOOL_CACHE_SIZE      32
 #define MBUF_DATA_SIZE          2048
 #define NB_MBUF                 128
@@ -1172,6 +1172,15 @@ err:
 #endif
 }
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool)
+{
+       RTE_SET_USED(pktmbuf_pool);
+       return TEST_SKIPPED;
+}
+#else
+
 #include <unistd.h>
 #include <sys/resource.h>
 #include <sys/time.h>
@@ -1267,6 +1276,8 @@ test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool)
        return 0;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 static int
 test_mbuf_linearize(struct rte_mempool *pktmbuf_pool, int pkt_len,
                    int nb_segs)
index af9d50915cea34643820ae549c695436f6b59c6d..26a712439f703a3291e655753be9401377295bd8 100644 (file)
@@ -4,16 +4,27 @@
 
 /* This test is for membership library's simple feature test */
 
+#include "test.h"
+
 #include <rte_memcpy.h>
 #include <rte_malloc.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_member(void)
+{
+       printf("member not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <rte_member.h>
 #include <rte_byteorder.h>
 #include <rte_random.h>
 #include <rte_debug.h>
 #include <rte_ip.h>
 
-#include "test.h"
-
 struct rte_member_setsum *setsum_ht;
 struct rte_member_setsum *setsum_cache;
 struct rte_member_setsum *setsum_vbf;
@@ -712,4 +723,6 @@ test_member(void)
        return 0;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(member_autotest, test_member);
index e2840f12d3e5b22315b0906bae13bb7f9f1f2015..978db0020a7eed43ecd70c6545c9b7f309921293 100644 (file)
@@ -2,6 +2,8 @@
  * Copyright(c) 2017 Intel Corporation
  */
 
+#include "test.h"
+
 #include <stdio.h>
 #include <inttypes.h>
 
 #include <rte_random.h>
 #include <rte_memcpy.h>
 #include <rte_thash.h>
-#include <rte_member.h>
 
-#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_member_perf(void)
+{
+       printf("member_perf not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
+#include <rte_member.h>
 
 #define NUM_KEYSIZES 10
 #define NUM_SHUFFLES 10
@@ -622,4 +633,6 @@ test_member_perf(void)
        return 0;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(member_perf_autotest, test_member_perf);
index 021ca0547f073a801b250bfc3bd9e2c1717012f8..ad47d578f22b71f3937a8b79102120bcad0a36fc 100644 (file)
 #include <errno.h>
 #include <string.h>
 #include <unistd.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+int
+test_mp_secondary(void)
+{
+       printf("mp_secondary not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+#else
+
 #include <sys/wait.h>
 #include <libgen.h>
 #include <dirent.h>
@@ -211,4 +221,6 @@ test_mp_secondary(void)
        return run_object_creation_tests();
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(multiprocess_autotest, test_mp_secondary);
index 632d4b014d1ed4f42c04538e8a04d7807fa06fd3..a3c0f97c9df40c61bacbd0698fd64f787071d2c9 100644 (file)
@@ -2,6 +2,33 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
+#include "test.h"
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+
+static int
+test_pie(void)
+{
+       printf("pie not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_pie_perf(void)
+{
+       printf("pie_perf not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_pie_all(void)
+{
+       printf("pie_all not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -12,8 +39,6 @@
 #include <time.h>
 #include <math.h>
 
-#include "test.h"
-
 #include <rte_pie.h>
 
 #ifdef __INTEL_COMPILER
@@ -1060,6 +1085,8 @@ test_pie_all(void)
        return tell_the_result(num_tests, num_pass);
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(pie_autotest, test_pie);
 REGISTER_TEST_COMMAND(pie_perf, test_pie_perf);
 REGISTER_TEST_COMMAND(pie_all, test_pie_all);
index 081fab969b05455a363127c7463bb4782fc8753e..3c780e3f9e96ade337f209869f2c17b84466ffb7 100644 (file)
@@ -1,16 +1,27 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright 2017 NXP
  */
+
+#include "test.h"
+
 #include <rte_common.h>
 #include <rte_mbuf.h>
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
 #include <rte_dev.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_rawdev_selftests(void)
+{
+       printf("rawdev not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+#else
+
 #include <rte_rawdev.h>
 #include <rte_bus_vdev.h>
 
-#include "test.h"
-
 static int
 test_rawdev_selftest_impl(const char *pmd, const char *opts)
 {
@@ -54,4 +65,6 @@ test_rawdev_selftests(void)
        return ret;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(rawdev_autotest, test_rawdev_selftests);
index cf7b158d22bb9635bd26a42d0c607178bd2fecae..b15e5cef885d43417882b3b764ad407741689267 100644 (file)
@@ -614,6 +614,9 @@ test_rcu_qsbr_main(void)
 {
        uint16_t core_id;
 
+       if (RTE_EXEC_ENV_IS_WINDOWS)
+               return TEST_SKIPPED;
+
        if (rte_lcore_count() < 3) {
                printf("Not enough cores for rcu_qsbr_perf_autotest, expecting at least 3\n");
                return TEST_SKIPPED;
index 33a9f4ebb7531f65773386356a81fe956478e13a..84c292f8d8798d55d5eb25ac2e4a51204f222757 100644 (file)
@@ -2,18 +2,42 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
+#include "test.h"
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdint.h>
 #include <unistd.h>
 #include <inttypes.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_red(void)
+{
+       printf("red not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_red_perf(void)
+{
+       printf("red_perf not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_red_all(void)
+{
+       printf("red_all not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+#else
+
 #include <sys/time.h>
 #include <time.h>
 #include <math.h>
 
-#include "test.h"
-
 #include <rte_red.h>
 
 #ifdef __INTEL_COMPILER
@@ -1851,6 +1875,8 @@ test_red_all(void)
        return tell_the_result(num_tests, num_pass);
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(red_autotest, test_red);
 REGISTER_TEST_COMMAND(red_perf, test_red_perf);
 REGISTER_TEST_COMMAND(red_all, test_red_all);
index 1c4226da65019cead92b2df8a95081086887ccf9..07dcce06d293ec9bab8cab6a2e60604dd0542608 100644 (file)
@@ -2,6 +2,8 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
+#include "test.h"
+
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>
 #include <rte_cycles.h>
 #include <rte_errno.h>
 #include <rte_mbuf.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_reorder(void)
+{
+       printf("reorder not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+#else
+
 #include <rte_reorder.h>
 #include <rte_lcore.h>
 #include <rte_malloc.h>
 
-#include "test.h"
-
 #define BURST 32
 #define REORDER_BUFFER_SIZE 16384
 #define NUM_MBUFS (2*REORDER_BUFFER_SIZE)
@@ -390,4 +400,6 @@ test_reorder(void)
        return unit_test_suite_runner(&reorder_test_suite);
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(reorder_autotest, test_reorder);
index 3dc48fe1f2eb01d7c962b3baf26fe1a7d944e593..06058f8f7c52a9260c17da9c95f834c7e8c441ad 100644 (file)
@@ -3,14 +3,31 @@
  * Copyright(c) 2019 Intel Corporation
  */
 
+#include "test.h"
+
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
 
 #include <rte_ip.h>
-#include <rte_rib.h>
 
-#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_rib(void)
+{
+       printf("rib not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_slow_rib(void)
+{
+       printf("slow_rib not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+#else
+
+#include <rte_rib.h>
 
 typedef int32_t (*rte_rib_test)(void);
 
@@ -363,5 +380,7 @@ test_slow_rib(void)
        return unit_test_suite_runner(&rib_slow_tests);
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(rib_autotest, test_rib);
 REGISTER_TEST_COMMAND(rib_slow_autotest, test_slow_rib);
index c77df11298e4a4480390d880140cca740e574a57..ba79aedea5f79d3abec1415747c1a36921e3ef5c 100644 (file)
@@ -3,14 +3,31 @@
  * Copyright(c) 2019 Intel Corporation
  */
 
+#include "test.h"
+
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
 
 #include <rte_ip.h>
-#include <rte_rib6.h>
 
-#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_rib6(void)
+{
+       printf("rib6 not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_slow_rib6(void)
+{
+       printf("slow_rib6 not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+#else
+
+#include <rte_rib6.h>
 
 typedef int32_t (*rte_rib6_test)(void);
 
@@ -368,5 +385,7 @@ test_slow_rib6(void)
        return unit_test_suite_runner(&rib6_slow_tests);
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(rib6_autotest, test_rib6);
 REGISTER_TEST_COMMAND(rib6_slow_autotest, test_slow_rib6);
index 958b631144bdbe13cfb5ca3d4a47f94e1f80393c..ddec5724473e6bb9dfddc5bda131bc9fd1d8ddf5 100644 (file)
 #include <rte_ether.h>
 #include <rte_ip.h>
 #include <rte_byteorder.h>
-#include <rte_sched.h>
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_sched(void)
+{
+       printf("sched not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+#else
+
+#include <rte_sched.h>
 
 #define SUBPORT         0
 #define PIPE            1
@@ -204,4 +213,6 @@ test_sched(void)
        return 0;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(sched_autotest, test_sched);
index 95034148cb02f2492bff20bd081308f9fe397b41..d100666e1ce0d4c23545274c1e799d854c5e6536 100644 (file)
@@ -7,6 +7,16 @@
 #include <rte_string_fns.h>
 #include <string.h>
 #include "test.h"
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_table(void)
+{
+       printf("table not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+#else
+
 #include "test_table.h"
 #include "test_table_pipeline.h"
 #include "test_table_ports.h"
@@ -194,4 +204,6 @@ end:
        return ret;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(table_autotest, test_table);
index 0bdf76ab70b36eea1e17fe67273945cbab9d598d..e66f06b84d0afe55b814615821702e6ad8f4e20a 100644 (file)
@@ -2,6 +2,8 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 #include <rte_ip.h>
 #include <rte_string_fns.h>
 #include <rte_hexdump.h>
@@ -728,3 +730,5 @@ test_table_acl(void)
 
        return 0;
 }
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
index f72b634bff709063c8c1990f8ca06aca35908025..1c2efe649ded9061694e4e6747adbb0335f25030 100644 (file)
@@ -2,6 +2,8 @@
  * Copyright(c) 2010-2016 Intel Corporation
  */
 
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 #include <string.h>
 #include "test_table_combined.h"
 #include "test_table.h"
@@ -840,3 +842,5 @@ test_table_hash_cuckoo_combined(void)
 
        return 0;
 }
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
index 915c451fedc0d5471d54fd33dd9bdf9203e45795..7adbbffbf55d69e86b0642f8a10e3deebdec97c4 100644 (file)
@@ -2,6 +2,8 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 #include <string.h>
 #include <rte_pipeline.h>
 #include <rte_log.h>
@@ -569,3 +571,5 @@ test_table_pipeline(void)
 
        return 0;
 }
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
index d921b2e207eb1c1ff8b18822efcec6770eb24cec..282ec2a3d20a84e33c9c9557189304f09d83ead0 100644 (file)
@@ -2,6 +2,8 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 #include "test_table_ports.h"
 #include "test_table.h"
 
@@ -189,3 +191,5 @@ test_port_ring_writer(void)
 
        return 0;
 }
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
index 4ff6ab16aaaa88109efbd655b88e74fd15327475..d5c5a426bc7cfc3f334d18e2f482fd0b57a165f3 100644 (file)
@@ -2,6 +2,8 @@
  * Copyright(c) 2010-2016 Intel Corporation
  */
 
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 #include <string.h>
 #include <rte_byteorder.h>
 #include <rte_table_lpm_ipv6.h>
@@ -1052,3 +1054,5 @@ test_table_hash_cuckoo(void)
 
        return 0;
 }
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
index 5795c97f070b837484126fb94844ae8d6f8ac49b..4e220559b4e3fdf375659a73f913413a8e1d157b 100644 (file)
 #include <rte_random.h>
 
 #include "test.h"
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+int
+test_timer_secondary(void)
+{
+       printf("timer_secondary not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+#else
+
 #include "process.h"
 
 #define NUM_TIMERS             (1 << 20) /* ~1M timers */
@@ -212,4 +222,6 @@ test_timer_secondary(void)
        return TEST_FAILED;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 REGISTER_TEST_COMMAND(timer_secondary_autotest, test_timer_secondary);
index 0f9df83c40e32fa934d6bd13ed0d929d14161f54..76af79162b90b5ab9840be8d6fecc07ff6e16924 100644 (file)
@@ -9,6 +9,31 @@
 #include "test.h"
 #include "test_trace.h"
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+
+static int
+test_trace(void)
+{
+       printf("trace not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_trace_dump(void)
+{
+       printf("trace_dump not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+static int
+test_trace_metadata_dump(void)
+{
+       printf("trace_metadata_dump not supported on Windows, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 static int32_t
 test_trace_point_globbing(void)
 {
@@ -194,8 +219,6 @@ test_trace(void)
        return unit_test_suite_runner(&trace_tests);
 }
 
-REGISTER_TEST_COMMAND(trace_autotest, test_trace);
-
 static int
 test_trace_dump(void)
 {
@@ -203,12 +226,14 @@ test_trace_dump(void)
        return 0;
 }
 
-REGISTER_TEST_COMMAND(trace_dump, test_trace_dump);
-
 static int
 test_trace_metadata_dump(void)
 {
        return rte_trace_metadata_dump(stdout);
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
+REGISTER_TEST_COMMAND(trace_autotest, test_trace);
+REGISTER_TEST_COMMAND(trace_dump, test_trace_dump);
 REGISTER_TEST_COMMAND(trace_metadata_dump, test_trace_metadata_dump);