#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>
return 0;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(acl_autotest, test_acl);
#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.
return rc;
}
+#endif /* !RTE_LIB_BPF */
+
REGISTER_TEST_COMMAND(bpf_autotest, test_bpf);
#ifdef RTE_HAS_LIBPCAP
* Copyright 2020 NXP
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <time.h>
#include <rte_common.h>
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 */
* Copyright (c) 2019 Intel Corporation
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <rte_bus_vdev.h>
#include <rte_common.h>
#include <rte_hexdump.h>
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 */
* Copyright(c) 2015-2017 Intel Corporation
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <rte_common.h>
#include <rte_hexdump.h>
#include <rte_mbuf.h>
{
free(ts);
}
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
* Copyright(C) 2021 Marvell.
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <rte_common.h>
#include <rte_cryptodev.h>
#include <rte_esp.h>
return 0;
}
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
* Copyright 2018-2019 NXP
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <time.h>
#include <rte_common.h>
return n - i;
};
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
* 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>
#include <rte_eal.h>
#include <rte_service_component.h>
-#include "test.h"
-
/*
* Debug test
* ==========
return 0;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(debug_autotest, test_debug);
#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>
return -1;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(distributor_autotest, test_distributor);
#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>
return 0;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(distributor_perf_autotest, test_distributor_perf);
#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>
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);
#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)
{
return 0;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(eal_fs_autotest, test_eal_fs);
/* 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>
#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
return 0;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(efd_autotest, test_efd);
* 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>
#include <rte_memcpy.h>
#include <rte_thash.h>
-#include "test.h"
-
#define NUM_KEYSIZES 10
#define NUM_SHUFFLES 10
#define MAX_KEYSIZE 64
return 0;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(efd_perf_autotest, test_efd_perf);
* 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
return unit_test_suite_runner(&functional_testsuite);
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(event_crypto_adapter_autotest,
test_event_crypto_adapter);
/* 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
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,
#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
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);
* 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
return 0;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(event_ring_autotest, test_event_ring);
* 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>
#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
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);
* 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
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);
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 */
* 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>
#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
return ret;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(external_mem_autotest, test_external_mem);
#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);
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);
#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);
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);
#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 { \
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(fib6_perf_autotest, test_fib6_perf);
#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__); \
return 0;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(fib_perf_autotest, test_fib_perf);
#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>
return TEST_SUCCESS;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(flow_classify_autotest, test_flow_classify);
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;
/* 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);
return TEST_SUCCESS;
}
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(node_list_dump, test_node_list_dump);
/* 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"
return unit_test_suite_runner(&graph_perf_testsuite);
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(graph_perf_autotest, test_graph_perf_func);
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");
* 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
return unit_test_suite_runner(&ipfrag_testsuite);
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(ipfrag_autotest, test_ipfrag);
* 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
return unit_test_suite_runner(&ipsec_testsuite);
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(ipsec_autotest, test_ipsec);
* 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
return TEST_SUCCESS;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(ipsec_perf_autotest, test_libipsec_perf);
* 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);
return unit_test_suite_runner(&ipsec_sad_tests);
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(ipsec_sad_autotest, test_ipsec_sad);
* 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
#else
+#include <sys/wait.h>
+#include <dirent.h>
+
#include <rte_string_fns.h>
#include <rte_mempool.h>
#include <rte_ethdev.h>
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++;
* 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>
#include <rte_lpm.h>
#include <rte_malloc.h>
-#include "test.h"
#include "test_xmmt_ops.h"
#define TEST_LPM_ASSERT(cond) do { \
return global_status;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(lpm_autotest, test_lpm);
* 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 { \
return global_status;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(lpm6_autotest, test_lpm6);
* 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>
#include <rte_memory.h>
#include <rte_lpm6.h>
-#include "test.h"
#include "test_lpm6_data.h"
#define TEST_LPM_ASSERT(cond) do { \
return 0;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(lpm6_perf_autotest, test_lpm6_perf);
* 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>
#include <rte_ip.h>
#include <rte_lpm.h>
-#include "test.h"
#include "test_xmmt_ops.h"
struct rte_lpm *lpm;
return 0;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(lpm_perf_autotest, test_lpm_perf);
* 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);
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;
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)
return 0;
}
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_realloc(void)
+{
+ return TEST_SKIPPED;
+}
+#else
+
static int
test_realloc_socket(int socket)
{
return ret;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
static int
test_random_alloc_free(void *_ __rte_unused)
{
* Copyright(c) 2010-2014 Intel Corporation
*/
+#include "test.h"
+
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
#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
#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>
return 0;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
static int
test_mbuf_linearize(struct rte_mempool *pktmbuf_pool, int pkt_len,
int nb_segs)
/* 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;
return 0;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(member_autotest, test_member);
* 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
return 0;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(member_perf_autotest, test_member_perf);
#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>
return run_object_creation_tests();
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(multiprocess_autotest, test_mp_secondary);
* 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>
#include <time.h>
#include <math.h>
-#include "test.h"
-
#include <rte_pie.h>
#ifdef __INTEL_COMPILER
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);
/* 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)
{
return ret;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(rawdev_autotest, test_rawdev_selftests);
{
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;
* 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
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);
* 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)
return unit_test_suite_runner(&reorder_test_suite);
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(reorder_autotest, test_reorder);
* 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);
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);
* 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);
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);
#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
return 0;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(sched_autotest, test_sched);
#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"
return ret;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(table_autotest, test_table);
* Copyright(c) 2010-2014 Intel Corporation
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <rte_ip.h>
#include <rte_string_fns.h>
#include <rte_hexdump.h>
return 0;
}
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
* Copyright(c) 2010-2016 Intel Corporation
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <string.h>
#include "test_table_combined.h"
#include "test_table.h"
return 0;
}
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
* Copyright(c) 2010-2014 Intel Corporation
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <string.h>
#include <rte_pipeline.h>
#include <rte_log.h>
return 0;
}
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
* Copyright(c) 2010-2014 Intel Corporation
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include "test_table_ports.h"
#include "test_table.h"
return 0;
}
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
* Copyright(c) 2010-2016 Intel Corporation
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <string.h>
#include <rte_byteorder.h>
#include <rte_table_lpm_ipv6.h>
return 0;
}
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
#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 */
return TEST_FAILED;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(timer_secondary_autotest, test_timer_secondary);
#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)
{
return unit_test_suite_runner(&trace_tests);
}
-REGISTER_TEST_COMMAND(trace_autotest, test_trace);
-
static int
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);