From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B5838A00C3; Wed, 26 Jan 2022 06:11:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4F64411E6; Wed, 26 Jan 2022 06:11:02 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 4CC3E41C3D for ; Wed, 26 Jan 2022 06:10:51 +0100 (CET) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id B131820B83F2; Tue, 25 Jan 2022 21:10:49 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B131820B83F2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1643173849; bh=unjbvljTIV1vgPWx7brIn/owKSZEkomtDMRxrTEoDQg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f6XyY/RKtTpQ0urEptAJRbBIGCjG4guqwOB4Ow3qNfUEqLfYdyNjNOdkL8PvEAr66 ej3Dgfp4yUI7E6lx26xViauezj406yE59TTvG0vhhX5BryP9N+b40nnhsrmWvqIAMf +obEYPX2M0gK05eEWh0+C0YQZwx4iPO72Ve/6zBw= From: Jie Zhou To: dev@dpdk.org Cc: dmitry.kozliuk@gmail.com, bruce.richardson@intel.com, roretzla@microsoft.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, pallavi.kadam@intel.com, talshn@nvidia.com, thomas@monjalon.net, aconole@redhat.com Subject: [PATCH v15 09/11] app/test: skip tests that are not supported yet Date: Tue, 25 Jan 2022 21:10:42 -0800 Message-Id: <1643173844-27341-10-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1643173844-27341-1-git-send-email-jizh@linux.microsoft.com> References: <1638990000-3228-1-git-send-email-jizh@linux.microsoft.com> <1643173844-27341-1-git-send-email-jizh@linux.microsoft.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 Signed-off-by: Dmitry Kozlyuk Acked-by: Tyler Retzlaff --- app/test/test_acl.c | 12 ++++ app/test/test_bpf.c | 15 +++- app/test/test_cryptodev.c | 4 ++ app/test/test_cryptodev_asym.c | 4 ++ app/test/test_cryptodev_blockcipher.c | 4 ++ app/test/test_cryptodev_security_ipsec.c | 4 ++ app/test/test_cryptodev_security_pdcp.c | 4 ++ app/test/test_debug.c | 17 ++++- app/test/test_distributor.c | 13 ++++ app/test/test_distributor_perf.c | 13 ++++ app/test/test_eal_flags.c | 90 ++++++++++++++++++++++++ app/test/test_eal_fs.c | 12 ++++ app/test/test_efd.c | 15 +++- app/test/test_efd_perf.c | 16 ++++- app/test/test_event_crypto_adapter.c | 15 +++- app/test/test_event_eth_rx_adapter.c | 25 ++++++- app/test/test_event_eth_tx_adapter.c | 12 ++++ app/test/test_event_ring.c | 16 ++++- app/test/test_event_timer_adapter.c | 16 ++++- app/test/test_eventdev.c | 20 +++++- app/test/test_external_mem.c | 18 ++++- app/test/test_fib.c | 22 +++++- app/test/test_fib6.c | 24 ++++++- app/test/test_fib6_perf.c | 16 ++++- app/test/test_fib_perf.c | 15 +++- app/test/test_flow_classify.c | 13 ++++ app/test/test_func_reentrancy.c | 3 + app/test/test_graph.c | 18 ++++- app/test/test_graph_perf.c | 16 ++++- app/test/test_hash_perf.c | 4 ++ app/test/test_ipfrag.c | 16 ++++- app/test/test_ipsec.c | 16 ++++- app/test/test_ipsec_perf.c | 15 +++- app/test/test_ipsec_sad.c | 14 +++- app/test/test_kni.c | 10 +-- app/test/test_lcores.c | 33 +++++---- app/test/test_lpm.c | 14 +++- app/test/test_lpm6.c | 14 +++- app/test/test_lpm6_perf.c | 14 +++- app/test/test_lpm_perf.c | 13 +++- app/test/test_malloc.c | 20 ++++-- app/test/test_mbuf.c | 15 +++- app/test/test_member.c | 16 ++++- app/test/test_member_perf.c | 16 ++++- app/test/test_memcpy_perf.c | 1 - app/test/test_mp_secondary.c | 12 ++++ app/test/test_pie.c | 30 +++++++- app/test/test_rawdev.c | 17 ++++- app/test/test_rcu_qsbr_perf.c | 3 + app/test/test_red.c | 29 +++++++- app/test/test_reorder.c | 15 +++- app/test/test_rib.c | 22 +++++- app/test/test_rib6.c | 22 +++++- app/test/test_sched.c | 14 +++- app/test/test_security.c | 2 +- app/test/test_table.c | 13 ++++ app/test/test_table_acl.c | 3 + app/test/test_table_combined.c | 4 ++ app/test/test_table_pipeline.c | 4 ++ app/test/test_table_ports.c | 4 ++ app/test/test_table_tables.c | 4 ++ app/test/test_timer_secondary.c | 13 ++++ app/test/test_trace.c | 32 +++++++-- 63 files changed, 858 insertions(+), 88 deletions(-) diff --git a/app/test/test_acl.c b/app/test/test_acl.c index 5b32347954..7814e25a53 100644 --- a/app/test/test_acl.c +++ b/app/test/test_acl.c @@ -11,6 +11,16 @@ #include #include #include + +#ifdef RTE_EXEC_ENV_WINDOWS +static int +test_acl(void) +{ + printf("acl not supported on Windows, skipping test\n"); + return TEST_SKIPPED; +} + +#else #include #include @@ -1741,4 +1751,6 @@ test_acl(void) return 0; } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(acl_autotest, test_acl); diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c index 2d755a872f..4ae6ac1823 100644 --- a/app/test/test_bpf.c +++ b/app/test/test_bpf.c @@ -14,11 +14,22 @@ #include #include #include +#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 #include #include -#include "test.h" /* * Basic functional tests for librte_bpf. @@ -3248,6 +3259,8 @@ test_bpf(void) return rc; } +#endif + REGISTER_TEST_COMMAND(bpf_autotest, test_bpf); #ifdef RTE_HAS_LIBPCAP diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 801c0c7998..f32f30aed0 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -3,6 +3,8 @@ * Copyright 2020 NXP */ +#ifndef RTE_EXEC_ENV_WINDOWS + #include #include @@ -15732,3 +15734,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 /*ifndef RTE_EXEC_ENV_WINDOWS*/ diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c index 68f4d8e7a6..dc153cbc90 100644 --- a/app/test/test_cryptodev_asym.c +++ b/app/test/test_cryptodev_asym.c @@ -3,6 +3,8 @@ * Copyright (c) 2019 Intel Corporation */ +#ifndef RTE_EXEC_ENV_WINDOWS + #include #include #include @@ -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 /*ifndef RTE_EXEC_ENV_WINDOWS*/ diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c index 5688a45377..3860433ffd 100644 --- a/app/test/test_cryptodev_blockcipher.c +++ b/app/test/test_cryptodev_blockcipher.c @@ -2,6 +2,8 @@ * Copyright(c) 2015-2017 Intel Corporation */ +#ifndef RTE_EXEC_ENV_WINDOWS + #include #include #include @@ -1221,3 +1223,5 @@ free_blockcipher_test_suite(struct unit_test_suite *ts) { free(ts); } + +#endif /*ifndef RTE_EXEC_ENV_WINDOWS*/ diff --git a/app/test/test_cryptodev_security_ipsec.c b/app/test/test_cryptodev_security_ipsec.c index 4708803bd2..a84afae7f5 100644 --- a/app/test/test_cryptodev_security_ipsec.c +++ b/app/test/test_cryptodev_security_ipsec.c @@ -2,6 +2,8 @@ * Copyright(C) 2021 Marvell. */ +#ifndef RTE_EXEC_ENV_WINDOWS + #include #include #include @@ -672,3 +674,5 @@ test_ipsec_status_check(struct rte_crypto_op *op, return ret; } + +#endif /*ifndef RTE_EXEC_ENV_WINDOWS*/ diff --git a/app/test/test_cryptodev_security_pdcp.c b/app/test/test_cryptodev_security_pdcp.c index a7641bab7a..3409add715 100644 --- a/app/test/test_cryptodev_security_pdcp.c +++ b/app/test/test_cryptodev_security_pdcp.c @@ -4,6 +4,8 @@ * Copyright 2018-2019 NXP */ +#ifndef RTE_EXEC_ENV_WINDOWS + #include #include @@ -587,3 +589,5 @@ test_PDCP_PROTO_uplane_decap_all(void) return n - i; }; + +#endif /*ifndef RTE_EXEC_ENV_WINDOWS*/ diff --git a/app/test/test_debug.c b/app/test/test_debug.c index 23b24db177..c4038a4ed1 100644 --- a/app/test/test_debug.c +++ b/app/test/test_debug.c @@ -2,8 +2,21 @@ * Copyright(c) 2010-2014 Intel Corporation */ +#include "test.h" + #include #include + +#ifdef RTE_EXEC_ENV_WINDOWS +static int +test_debug(void) +{ + printf("debug not supported on Windows, skipping test\n"); + return TEST_SKIPPED; +} + +#else + #include #include #include @@ -14,8 +27,6 @@ #include #include -#include "test.h" - /* * Debug test * ========== @@ -127,4 +138,6 @@ test_debug(void) return 0; } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(debug_autotest, test_debug); diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c index 961f326cd5..0ecd5ba232 100644 --- a/app/test/test_distributor.c +++ b/app/test/test_distributor.c @@ -11,6 +11,17 @@ #include #include #include + +#ifdef RTE_EXEC_ENV_WINDOWS +static int +test_distributor(void) +{ + printf("distributor not supported on Windows, skipping test\n"); + return TEST_SKIPPED; +} + +#else + #include #include @@ -939,4 +950,6 @@ test_distributor(void) return -1; } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(distributor_autotest, test_distributor); diff --git a/app/test/test_distributor_perf.c b/app/test/test_distributor_perf.c index 92e330f194..650a0317ef 100644 --- a/app/test/test_distributor_perf.c +++ b/app/test/test_distributor_perf.c @@ -10,6 +10,17 @@ #include #include #include + +#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 #include @@ -264,4 +275,6 @@ test_distributor_perf(void) return 0; } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(distributor_perf_autotest, test_distributor_perf); diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c index d7f4c2cd47..5e7e391881 100644 --- a/app/test/test_eal_flags.c +++ b/app/test/test_eal_flags.c @@ -9,6 +9,94 @@ #include #include + +#ifdef RTE_EXEC_ENV_WINDOWS +static int +test_missing_c_flag(void) +{ + printf("emissing_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 #include #include @@ -1498,6 +1586,8 @@ test_memory_flags(void) return 0; } +#endif /*ifdef 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); diff --git a/app/test/test_eal_fs.c b/app/test/test_eal_fs.c index 39ac6961b3..5d24ae3d32 100644 --- a/app/test/test_eal_fs.c +++ b/app/test/test_eal_fs.c @@ -10,6 +10,16 @@ #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 /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(eal_fs_autotest, test_eal_fs); diff --git a/app/test/test_efd.c b/app/test/test_efd.c index 1b249e0447..f8f356dcd9 100644 --- a/app/test/test_efd.c +++ b/app/test/test_efd.c @@ -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 #include @@ -10,8 +21,6 @@ #include #include -#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 /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(efd_autotest, test_efd); diff --git a/app/test/test_efd_perf.c b/app/test/test_efd_perf.c index f3fe3b1736..1bf6bcb0ca 100644 --- a/app/test/test_efd_perf.c +++ b/app/test/test_efd_perf.c @@ -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_perf not supported on Windows, skipping test\n"); + return TEST_SKIPPED; +} + +#else + #include #include @@ -13,8 +25,6 @@ #include #include -#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 /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(efd_perf_autotest, test_efd_perf); diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c index 3d7e9fb93c..47b0e128e9 100644 --- a/app/test/test_event_crypto_adapter.c +++ b/app/test/test_event_crypto_adapter.c @@ -3,16 +3,27 @@ * All rights reserved. */ +#include "test.h" #include #include #include #include #include + +#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 #include #include #include -#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 /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(event_crypto_adapter_autotest, test_event_crypto_adapter); diff --git a/app/test/test_event_eth_rx_adapter.c b/app/test/test_event_eth_rx_adapter.c index 7cb91b152f..1df24fdce2 100644 --- a/app/test/test_event_eth_rx_adapter.c +++ b/app/test/test_event_eth_rx_adapter.c @@ -1,18 +1,37 @@ /* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2017 Intel Corporation */ + +#include "test.h" + #include #include #include #include #include + +#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 #include #include -#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 /*ifdef 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, diff --git a/app/test/test_event_eth_tx_adapter.c b/app/test/test_event_eth_tx_adapter.c index cfcc784351..c1c9732dd4 100644 --- a/app/test/test_event_eth_tx_adapter.c +++ b/app/test/test_event_eth_tx_adapter.c @@ -16,6 +16,16 @@ #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 /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(event_eth_tx_adapter_autotest, test_event_eth_tx_adapter_common); diff --git a/app/test/test_event_ring.c b/app/test/test_event_ring.c index 70eb9845e1..9c5e28fb81 100644 --- a/app/test/test_event_ring.c +++ b/app/test/test_event_ring.c @@ -2,11 +2,21 @@ * Copyright(c) 2010-2017 Intel Corporation */ +#include "test.h" + #include -#include +#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 /* * Event Ring @@ -244,4 +254,6 @@ test_event_ring(void) return 0; } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(event_ring_autotest, test_event_ring); diff --git a/app/test/test_event_timer_adapter.c b/app/test/test_event_timer_adapter.c index 25bac2d155..6f7145ef76 100644 --- a/app/test/test_event_timer_adapter.c +++ b/app/test/test_event_timer_adapter.c @@ -2,6 +2,7 @@ * Copyright(c) 2017 Cavium, Inc * Copyright(c) 2017-2018 Intel Corporation. */ +#include "test.h" #include @@ -10,6 +11,17 @@ #include #include #include + +#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 #include #include @@ -21,8 +33,6 @@ #include #include -#include "test.h" - /* 4K timers corresponds to sw evdev max inflight events */ #define MAX_TIMERS (4 * 1024) #define BKT_TCK_NSEC @@ -1950,4 +1960,6 @@ test_event_timer_adapter_func(void) return unit_test_suite_runner(&event_timer_adptr_functional_testsuite); } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(event_timer_adapter_test, test_event_timer_adapter_func); diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c index 10028fe11d..1664df3680 100644 --- a/app/test/test_eventdev.c +++ b/app/test/test_eventdev.c @@ -1,18 +1,28 @@ /* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2016 Cavium, Inc */ +#include "test.h" #include #include #include #include #include + +#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 #include #include -#include "test.h" - #define TEST_DEV_ID 0 static int @@ -1042,7 +1052,11 @@ test_eventdev_selftest_cn10k(void) return test_eventdev_selftest_impl("event_cn10k", ""); } +#endif /*ifdef 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 +1064,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 /*ifndef RTE_EXEC_ENV_WINDOWS*/ diff --git a/app/test/test_external_mem.c b/app/test/test_external_mem.c index 5edf88b9f6..759f4fce6b 100644 --- a/app/test/test_external_mem.c +++ b/app/test/test_external_mem.c @@ -2,11 +2,25 @@ * Copyright(c) 2018 Intel Corporation */ +#include "test.h" + #include #include #include #include #include + + +#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 #include @@ -19,8 +33,6 @@ #include #include -#include "test.h" - #define EXTERNAL_MEM_SZ (RTE_PGSIZE_4K << 10) /* 4M of data */ static int @@ -574,4 +586,6 @@ test_external_mem(void) return ret; } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(external_mem_autotest, test_external_mem); diff --git a/app/test/test_fib.c b/app/test/test_fib.c index eb69d6e2fd..50b3fa760c 100644 --- a/app/test/test_fib.c +++ b/app/test/test_fib.c @@ -9,10 +9,28 @@ #include #include -#include #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 + 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 /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(fib_autotest, test_fib); REGISTER_TEST_COMMAND(fib_slow_autotest, test_slow_fib); diff --git a/app/test/test_fib6.c b/app/test/test_fib6.c index 15ad09178a..53cca26ff1 100644 --- a/app/test/test_fib6.c +++ b/app/test/test_fib6.c @@ -9,11 +9,29 @@ #include #include -#include -#include #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 +#include + 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 /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(fib6_autotest, test_fib6); REGISTER_TEST_COMMAND(fib6_slow_autotest, test_slow_fib6); diff --git a/app/test/test_fib6_perf.c b/app/test/test_fib6_perf.c index e565799155..21d2b65318 100644 --- a/app/test/test_fib6_perf.c +++ b/app/test/test_fib6_perf.c @@ -10,9 +10,21 @@ #include #include #include -#include #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 + #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); diff --git a/app/test/test_fib_perf.c b/app/test/test_fib_perf.c index 7a25fe8df7..29391b5b27 100644 --- a/app/test/test_fib_perf.c +++ b/app/test/test_fib_perf.c @@ -12,11 +12,22 @@ #include #include #include -#include #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 + #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 /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(fib_perf_autotest, test_fib_perf); diff --git a/app/test/test_flow_classify.c b/app/test/test_flow_classify.c index 4f64be5357..d9893766d1 100644 --- a/app/test/test_flow_classify.c +++ b/app/test/test_flow_classify.c @@ -11,6 +11,17 @@ #include #include #include + +#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 #include #include @@ -879,4 +890,6 @@ test_flow_classify(void) return TEST_SUCCESS; } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(flow_classify_autotest, test_flow_classify); diff --git a/app/test/test_func_reentrancy.c b/app/test/test_func_reentrancy.c index ce40c3ce96..a52325dd7e 100644 --- a/app/test/test_func_reentrancy.c +++ b/app/test/test_func_reentrancy.c @@ -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; diff --git a/app/test/test_graph.c b/app/test/test_graph.c index 81bdcb9bea..ce4cdecd34 100644 --- a/app/test/test_graph.c +++ b/app/test/test_graph.c @@ -1,6 +1,8 @@ /* SPDX-License-Identifier: BSD-3-Clause * Copyright(C) 2020 Marvell International Ltd. */ +#include "test.h" + #include #include #include @@ -9,14 +11,23 @@ #include #include + +#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 #include #include #include #include -#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 +852,7 @@ test_node_list_dump(void) return TEST_SUCCESS; } + +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(node_list_dump, test_node_list_dump); diff --git a/app/test/test_graph_perf.c b/app/test/test_graph_perf.c index 296d99a9d3..a58cde1f22 100644 --- a/app/test/test_graph_perf.c +++ b/app/test/test_graph_perf.c @@ -1,6 +1,8 @@ /* SPDX-License-Identifier: BSD-3-Clause * Copyright(C) 2020 Marvell International Ltd. */ +#include "test.h" + #include #include #include @@ -9,14 +11,22 @@ #include #include #include +#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 #include #include #include #include -#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 +1070,6 @@ test_graph_perf_func(void) return unit_test_suite_runner(&graph_perf_testsuite); } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(graph_perf_autotest, test_graph_perf_func); diff --git a/app/test/test_hash_perf.c b/app/test/test_hash_perf.c index 7e98ec3964..a55a42c584 100644 --- a/app/test/test_hash_perf.c +++ b/app/test/test_hash_perf.c @@ -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"); diff --git a/app/test/test_ipfrag.c b/app/test/test_ipfrag.c index 1ced25a123..52987b6de7 100644 --- a/app/test/test_ipfrag.c +++ b/app/test/test_ipfrag.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2020 Red Hat, Inc. */ +#include "test.h" #include @@ -8,13 +9,22 @@ #include #include #include + +#ifdef RTE_EXEC_ENV_WINDOWS +static int +test_ipfrag(void) +{ + printf("ipfrag not supported on Windows, skipping test\n"); + return TEST_SKIPPED; +} + +#else + #include #include #include #include -#include "test.h" - #define NUM_MBUFS 128 #define BURST 32 @@ -322,4 +332,6 @@ test_ipfrag(void) return unit_test_suite_runner(&ipfrag_testsuite); } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(ipfrag_autotest, test_ipfrag); diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c index bc2a3dbc2e..7a36504532 100644 --- a/app/test/test_ipsec.c +++ b/app/test/test_ipsec.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2018 Intel Corporation */ +#include "test.h" #include @@ -12,16 +13,25 @@ #include #include #include - #include #include #include + +#ifdef RTE_EXEC_ENV_WINDOWS +static int +test_ipsec(void) +{ + printf("ipsec not supported on Windows, skipping test\n"); + return TEST_SKIPPED; +} + +#else + #include #include #include #include -#include "test.h" #include "test_cryptodev.h" #define VDEV_ARGS_SIZE 100 @@ -2536,4 +2546,6 @@ test_ipsec(void) return unit_test_suite_runner(&ipsec_testsuite); } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(ipsec_autotest, test_ipsec); diff --git a/app/test/test_ipsec_perf.c b/app/test/test_ipsec_perf.c index 92106bf374..5ebb61ce18 100644 --- a/app/test/test_ipsec_perf.c +++ b/app/test/test_ipsec_perf.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2020 Intel Corporation */ +#include "test.h" #include #include @@ -8,10 +9,20 @@ #include #include #include + +#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 #include -#include "test.h" #include "test_cryptodev.h" #define RING_SIZE 4096 @@ -611,4 +622,6 @@ test_libipsec_perf(void) return TEST_SUCCESS; } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(ipsec_perf_autotest, test_libipsec_perf); diff --git a/app/test/test_ipsec_sad.c b/app/test/test_ipsec_sad.c index 491164689e..07f3ed245b 100644 --- a/app/test/test_ipsec_sad.c +++ b/app/test/test_ipsec_sad.c @@ -1,16 +1,26 @@ /* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2010-2014 Intel Corporation */ +#include "test.h" #include #include #include #include +#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 #include -#include "test.h" #include "test_xmmt_ops.h" typedef int32_t (*rte_ipsec_sad_test)(void); @@ -884,4 +894,6 @@ test_ipsec_sad(void) return unit_test_suite_runner(&ipsec_sad_tests); } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(ipsec_sad_autotest, test_ipsec_sad); diff --git a/app/test/test_kni.c b/app/test/test_kni.c index 2761de9b07..622315c8b1 100644 --- a/app/test/test_kni.c +++ b/app/test/test_kni.c @@ -2,15 +2,12 @@ * Copyright(c) 2010-2014 Intel Corporation */ +#include "test.h" + #include #include #include #include -#include -#include - -#include "test.h" - #if !defined(RTE_EXEC_ENV_LINUX) || !defined(RTE_LIB_KNI) static int @@ -22,6 +19,9 @@ test_kni(void) #else +#include +#include + #include #include #include diff --git a/app/test/test_lcores.c b/app/test/test_lcores.c index 35c47d5372..af6ef12609 100644 --- a/app/test/test_lcores.c +++ b/app/test/test_lcores.c @@ -12,7 +12,7 @@ #include "test.h" struct thread_context { - enum { INIT, ERROR, DONE } state; + enum { Thread_INIT, Thread_ERROR, Thread_DONE } state; bool lcore_id_any; pthread_t id; unsigned int *registered_count; @@ -26,7 +26,7 @@ static void *thread_loop(void *arg) lcore_id = rte_lcore_id(); if (lcore_id != LCORE_ID_ANY) { printf("Error: incorrect lcore id for new thread %u\n", lcore_id); - t->state = ERROR; + t->state = Thread_ERROR; } if (rte_thread_register() < 0) printf("Warning: could not register new thread (this might be expected during this test), reason %s\n", @@ -36,7 +36,7 @@ static void *thread_loop(void *arg) (!t->lcore_id_any && lcore_id == LCORE_ID_ANY)) { printf("Error: could not register new thread, got %u while %sexpecting %u\n", lcore_id, t->lcore_id_any ? "" : "not ", LCORE_ID_ANY); - t->state = ERROR; + t->state = Thread_ERROR; } /* Report register happened to the control thread. */ __atomic_add_fetch(t->registered_count, 1, __ATOMIC_RELEASE); @@ -49,11 +49,11 @@ static void *thread_loop(void *arg) if (lcore_id != LCORE_ID_ANY) { printf("Error: could not unregister new thread, %u still assigned\n", lcore_id); - t->state = ERROR; + t->state = Thread_ERROR; } - if (t->state != ERROR) - t->state = DONE; + if (t->state != Thread_ERROR) + t->state = Thread_DONE; return NULL; } @@ -74,7 +74,7 @@ test_non_eal_lcores(unsigned int eal_threads_count) /* Try to create as many threads as possible. */ for (i = 0; i < RTE_MAX_LCORE - eal_threads_count; i++) { t = &thread_contexts[i]; - t->state = INIT; + t->state = Thread_INIT; t->registered_count = ®istered_count; t->lcore_id_any = false; if (pthread_create(&t->id, NULL, thread_loop, t) != 0) @@ -93,7 +93,7 @@ test_non_eal_lcores(unsigned int eal_threads_count) if (eal_threads_count + non_eal_threads_count < RTE_MAX_LCORE) goto skip_lcore_any; t = &thread_contexts[non_eal_threads_count]; - t->state = INIT; + t->state = Thread_INIT; t->registered_count = ®istered_count; t->lcore_id_any = true; if (pthread_create(&t->id, NULL, thread_loop, t) == 0) { @@ -111,7 +111,7 @@ test_non_eal_lcores(unsigned int eal_threads_count) for (i = 0; i < non_eal_threads_count; i++) { t = &thread_contexts[i]; pthread_join(t->id, NULL); - if (t->state != DONE) + if (t->state != Thread_DONE) ret = -1; } @@ -259,7 +259,7 @@ test_non_eal_lcores_callback(unsigned int eal_threads_count) } /* First thread that expects a valid lcore id. */ t = &thread_contexts[0]; - t->state = INIT; + t->state = Thread_INIT; t->registered_count = ®istered_count; t->lcore_id_any = false; if (pthread_create(&t->id, NULL, thread_loop, t) != 0) @@ -282,7 +282,7 @@ test_non_eal_lcores_callback(unsigned int eal_threads_count) } /* Second thread, that expects LCORE_ID_ANY because of init refusal. */ t = &thread_contexts[1]; - t->state = INIT; + t->state = Thread_INIT; t->registered_count = ®istered_count; t->lcore_id_any = true; if (pthread_create(&t->id, NULL, thread_loop, t) != 0) @@ -310,7 +310,7 @@ test_non_eal_lcores_callback(unsigned int eal_threads_count) for (i = 0; i < non_eal_threads_count; i++) { t = &thread_contexts[i]; pthread_join(t->id, NULL); - if (t->state != DONE) + if (t->state != Thread_DONE) ret = -1; } if (ret < 0) @@ -347,7 +347,7 @@ static void *ctrl_thread_loop(void *arg) printf("Control thread running successfully\n"); /* Set the thread state to DONE */ - t->state = DONE; + t->state = Thread_DONE; return NULL; } @@ -360,7 +360,7 @@ test_ctrl_thread(void) /* Create one control thread */ t = &ctrl_thread_context; - t->state = INIT; + t->state = Thread_INIT; if (rte_ctrl_thread_create(&t->id, "test_ctrl_threads", NULL, ctrl_thread_loop, t) != 0) return -1; @@ -372,7 +372,7 @@ test_ctrl_thread(void) pthread_join(t->id, NULL); /* Check if the control thread set the correct state */ - if (t->state != DONE) + if (t->state != Thread_DONE) return -1; return 0; @@ -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++; diff --git a/app/test/test_lpm.c b/app/test/test_lpm.c index 37b460af3a..55ae46207a 100644 --- a/app/test/test_lpm.c +++ b/app/test/test_lpm.c @@ -1,6 +1,17 @@ /* SPDX-License-Identifier: BSD-3-Clause * 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 #include @@ -10,7 +21,6 @@ #include #include -#include "test.h" #include "test_xmmt_ops.h" #define TEST_LPM_ASSERT(cond) do { \ @@ -1584,4 +1594,6 @@ test_lpm(void) return global_status; } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(lpm_autotest, test_lpm); diff --git a/app/test/test_lpm6.c b/app/test/test_lpm6.c index 17221f992a..a4d8eda62d 100644 --- a/app/test/test_lpm6.c +++ b/app/test/test_lpm6.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2010-2014 Intel Corporation */ +#include "test.h" #include #include @@ -8,9 +9,18 @@ #include #include +#ifdef RTE_EXEC_ENV_WINDOWS +static int +test_lpm6(void) +{ + printf("lpm6 not supported on Windows, skipping test\n"); + return TEST_SKIPPED; +} + +#else + #include -#include "test.h" #include "test_lpm6_data.h" #define TEST_LPM_ASSERT(cond) do { \ @@ -1792,4 +1802,6 @@ test_lpm6(void) return global_status; } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(lpm6_autotest, test_lpm6); diff --git a/app/test/test_lpm6_perf.c b/app/test/test_lpm6_perf.c index 0b43ad824a..622418ddfe 100644 --- a/app/test/test_lpm6_perf.c +++ b/app/test/test_lpm6_perf.c @@ -1,6 +1,17 @@ /* SPDX-License-Identifier: BSD-3-Clause * 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 #include @@ -12,7 +23,6 @@ #include #include -#include "test.h" #include "test_lpm6_data.h" #define TEST_LPM_ASSERT(cond) do { \ @@ -160,4 +170,6 @@ test_lpm6_perf(void) return 0; } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(lpm6_perf_autotest, test_lpm6_perf); diff --git a/app/test/test_lpm_perf.c b/app/test/test_lpm_perf.c index 2bed00d064..d49bce5d36 100644 --- a/app/test/test_lpm_perf.c +++ b/app/test/test_lpm_perf.c @@ -2,7 +2,17 @@ * Copyright(c) 2010-2014 Intel Corporation * 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 #include #include @@ -15,7 +25,6 @@ #include #include -#include "test.h" #include "test_xmmt_ops.h" struct rte_lpm *lpm; @@ -763,4 +772,6 @@ test_lpm_perf(void) return 0; } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(lpm_perf_autotest, test_lpm_perf); diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c index 6d9249f831..fe6b83271b 100644 --- a/app/test/test_malloc.c +++ b/app/test/test_malloc.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2010-2019 Intel Corporation */ +#include "test.h" #include #include @@ -8,7 +9,9 @@ #include #include #include +#ifndef RTE_EXEC_ENV_WINDOWS #include +#endif #include #include @@ -23,11 +26,8 @@ #include #include -#include "test.h" - #define N 10000 - static int is_mem_on_socket(int32_t socket); @@ -47,8 +47,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 +60,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 +373,13 @@ 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) { @@ -670,6 +677,7 @@ test_realloc(void) end: return ret; } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ static int test_random_alloc_free(void *_ __rte_unused) diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index f54d1d7c00..662b988480 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2010-2014 Intel Corporation */ +#include "test.h" #include #include @@ -33,8 +34,6 @@ #include #include -#include "test.h" - #define MEMPOOL_CACHE_SIZE 32 #define MBUF_DATA_SIZE 2048 #define NB_MBUF 128 @@ -1172,6 +1171,16 @@ test_refcnt_mbuf(void) #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 #include #include @@ -1267,6 +1276,8 @@ test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool) return 0; } +#endif /*!defined RTE_EXEC_ENV_WINDOWS*/ + static int test_mbuf_linearize(struct rte_mempool *pktmbuf_pool, int pkt_len, int nb_segs) diff --git a/app/test/test_member.c b/app/test/test_member.c index af9d50915c..8a6be71238 100644 --- a/app/test/test_member.c +++ b/app/test/test_member.c @@ -3,17 +3,27 @@ */ /* This test is for membership library's simple feature test */ +#include "test.h" #include #include + +#ifdef RTE_EXEC_ENV_WINDOWS +static int +test_member(void) +{ + printf("member not supported on Windows, skipping test\n"); + return TEST_SKIPPED; +} + +#else + #include #include #include #include #include -#include "test.h" - struct rte_member_setsum *setsum_ht; struct rte_member_setsum *setsum_cache; struct rte_member_setsum *setsum_vbf; @@ -712,4 +722,6 @@ test_member(void) return 0; } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(member_autotest, test_member); diff --git a/app/test/test_member_perf.c b/app/test/test_member_perf.c index e2840f12d3..1cc9c3e4d8 100644 --- a/app/test/test_member_perf.c +++ b/app/test/test_member_perf.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2017 Intel Corporation */ +#include "test.h" #include #include @@ -11,9 +12,18 @@ #include #include #include -#include -#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 #define NUM_KEYSIZES 10 #define NUM_SHUFFLES 10 @@ -622,4 +632,6 @@ test_member_perf(void) return 0; } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(member_perf_autotest, test_member_perf); diff --git a/app/test/test_memcpy_perf.c b/app/test/test_memcpy_perf.c index 3727c160e6..9147c0aec6 100644 --- a/app/test/test_memcpy_perf.c +++ b/app/test/test_memcpy_perf.c @@ -13,7 +13,6 @@ #include #include #include - #include #include "test.h" diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c index 021ca0547f..54b0f72645 100644 --- a/app/test/test_mp_secondary.c +++ b/app/test/test_mp_secondary.c @@ -14,6 +14,16 @@ #include #include #include + +#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 #include #include @@ -211,4 +221,6 @@ test_mp_secondary(void) return run_object_creation_tests(); } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(multiprocess_autotest, test_mp_secondary); diff --git a/app/test/test_pie.c b/app/test/test_pie.c index 632d4b014d..edd1aa3d86 100644 --- a/app/test/test_pie.c +++ b/app/test/test_pie.c @@ -2,6 +2,32 @@ * 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 #include #include @@ -12,8 +38,6 @@ #include #include -#include "test.h" - #include #ifdef __INTEL_COMPILER @@ -1060,6 +1084,8 @@ test_pie_all(void) return tell_the_result(num_tests, num_pass); } +#endif /*ifdef 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); diff --git a/app/test/test_rawdev.c b/app/test/test_rawdev.c index 081fab969b..561b0e0300 100644 --- a/app/test/test_rawdev.c +++ b/app/test/test_rawdev.c @@ -1,16 +1,27 @@ /* SPDX-License-Identifier: BSD-3-Clause * Copyright 2017 NXP */ +#include "test.h" + #include #include #include #include #include + +#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 #include -#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 /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(rawdev_autotest, test_rawdev_selftests); diff --git a/app/test/test_rcu_qsbr_perf.c b/app/test/test_rcu_qsbr_perf.c index cf7b158d22..0f4dbcb017 100644 --- a/app/test/test_rcu_qsbr_perf.c +++ b/app/test/test_rcu_qsbr_perf.c @@ -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; diff --git a/app/test/test_red.c b/app/test/test_red.c index 33a9f4ebb7..49d62de36e 100644 --- a/app/test/test_red.c +++ b/app/test/test_red.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2010-2014 Intel Corporation */ +#include "test.h" #include #include @@ -8,12 +9,34 @@ #include #include #include + +#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 #include #include -#include "test.h" - #include #ifdef __INTEL_COMPILER @@ -1851,6 +1874,8 @@ test_red_all(void) return tell_the_result(num_tests, num_pass); } +#endif /*ifdef 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); diff --git a/app/test/test_reorder.c b/app/test/test_reorder.c index 1c4226da65..c73cbdefe6 100644 --- a/app/test/test_reorder.c +++ b/app/test/test_reorder.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2010-2014 Intel Corporation */ +#include "test.h" #include #include @@ -9,12 +10,20 @@ #include #include #include + +#ifdef RTE_EXEC_ENV_WINDOWS +static int +test_reorder(void) +{ + printf("reorder not supported on Windows, skipping test\n"); + return TEST_SKIPPED; +} +#else + #include #include #include -#include "test.h" - #define BURST 32 #define REORDER_BUFFER_SIZE 16384 #define NUM_MBUFS (2*REORDER_BUFFER_SIZE) @@ -390,4 +399,6 @@ test_reorder(void) return unit_test_suite_runner(&reorder_test_suite); } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(reorder_autotest, test_reorder); diff --git a/app/test/test_rib.c b/app/test/test_rib.c index 3dc48fe1f2..ad7c79ca78 100644 --- a/app/test/test_rib.c +++ b/app/test/test_rib.c @@ -2,15 +2,31 @@ * Copyright(c) 2018 Vladimir Medvedkin * Copyright(c) 2019 Intel Corporation */ +#include "test.h" #include #include #include #include -#include -#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 typedef int32_t (*rte_rib_test)(void); @@ -363,5 +379,7 @@ test_slow_rib(void) return unit_test_suite_runner(&rib_slow_tests); } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(rib_autotest, test_rib); REGISTER_TEST_COMMAND(rib_slow_autotest, test_slow_rib); diff --git a/app/test/test_rib6.c b/app/test/test_rib6.c index c77df11298..9d0e3cb55e 100644 --- a/app/test/test_rib6.c +++ b/app/test/test_rib6.c @@ -3,14 +3,31 @@ * Copyright(c) 2019 Intel Corporation */ +#include "test.h" + #include #include #include #include -#include -#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 typedef int32_t (*rte_rib6_test)(void); @@ -368,5 +385,6 @@ test_slow_rib6(void) return unit_test_suite_runner(&rib6_slow_tests); } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ REGISTER_TEST_COMMAND(rib6_autotest, test_rib6); REGISTER_TEST_COMMAND(rib6_slow_autotest, test_slow_rib6); diff --git a/app/test/test_sched.c b/app/test/test_sched.c index 958b631144..ad3e978ea6 100644 --- a/app/test/test_sched.c +++ b/app/test/test_sched.c @@ -14,8 +14,18 @@ #include #include #include -#include +#ifdef RTE_EXEC_ENV_WINDOWS +static int +test_sched(void) +{ + printf("sched not supported on Windows, skipping test\n"); + return TEST_SKIPPED; +} + +#else + +#include #define SUBPORT 0 #define PIPE 1 @@ -204,4 +214,6 @@ test_sched(void) return 0; } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(sched_autotest, test_sched); diff --git a/app/test/test_security.c b/app/test/test_security.c index 059731b65d..71b11aaa75 100644 --- a/app/test/test_security.c +++ b/app/test/test_security.c @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: BSD-3-Clause * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved */ - #include #include #include #include #include + #include #include diff --git a/app/test/test_table.c b/app/test/test_table.c index 95034148cb..2e18e49ba4 100644 --- a/app/test/test_table.c +++ b/app/test/test_table.c @@ -7,6 +7,17 @@ #include #include #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 +205,6 @@ test_table(void) return ret; } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(table_autotest, test_table); diff --git a/app/test/test_table_acl.c b/app/test/test_table_acl.c index 0bdf76ab70..83bef0ea57 100644 --- a/app/test/test_table_acl.c +++ b/app/test/test_table_acl.c @@ -2,6 +2,7 @@ * Copyright(c) 2010-2014 Intel Corporation */ +#ifndef RTE_EXEC_ENV_WINDOWS #include #include #include @@ -728,3 +729,5 @@ test_table_acl(void) return 0; } + +#endif /*ifndef RTE_EXEC_ENV_WINDOWS*/ diff --git a/app/test/test_table_combined.c b/app/test/test_table_combined.c index f72b634bff..0abc5e45c5 100644 --- a/app/test/test_table_combined.c +++ b/app/test/test_table_combined.c @@ -2,6 +2,8 @@ * Copyright(c) 2010-2016 Intel Corporation */ +#ifndef RTE_EXEC_ENV_WINDOWS + #include #include "test_table_combined.h" #include "test_table.h" @@ -840,3 +842,5 @@ test_table_hash_cuckoo_combined(void) return 0; } + +#endif /*ifndef RTE_EXEC_ENV_WINDOWS*/ diff --git a/app/test/test_table_pipeline.c b/app/test/test_table_pipeline.c index 915c451fed..47ae35d2f4 100644 --- a/app/test/test_table_pipeline.c +++ b/app/test/test_table_pipeline.c @@ -2,6 +2,8 @@ * Copyright(c) 2010-2014 Intel Corporation */ +#ifndef RTE_EXEC_ENV_WINDOWS + #include #include #include @@ -569,3 +571,5 @@ test_table_pipeline(void) return 0; } + +#endif /*ifndef RTE_EXEC_ENV_WINDOWS*/ diff --git a/app/test/test_table_ports.c b/app/test/test_table_ports.c index d921b2e207..f3b5693609 100644 --- a/app/test/test_table_ports.c +++ b/app/test/test_table_ports.c @@ -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 /*ifndef RTE_EXEC_ENV_WINDOWS*/ diff --git a/app/test/test_table_tables.c b/app/test/test_table_tables.c index 4ff6ab16aa..2901490e61 100644 --- a/app/test/test_table_tables.c +++ b/app/test/test_table_tables.c @@ -2,6 +2,8 @@ * Copyright(c) 2010-2016 Intel Corporation */ +#ifndef RTE_EXEC_ENV_WINDOWS + #include #include #include @@ -1052,3 +1054,5 @@ test_table_hash_cuckoo(void) return 0; } + +#endif /*ifndef RTE_EXEC_ENV_WINDOWS*/ diff --git a/app/test/test_timer_secondary.c b/app/test/test_timer_secondary.c index 5795c97f07..234a7ec425 100644 --- a/app/test/test_timer_secondary.c +++ b/app/test/test_timer_secondary.c @@ -15,6 +15,17 @@ #include #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 +223,6 @@ test_timer_secondary(void) return TEST_FAILED; } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ + REGISTER_TEST_COMMAND(timer_secondary_autotest, test_timer_secondary); diff --git a/app/test/test_trace.c b/app/test/test_trace.c index 0f9df83c40..e62f9ca10e 100644 --- a/app/test/test_trace.c +++ b/app/test/test_trace.c @@ -9,6 +9,30 @@ #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 +218,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 +225,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 /*ifdef 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); -- 2.34.1.windows.1