* [dpdk-dev] [PATCH v1 00/13] app/test: enable subset of tests on Windows
@ 2021-08-18 6:17 Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 01/13] lib: build libraries that some tests depend on Jie Zhou
` (13 more replies)
0 siblings, 14 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 6:17 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
This patchset is to enable a subset of unit tests on Windows. It mainly includes:
- Enable building libraries on Windows that some tests depend on
- Replace POSIX specific codes
- Fix some lib and tests per failures investigation
- Replace .sh scripts with .py scripts for meson.build
- Enable build and run subset of unit tests on Windows
Future work:
- Continue investigate known failure to enable more tests
- Work with CI/CD lab to onboard unit tests on Windows to capture regression
Following are the unit tests on Windows baseline state:
(lab setup: a system with XL710, NetUIO and Virt2Phy installed, huge-page enabled)
c:\DPDKUpstream\dpdk\amd64\chk>meson test
ninja: Entering directory `c:\DPDKUpstream\dpdk\amd64\chk'
ninja: no work to do.
1/60 DPDK:fast-tests / alarm_autotest OK 1.62s
2/60 DPDK:fast-tests / bitops_autotest OK 1.58s
3/60 DPDK:fast-tests / byteorder_autotest OK 1.58s
4/60 DPDK:fast-tests / cmdline_autotest OK 1.58s
5/60 DPDK:fast-tests / common_autotest OK 3.77s
6/60 DPDK:fast-tests / cpuflags_autotest OK 1.58s
7/60 DPDK:fast-tests / errno_autotest OK 1.59s
8/60 DPDK:fast-tests / ethdev_link_status OK 1.58s
9/60 DPDK:fast-tests / hash_autotest OK 2.26s
10/60 DPDK:fast-tests / interrupt_autotest SKIP 1.59s exit status 77
11/60 DPDK:fast-tests / logs_autotest OK 1.58s
12/60 DPDK:fast-tests / lpm_autotest OK 3.78s
13/60 DPDK:fast-tests / mcslock_autotest OK 7.37s
14/60 DPDK:fast-tests / memory_autotest OK 1.62s
15/60 DPDK:fast-tests / mempool_autotest OK 2.23s
16/60 DPDK:fast-tests / memzone_autotest OK 1.62s
17/60 DPDK:fast-tests / meter_autotest OK 1.58s
18/60 DPDK:fast-tests / per_lcore_autotest OK 1.69s
19/60 DPDK:fast-tests / prefetch_autotest OK 1.58s
20/60 DPDK:fast-tests / rcu_qsbr_autotest OK 1.93s
21/60 DPDK:fast-tests / rib_autotest OK 6.97s
22/60 DPDK:fast-tests / rib6_autotest OK 6.98s
23/60 DPDK:fast-tests / ring_autotest OK 1.64s
24/60 DPDK:fast-tests / rwlock_test1_autotest OK 3.68s
25/60 DPDK:fast-tests / rwlock_rda_autotest OK 6.58s
26/60 DPDK:fast-tests / rwlock_rds_wrm_autotest OK 6.65s
27/60 DPDK:fast-tests / rwlock_rde_wro_autotest OK 6.59s
28/60 DPDK:fast-tests / spinlock_autotest OK 1.82s
29/60 DPDK:fast-tests / stack_autotest OK 3.56s
30/60 DPDK:fast-tests / stack_lf_autotest OK 5.84s
31/60 DPDK:fast-tests / string_autotest OK 1.59s
32/60 DPDK:fast-tests / tailq_autotest OK 1.58s
33/60 DPDK:fast-tests / ticketlock_autotest OK 1.84s
34/60 DPDK:fast-tests / user_delay_us OK 1.58s
35/60 DPDK:fast-tests / version_autotest OK 1.59s
36/60 DPDK:fast-tests / crc_autotest OK 1.58s
37/60 DPDK:fast-tests / fbarray_autotest OK 1.58s
38/60 DPDK:fast-tests / hash_readwrite_func_autotest OK 4.01s
39/60 DPDK:fast-tests / kvargs_autotest OK 1.58s
40/60 DPDK:fast-tests / metrics_autotest OK 1.58s
41/60 DPDK:fast-tests / reorder_autotest OK 1.62s
42/60 DPDK:fast-tests / service_autotest OK 5.20s
43/60 DPDK:fast-tests / thash_autotest OK 1.58s
44/60 DPDK:perf-tests / atomic_autotest OK 35.04s
45/60 DPDK:perf-tests / memcpy_autotest OK 11.36s
46/60 DPDK:perf-tests / ring_perf_autotest OK 29.48s
47/60 DPDK:perf-tests / timer_autotest OK 13.02s
48/60 DPDK:perf-tests / timer_perf_autotest OK 13.81s
49/60 DPDK:perf-tests / rib_slow_autotest OK 135.43s
50/60 DPDK:perf-tests / barrier_autotest OK 66.77s
51/60 DPDK:perf-tests / hash_multiwriter_autotest OK 8.16s
52/60 DPDK:perf-tests / timer_racecond_autotest OK 5.62s
53/60 DPDK:perf-tests / hash_functions_autotest OK 37.22s
54/60 DPDK:perf-tests / pmd_perf_autotest OK 27.82s
55/60 DPDK:perf-tests / stack_perf_autotest OK 42.71s
56/60 DPDK:perf-tests / stack_lf_perf_autotest OK 94.26s
57/60 DPDK:perf-tests / rand_perf_autotest OK 13.78s
58/60 DPDK:perf-tests / hash_readwrite_perf_autotest OK 50.86s
59/60 DPDK:perf-tests / hash_readwrite_lf_perf_autotest OK 145.72s
60/60 DPDK:perf-tests / trace_perf_autotest OK 2.29s
Ok: 59
Expected Fail: 0
Fail: 0
Unexpected Pass: 0
Skipped: 1
Timeout: 0
Full log written to c:\DPDKUpstream\dpdk\amd64\chk\meson-logs\testlog.txt
Jie Zhou (13):
lib: build libraries that some tests depend on
driver/mempool: build mempool stack on Windows
eal/windows: return ENOTSUP for not supported API
app/test: remove unnecessary headers
app/test: replace POSIX specific code
app/test: exclude ENOTSUP as failure
app/test: skip interrupt tests on Windows
app/test: temporarily "skip" one cmdline test case
app/test: skip two logs_autotest cases on Windows
app/test: differentiate a strerror on different OS
app/test: remove two alarm_autotest cases
app/test: replace .sh scripts with .py scripts
app/test: enable subset of unit tests on Windows
app/test/commands.c | 2 -
app/test/get-coremask.sh | 13 -
app/test/get_coremask.py | 8 +
app/test/has-hugepage.sh | 11 -
app/test/has_hugepage.py | 41 ++
app/test/meson.build | 866 ++++++++++++++++++------------
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +-
app/test/test.c | 5 +-
app/test/test_alarm.c | 4 +
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline.c | 2 +
app/test/test_cmdline_lib.c | 5 +-
app/test/test_crc.c | 1 -
app/test/test_errno.c | 12 +-
app/test/test_interrupts.c | 10 +
app/test/test_logs.c | 6 +-
app/test/test_memory.c | 5 +-
app/test/test_mp_secondary.c | 2 +
app/test/test_pmd_perf.c | 6 +-
app/test/test_ring_stress.c | 3 +-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_telemetry_data.c | 2 +
drivers/mempool/stack/meson.build | 5 -
lib/eal/common/eal_common_errno.c | 4 +
lib/eal/windows/eal_memalloc.c | 6 +-
lib/meson.build | 6 +
27 files changed, 641 insertions(+), 393 deletions(-)
delete mode 100755 app/test/get-coremask.sh
create mode 100644 app/test/get_coremask.py
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v1 01/13] lib: build libraries that some tests depend on
2021-08-18 6:17 [dpdk-dev] [PATCH v1 00/13] app/test: enable subset of tests on Windows Jie Zhou
@ 2021-08-18 6:17 ` Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 02/13] driver/mempool: build mempool stack on Windows Jie Zhou
` (12 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 6:17 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Enable building subset of libraries that tests depend on for Windows
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
lib/meson.build | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/meson.build b/lib/meson.build
index 1673ca4323..f109d6987d 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -81,10 +81,16 @@ if is_windows
'timer',
'bitratestats',
'cfgfile',
+ 'efd',
'gro',
'gso',
+ 'ip_frag',
'latencystats',
+ 'lpm',
'pdump',
+ 'rib',
+ 'reorder',
+ 'stack',
] # only supported libraries for windows
endif
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v1 02/13] driver/mempool: build mempool stack on Windows
2021-08-18 6:17 [dpdk-dev] [PATCH v1 00/13] app/test: enable subset of tests on Windows Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 01/13] lib: build libraries that some tests depend on Jie Zhou
@ 2021-08-18 6:17 ` Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 03/13] eal/windows: return ENOTSUP for not supported API Jie Zhou
` (11 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 6:17 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
From: Jie Zhou <jizh@microsoft.com>
mempool_autotest failed on Windows at setting the "stack" handler
test case. Per debugging, in rte_mempool_ops_table, there are only
6 ring ops registered, and no "stack" ops registered which caused
the failure of rte_mempool_set_ops_byname and thus the test failed.
Per code investigation, the "stack" ops are registered in
rte_mempool_stack.c:
MEMPOOL_REGISTER_OPS(ops_stack);
MEMPOOL_REGISTER_OPS(ops_lf_stack);
The reason these two ops are not registered is because currently
driver\mempool\stack is not build on Windows. After building stack
on Windows, the mempool_autotest now completed as pass.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
drivers/mempool/stack/meson.build | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/mempool/stack/meson.build b/drivers/mempool/stack/meson.build
index 371cf131b1..580dde79eb 100644
--- a/drivers/mempool/stack/meson.build
+++ b/drivers/mempool/stack/meson.build
@@ -1,11 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017-2019 Intel Corporation
-if is_windows
- build = false
- reason = 'not supported on Windows'
-endif
-
sources = files('rte_mempool_stack.c')
deps += ['stack']
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v1 03/13] eal/windows: return ENOTSUP for not supported API
2021-08-18 6:17 [dpdk-dev] [PATCH v1 00/13] app/test: enable subset of tests on Windows Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 01/13] lib: build libraries that some tests depend on Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 02/13] driver/mempool: build mempool stack on Windows Jie Zhou
@ 2021-08-18 6:17 ` Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 04/13] app/test: remove unnecessary headers Jie Zhou
` (10 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 6:17 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
UT memory_autotest on Windows has 2 failed cases on eal APIs
eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2
APIs are not supported on Windows yet. Should return ENOTSUP such that
in test_memory.c these 2 ENOTSUP cases will not be marked as failures,
same as other ENOTSUP cases.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
lib/eal/windows/eal_memalloc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/eal/windows/eal_memalloc.c b/lib/eal/windows/eal_memalloc.c
index 4459d59b1a..fffdd5b976 100644
--- a/lib/eal/windows/eal_memalloc.c
+++ b/lib/eal/windows/eal_memalloc.c
@@ -17,7 +17,7 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
RTE_SET_USED(list_idx);
RTE_SET_USED(seg_idx);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
@@ -28,7 +28,7 @@ eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
RTE_SET_USED(seg_idx);
RTE_SET_USED(offset);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
static int
@@ -433,7 +433,7 @@ eal_memalloc_sync_with_primary(void)
{
/* No multi-process support. */
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v1 04/13] app/test: remove unnecessary headers
2021-08-18 6:17 [dpdk-dev] [PATCH v1 00/13] app/test: enable subset of tests on Windows Jie Zhou
` (2 preceding siblings ...)
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 03/13] eal/windows: return ENOTSUP for not supported API Jie Zhou
@ 2021-08-18 6:17 ` Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 05/13] app/test: replace POSIX specific code Jie Zhou
` (9 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 6:17 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Remove unnecessary header inclusion
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/commands.c | 2 --
app/test/test.c | 1 -
app/test/test_cmdline_lib.c | 1 -
3 files changed, 4 deletions(-)
diff --git a/app/test/commands.c b/app/test/commands.c
index 76f6ee5d23..82bd8bf474 100644
--- a/app/test/commands.c
+++ b/app/test/commands.c
@@ -8,8 +8,6 @@
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
-#include <netinet/in.h>
-#include <termios.h>
#include <inttypes.h>
#include <errno.h>
#include <sys/queue.h>
diff --git a/app/test/test.c b/app/test/test.c
index 173d202e47..52fac24213 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index d5a09b4541..86a5b78d70 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v1 05/13] app/test: replace POSIX specific code
2021-08-18 6:17 [dpdk-dev] [PATCH v1 00/13] app/test: enable subset of tests on Windows Jie Zhou
` (3 preceding siblings ...)
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 04/13] app/test: remove unnecessary headers Jie Zhou
@ 2021-08-18 6:17 ` Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 06/13] app/test: exclude ENOTSUP as failure Jie Zhou
` (8 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 6:17 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Include rte_os_shim.h
- Replace sleep and usleep with rte_delay_us_sleep
- #ifndef RTE_EXEC_ENV_WINDOWS for POSIX code only
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +++-
app/test/test.c | 4 ++++
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline.c | 2 ++
app/test/test_crc.c | 1 -
app/test/test_mp_secondary.c | 2 ++
app/test/test_pmd_perf.c | 6 +++++-
app/test/test_ring_stress.c | 3 ++-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_telemetry_data.c | 2 ++
11 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index 0fd7290b0e..2da4106ad6 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -5,6 +5,7 @@
#include <rte_byteorder.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
+#include <rte_os_shim.h>
#include "packet_burst_generator.h"
diff --git a/app/test/process.h b/app/test/process.h
index 5b10cf64df..1f073b9c5c 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -7,12 +7,14 @@
#include <errno.h> /* errno */
#include <limits.h> /* PATH_MAX */
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <libgen.h> /* basename et al */
+#include <sys/wait.h>
+#endif
#include <stdlib.h> /* NULL */
#include <string.h> /* strerror */
#include <unistd.h> /* readlink */
#include <dirent.h>
-#include <sys/wait.h>
#include <rte_string_fns.h> /* strlcpy */
diff --git a/app/test/test.c b/app/test/test.c
index 52fac24213..e8f8ce8335 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -62,7 +62,9 @@ do_recursive_call(void)
const char *env_var;
int (*action_fn)(void);
} actions[] = {
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "run_secondary_instances", test_mp_secondary },
+#endif
#ifdef RTE_LIB_PDUMP
#ifdef RTE_NET_RING
{ "run_pdump_server_tests", test_pdump },
@@ -81,7 +83,9 @@ do_recursive_call(void)
{ "test_file_prefix", no_action },
{ "test_no_huge_flag", no_action },
#ifdef RTE_LIB_TIMER
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "timer_secondary_spawn_wait", test_timer_secondary },
+#endif
#endif
};
diff --git a/app/test/test_byteorder.c b/app/test/test_byteorder.c
index 03c08d9abf..de14ed539e 100644
--- a/app/test/test_byteorder.c
+++ b/app/test/test_byteorder.c
@@ -46,7 +46,7 @@ test_byteorder(void)
return -1;
res_u16 = rte_bswap16(0x1337);
- printf("const %"PRIx16" -> %"PRIx16"\n", 0x1337, res_u16);
+ printf("const %"PRIx16" -> %"PRIx16"\n", (uint16_t)0x1337, res_u16);
if (res_u16 != 0x3713)
return -1;
diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c
index 115bee966d..9a76bd299f 100644
--- a/app/test/test_cmdline.c
+++ b/app/test/test_cmdline.c
@@ -31,6 +31,7 @@ test_cmdline(void)
return -1;
if (test_parse_num_invalid_param() < 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
printf("Testing parsing IP addresses...\n");
if (test_parse_ipaddr_valid() < 0)
return -1;
@@ -38,6 +39,7 @@ test_cmdline(void)
return -1;
if (test_parse_ipaddr_invalid_param() < 0)
return -1;
+#endif
printf("Testing parsing strings...\n");
if (test_parse_string_valid() < 0)
return -1;
diff --git a/app/test/test_crc.c b/app/test/test_crc.c
index bf1d344359..0ed080e482 100644
--- a/app/test/test_crc.c
+++ b/app/test/test_crc.c
@@ -14,7 +14,6 @@
#define CRC32_VEC_LEN2 348
#define CRC16_VEC_LEN1 12
#define CRC16_VEC_LEN2 2
-#define LINE_LEN 75
/* CRC test vector */
static const uint8_t crc_vec[CRC_VEC_LEN] = {
diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c
index 5b6f05dbb1..da035348bd 100644
--- a/app/test/test_mp_secondary.c
+++ b/app/test/test_mp_secondary.c
@@ -14,7 +14,9 @@
#include <errno.h>
#include <string.h>
#include <unistd.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/wait.h>
+#endif
#include <libgen.h>
#include <dirent.h>
#include <limits.h>
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 3a248d512c..8698d24eac 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -298,6 +298,7 @@ reset_count(void)
idle = 0;
}
+#ifndef RTE_EXEC_ENV_WINDOWS
static void
stats_display(uint16_t port_id)
{
@@ -327,6 +328,7 @@ signal_handler(int signum)
if (signum == SIGUSR2)
stats_display(0);
}
+#endif
struct rte_mbuf **tx_burst;
@@ -638,7 +640,7 @@ exec_burst(uint32_t flags, int lcore)
i = (i >= conf->nb_ports - 1) ? 0 : (i + 1);
}
- sleep(5);
+ rte_delay_us(5 * US_PER_S);
/* only when polling second */
if (flags == SC_BURST_XMIT_FIRST)
@@ -669,8 +671,10 @@ test_pmd_perf(void)
printf("Start PMD RXTX cycles cost test.\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
signal(SIGUSR1, signal_handler);
signal(SIGUSR2, signal_handler);
+#endif
nb_ports = rte_eth_dev_count_avail();
if (nb_ports < NB_ETHPORTS_USED) {
diff --git a/app/test/test_ring_stress.c b/app/test/test_ring_stress.c
index 1af45e0fc8..ce3535c6b2 100644
--- a/app/test/test_ring_stress.c
+++ b/app/test/test_ring_stress.c
@@ -43,9 +43,10 @@ test_ring_stress(void)
n += test_ring_rts_stress.nb_case;
k += run_test(&test_ring_rts_stress);
+#ifndef RTE_EXEC_ENV_WINDOWS
n += test_ring_hts_stress.nb_case;
k += run_test(&test_ring_hts_stress);
-
+#endif
n += test_ring_mt_peek_stress.nb_case;
k += run_test(&test_ring_mt_peek_stress);
diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h
index f9ca63b908..62b1a69b90 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -359,7 +359,7 @@ test_mt1(int (*test)(void *))
wrk_cmd = WRK_CMD_RUN;
rte_smp_wmb();
- usleep(run_time * US_PER_S);
+ rte_delay_us(run_time* US_PER_S);
/* signal worker to start test */
wrk_cmd = WRK_CMD_STOP;
diff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c
index f34d691265..a0450337ea 100644
--- a/app/test/test_telemetry_data.c
+++ b/app/test/test_telemetry_data.c
@@ -4,7 +4,9 @@
#include <string.h>
#include <sys/socket.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/un.h>
+#endif
#include <unistd.h>
#include <limits.h>
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v1 06/13] app/test: exclude ENOTSUP as failure
2021-08-18 6:17 [dpdk-dev] [PATCH v1 00/13] app/test: enable subset of tests on Windows Jie Zhou
` (4 preceding siblings ...)
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 05/13] app/test: replace POSIX specific code Jie Zhou
@ 2021-08-18 6:17 ` Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 07/13] app/test: skip interrupt tests on Windows Jie Zhou
` (7 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 6:17 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Check rte_errno to exclude ENOTSUP as failures in test_memory.c
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_memory.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index 7d5ae99bab..6f4fc02c03 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -9,6 +9,7 @@
#include <rte_memory.h>
#include <rte_common.h>
#include <rte_memzone.h>
+#include <rte_errno.h>
#include "test.h"
@@ -53,7 +54,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
/* ENOTSUP means segment is valid, but there is not support for
* segment fd API (e.g. on FreeBSD).
*/
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
/* all other errors are treated as failures */
return -1;
@@ -62,7 +63,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
/* we're able to get memseg fd - try getting its offset */
ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
if (ret < 0) {
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
return -1;
}
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v1 07/13] app/test: skip interrupt tests on Windows
2021-08-18 6:17 [dpdk-dev] [PATCH v1 00/13] app/test: enable subset of tests on Windows Jie Zhou
` (5 preceding siblings ...)
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 06/13] app/test: exclude ENOTSUP as failure Jie Zhou
@ 2021-08-18 6:17 ` Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 08/13] app/test: temporarily "skip" one cmdline test case Jie Zhou
` (6 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 6:17 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Even though test_interrupts.c can compile on Windows, skip interrupt
tests for now since majority of eal_interrupt on Windows are stubs.
Will remove the skip after interrupt being fully enabled on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_interrupts.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
index 233b14a70b..ab52362e01 100644
--- a/app/test/test_interrupts.c
+++ b/app/test/test_interrupts.c
@@ -12,6 +12,15 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_interrupt(void)
+{
+ printf("Interrupt on Windows is not fully supported yet, skipping test\n");
+ return TEST_SKIPPED;
+}
+#else
+
#define TEST_INTERRUPT_CHECK_INTERVAL 100 /* ms */
/* predefined interrupt handle types */
@@ -558,5 +567,6 @@ test_interrupt(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v1 08/13] app/test: temporarily "skip" one cmdline test case
2021-08-18 6:17 [dpdk-dev] [PATCH v1 00/13] app/test: enable subset of tests on Windows Jie Zhou
` (6 preceding siblings ...)
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 07/13] app/test: skip interrupt tests on Windows Jie Zhou
@ 2021-08-18 6:17 ` Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 09/13] app/test: skip two logs_autotest cases on Windows Jie Zhou
` (5 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 6:17 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
From: Jie Zhou <jizh@microsoft.com>
cmdline tests pass except one failure at the test_cmdline_socket_fns
test case with error: failed to open /dev/null for reading!
Temporarily "skip" this case while enable all other passing cases.
Issue is tracked internally and will add the corresponding case on
Windows in future.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_cmdline_lib.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index 86a5b78d70..1ff5c0d7e6 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -140,6 +140,9 @@ test_cmdline_vt100_fns(void)
static int
test_cmdline_socket_fns(void)
{
+#ifdef RTE_EXEC_ENV_WINDOWS
+ return 0;
+#else
cmdline_parse_ctx_t ctx;
struct cmdline *cl;
@@ -179,6 +182,7 @@ test_cmdline_socket_fns(void)
printf("Error: function accepted null parameter!\n");
cmdline_free(cl);
return -1;
+#endif
}
static int
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v1 09/13] app/test: skip two logs_autotest cases on Windows
2021-08-18 6:17 [dpdk-dev] [PATCH v1 00/13] app/test: enable subset of tests on Windows Jie Zhou
` (7 preceding siblings ...)
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 08/13] app/test: temporarily "skip" one cmdline test case Jie Zhou
@ 2021-08-18 6:17 ` Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 10/13] app/test: differentiate a strerror on different OS Jie Zhou
` (4 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 6:17 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
From: Jie Zhou <jizh@microsoft.com>
DPDK logs_autotest on Windows failed at "dynamic log types" tests.
The failures are on 2 test cases for rte_log_set_level_regexp API,
due to regular expression is not supported on Windows in DPDK yet
and regcomp/regexec are just stubs on Windows (in regex.h).
In app\test\test_logs.c, ifndef these two test cases, and for the
rte_log_set_level_pattern validation case following these two cases,
differentiate the expected log level passed into macro CHECK_LEVELS
Now logs_autotest completes for all dynamic log types and static log types.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_logs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/test/test_logs.c b/app/test/test_logs.c
index 7abb6eeca2..7c001c1ab3 100644
--- a/app/test/test_logs.c
+++ b/app/test/test_logs.c
@@ -113,6 +113,7 @@ test_logs(void)
rte_log_set_level(logtype1, RTE_LOG_ERR);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#ifndef RTE_EXEC_ENV_WINDOWS
rte_log_set_level_regexp("type$", RTE_LOG_EMERG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
@@ -121,7 +122,10 @@ test_logs(void)
rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_EMERG, RTE_LOG_EMERG);
-
+#else
+ ret = rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
+ CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#endif
/* set logtype level low to so we can test global level */
rte_log_set_level_pattern("logtype*", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_DEBUG, RTE_LOG_DEBUG, RTE_LOG_DEBUG);
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v1 10/13] app/test: differentiate a strerror on different OS
2021-08-18 6:17 [dpdk-dev] [PATCH v1 00/13] app/test: enable subset of tests on Windows Jie Zhou
` (8 preceding siblings ...)
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 09/13] app/test: skip two logs_autotest cases on Windows Jie Zhou
@ 2021-08-18 6:17 ` Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 11/13] app/test: remove two alarm_autotest cases Jie Zhou
` (3 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 6:17 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
From: Jie Zhou <jizh@microsoft.com>
On Windows, strerror returns just "Unknown error" for errnum greater
than MAX_ERRNO, while linux and freebsd returns "Unknown error <num>",
which is the current expectation for errno_autotest. Differentiate
the error string on Windows. Otherwise, currently errno_autotest has
a "duplicate error code" failure.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_errno.c | 12 +++++++++++-
lib/eal/common/eal_common_errno.c | 4 ++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/app/test/test_errno.c b/app/test/test_errno.c
index 3ff0456a58..cca0518b37 100644
--- a/app/test/test_errno.c
+++ b/app/test/test_errno.c
@@ -18,13 +18,19 @@ test_errno(void)
{
const char *rte_retval;
const char *libc_retval;
+
+#ifndef RTE_EXEC_ENV_WINDOWS
#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD has a colon in the string, unlike linux */
const char unknown_code_result[] = "Unknown error: %d";
#else
const char unknown_code_result[] = "Unknown error %d";
+ char expected_libc_retval[sizeof(unknown_code_result) + 3];
+#endif
+#else
+ /* Windows doesn't return error number for error greater than MAX_errno*/
+ const char expected_libc_retval[] = "Unknown error";
#endif
- char expected_libc_retval[sizeof(unknown_code_result)+3];
/* use a small selection of standard errors for testing */
int std_errs[] = {EAGAIN, EBADF, EACCES, EINTR, EINVAL};
@@ -54,11 +60,13 @@ test_errno(void)
rte_retval, libc_retval);
if (strcmp(rte_retval, libc_retval) == 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
/* generate appropriate error string for unknown error number
* and then check that this is what we got back. If not, we have
* a duplicate error number that conflicts with errno.h */
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, rte_errs[i]);
+#endif
if ((strcmp(expected_libc_retval, libc_retval) != 0) &&
(strcmp("", libc_retval) != 0)){
printf("Error, duplicate error code %d\n", rte_errs[i]);
@@ -69,8 +77,10 @@ test_errno(void)
/* ensure that beyond RTE_MAX_ERRNO, we always get an unknown code */
rte_retval = rte_strerror(RTE_MAX_ERRNO + 1);
libc_retval = strerror(RTE_MAX_ERRNO + 1);
+#ifndef RTE_EXEC_ENV_WINDOWS
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, RTE_MAX_ERRNO + 1);
+#endif
printf("rte_strerror: '%s', strerror: '%s'\n",
rte_retval, libc_retval);
if ((strcmp(rte_retval, libc_retval) != 0) ||
diff --git a/lib/eal/common/eal_common_errno.c b/lib/eal/common/eal_common_errno.c
index f86802705a..4c4abb802e 100644
--- a/lib/eal/common/eal_common_errno.c
+++ b/lib/eal/common/eal_common_errno.c
@@ -37,7 +37,11 @@ rte_strerror(int errnum)
/* since some implementations of strerror_r throw an error
* themselves if errnum is too big, we handle that case here */
if (errnum >= RTE_MAX_ERRNO)
+#ifdef RTE_EXEC_ENV_WINDOWS
+ snprintf(ret, RETVAL_SZ, "Unknown error%s", sep);
+#else
snprintf(ret, RETVAL_SZ, "Unknown error%s %d", sep, errnum);
+#endif
else
switch (errnum){
case E_RTE_SECONDARY:
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v1 11/13] app/test: remove two alarm_autotest cases
2021-08-18 6:17 [dpdk-dev] [PATCH v1 00/13] app/test: enable subset of tests on Windows Jie Zhou
` (9 preceding siblings ...)
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 10/13] app/test: differentiate a strerror on different OS Jie Zhou
@ 2021-08-18 6:17 ` Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 12/13] app/test: replace .sh scripts with .py scripts Jie Zhou
` (2 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 6:17 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Remove two alarm_autotest test cases which do bogus range check
on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_alarm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_alarm.c b/app/test/test_alarm.c
index b4034339b8..70e97a3109 100644
--- a/app/test/test_alarm.c
+++ b/app/test/test_alarm.c
@@ -10,6 +10,7 @@
#include "test.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
static volatile int flag;
static void
@@ -18,6 +19,7 @@ test_alarm_callback(void *cb_arg)
flag = 1;
printf("Callback setting flag - OK. [cb_arg = %p]\n", cb_arg);
}
+#endif
static int
test_alarm(void)
@@ -27,6 +29,7 @@ test_alarm(void)
return 0;
#endif
+#ifndef RTE_EXEC_ENV_WINDOWS
/* check if it will fail to set alarm with wrong us value */
printf("check if it will fail to set alarm with wrong ms values\n");
if (rte_eal_alarm_set(0, test_alarm_callback,
@@ -39,6 +42,7 @@ test_alarm(void)
printf("should not be successful with (UINT64_MAX-1) us value\n");
return -1;
}
+#endif
/* check if it will fail to set alarm with null callback parameter */
printf("check if it will fail to set alarm with null callback parameter\n");
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v1 12/13] app/test: replace .sh scripts with .py scripts
2021-08-18 6:17 [dpdk-dev] [PATCH v1 00/13] app/test: enable subset of tests on Windows Jie Zhou
` (10 preceding siblings ...)
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 11/13] app/test: remove two alarm_autotest cases Jie Zhou
@ 2021-08-18 6:17 ` Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 13/13] app/test: enable subset of unit tests on Windows Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 00/13] app/test: enable subset of " Jie Zhou
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 6:17 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Add python scripts to get coremask and check hugepage config
- Remove two corresponding .sh scripts
- Replace calling of .sh with corresponding .py in meson.build
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/get-coremask.sh | 13 -------------
app/test/get_coremask.py | 8 ++++++++
app/test/has-hugepage.sh | 11 -----------
app/test/has_hugepage.py | 41 ++++++++++++++++++++++++++++++++++++++++
app/test/meson.build | 7 ++++---
5 files changed, 53 insertions(+), 27 deletions(-)
delete mode 100755 app/test/get-coremask.sh
create mode 100644 app/test/get_coremask.py
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
diff --git a/app/test/get-coremask.sh b/app/test/get-coremask.sh
deleted file mode 100755
index bb8cf404d2..0000000000
--- a/app/test/get-coremask.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#! /bin/sh -e
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2019 Intel Corporation
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /sys/devices/system/cpu/present
-elif [ "$(uname)" = "FreeBSD" ] ; then
- ncpus=$(/sbin/sysctl -n hw.ncpu)
- echo 0-$(expr $ncpus - 1)
-else
-# fallback
- echo 0-3
-fi
diff --git a/app/test/get_coremask.py b/app/test/get_coremask.py
new file mode 100644
index 0000000000..3d0947e8ff
--- /dev/null
+++ b/app/test/get_coremask.py
@@ -0,0 +1,8 @@
+#! /usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2021 Microsoft Corporation
+
+import multiprocessing
+
+c = multiprocessing.cpu_count()
+print("0-"+str(c-1))
diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh
deleted file mode 100755
index d600fad319..0000000000
--- a/app/test/has-hugepage.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright 2020 Mellanox Technologies, Ltd
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /proc/sys/vm/nr_hugepages || echo 0
-elif [ "$(uname)" = "FreeBSD" ] ; then
- echo 1 # assume FreeBSD always has hugepages
-else
- echo 0
-fi
diff --git a/app/test/has_hugepage.py b/app/test/has_hugepage.py
new file mode 100644
index 0000000000..decf47df45
--- /dev/null
+++ b/app/test/has_hugepage.py
@@ -0,0 +1,41 @@
+#! /usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2021 Microsoft Corporation
+
+import os
+import platform
+
+osName = platform.system()
+if osName == "Linux":
+ file_o=open("/proc/sys/vm/nr_hugepages")
+ content=file_o.read()
+ print(content)
+ file_o.close()
+elif osName == "FreeBSD":
+ # Assume FreeBSD always has hugepages enabled
+ print("1")
+elif osName == "Windows":
+ # On Windows, check if the Administrator has "Lock pages in memory" security setting
+ # to determine if large page is enabled or not
+
+ # Export the USER_RIGHTS security settings
+ # Use os.popen instead of os.system to suppress the output of secedit to stdout
+ userRightsfile = "userrights.inf"
+ os.popen('secedit /export /areas USER_RIGHTS /cfg "' + userRightsfile + '"')
+
+ # Parse the exported user rights setting to determine if Administrator
+ # SeLockMemoryPrivilege being set or not
+ largepageEnabledStr = 'SeLockMemoryPrivilege = Administrator'
+ enabled = 0
+ # On different OS versions tested, the exported inf file has utf-16 encoding
+ with open(userRightsfile, encoding = 'utf-16') as f:
+ urcontent = f.readlines()
+ for line in urcontent:
+ if largepageEnabledStr in line:
+ enabled = 1
+ break
+
+ f.close()
+ print(enabled)
+else:
+ print("0")
diff --git a/app/test/meson.build b/app/test/meson.build
index a7611686ad..7240304916 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -450,7 +450,7 @@ dpdk_test = executable('dpdk-test',
driver_install_path),
install: true)
-has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
+has_hugepage = run_command('has_hugepage.py').stdout().strip() != '0'
message('hugepage availability: @0@'.format(has_hugepage))
# some perf tests (eg: memcpy perf autotest)take very long
@@ -458,8 +458,9 @@ message('hugepage availability: @0@'.format(has_hugepage))
timeout_seconds = 600
timeout_seconds_fast = 10
-get_coremask = find_program('get-coremask.sh')
-num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip()
+list_of_cores = run_command('get_coremask.py').stdout().strip()
+message('list of cores: @0@'.format(list_of_cores))
+num_cores_arg = '-l ' + list_of_cores
default_test_args = [num_cores_arg]
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v1 13/13] app/test: enable subset of unit tests on Windows
2021-08-18 6:17 [dpdk-dev] [PATCH v1 00/13] app/test: enable subset of tests on Windows Jie Zhou
` (11 preceding siblings ...)
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 12/13] app/test: replace .sh scripts with .py scripts Jie Zhou
@ 2021-08-18 6:17 ` Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 00/13] app/test: enable subset of " Jie Zhou
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 6:17 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
In app/test/meson.build
- Specify the subset of source files to compile on Windows
- Specify the subset of tests to be enabled on Windows
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/meson.build | 859 ++++++++++++++++++++++++++-----------------
1 file changed, 515 insertions(+), 344 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index 7240304916..1e77657510 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,353 +1,524 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if is_windows
- build = false
- reason = 'not supported on Windows'
- subdir_done()
-endif
-
if not get_option('tests')
subdir_done()
endif
-test_sources = files(
- 'commands.c',
- 'packet_burst_generator.c',
- 'test.c',
- 'test_acl.c',
- 'test_alarm.c',
- 'test_atomic.c',
- 'test_barrier.c',
- 'test_bitops.c',
- 'test_bitmap.c',
- 'test_bpf.c',
- 'test_byteorder.c',
- 'test_cksum.c',
- 'test_cmdline.c',
- 'test_cmdline_cirbuf.c',
- 'test_cmdline_etheraddr.c',
- 'test_cmdline_ipaddr.c',
- 'test_cmdline_lib.c',
- 'test_cmdline_num.c',
- 'test_cmdline_portlist.c',
- 'test_cmdline_string.c',
- 'test_common.c',
- 'test_cpuflags.c',
- 'test_crc.c',
- 'test_cryptodev.c',
- 'test_cryptodev_asym.c',
- 'test_cryptodev_blockcipher.c',
- 'test_cryptodev_security_pdcp.c',
- 'test_cycles.c',
- 'test_debug.c',
- 'test_distributor.c',
- 'test_distributor_perf.c',
- 'test_eal_flags.c',
- 'test_eal_fs.c',
- 'test_efd.c',
- 'test_efd_perf.c',
- 'test_errno.c',
- 'test_ethdev_link.c',
- 'test_event_crypto_adapter.c',
- 'test_event_eth_rx_adapter.c',
- 'test_event_ring.c',
- 'test_event_timer_adapter.c',
- 'test_eventdev.c',
- 'test_external_mem.c',
- 'test_fbarray.c',
- 'test_fib.c',
- 'test_fib_perf.c',
- 'test_fib6.c',
- 'test_fib6_perf.c',
- 'test_func_reentrancy.c',
- 'test_flow_classify.c',
- 'test_graph.c',
- 'test_graph_perf.c',
- 'test_hash.c',
- 'test_hash_functions.c',
- 'test_hash_multiwriter.c',
- 'test_hash_readwrite.c',
- 'test_hash_perf.c',
- 'test_hash_readwrite_lf_perf.c',
- 'test_interrupts.c',
- 'test_ipfrag.c',
- 'test_ipsec.c',
- 'test_ipsec_sad.c',
- 'test_ipsec_perf.c',
- 'test_kni.c',
- 'test_kvargs.c',
- 'test_lcores.c',
- 'test_logs.c',
- 'test_lpm.c',
- 'test_lpm6.c',
- 'test_lpm6_perf.c',
- 'test_lpm_perf.c',
- 'test_malloc.c',
- 'test_mbuf.c',
- 'test_member.c',
- 'test_member_perf.c',
- 'test_memcpy.c',
- 'test_memcpy_perf.c',
- 'test_memory.c',
- 'test_mempool.c',
- 'test_mempool_perf.c',
- 'test_memzone.c',
- 'test_meter.c',
- 'test_metrics.c',
- 'test_mcslock.c',
- 'test_mp_secondary.c',
- 'test_per_lcore.c',
- 'test_pflock.c',
- 'test_pmd_perf.c',
- 'test_power.c',
- 'test_power_cpufreq.c',
- 'test_power_kvm_vm.c',
- 'test_prefetch.c',
- 'test_rand_perf.c',
- 'test_rawdev.c',
- 'test_rcu_qsbr.c',
- 'test_rcu_qsbr_perf.c',
- 'test_reciprocal_division.c',
- 'test_reciprocal_division_perf.c',
- 'test_red.c',
- 'test_reorder.c',
- 'test_rib.c',
- 'test_rib6.c',
- 'test_ring.c',
- 'test_ring_mpmc_stress.c',
- 'test_ring_hts_stress.c',
- 'test_ring_mt_peek_stress.c',
- 'test_ring_mt_peek_stress_zc.c',
- 'test_ring_perf.c',
- 'test_ring_rts_stress.c',
- 'test_ring_st_peek_stress.c',
- 'test_ring_st_peek_stress_zc.c',
- 'test_ring_stress.c',
- 'test_rwlock.c',
- 'test_sched.c',
- 'test_security.c',
- 'test_service_cores.c',
- 'test_spinlock.c',
- 'test_stack.c',
- 'test_stack_perf.c',
- 'test_string_fns.c',
- 'test_table.c',
- 'test_table_acl.c',
- 'test_table_combined.c',
- 'test_table_pipeline.c',
- 'test_table_ports.c',
- 'test_table_tables.c',
- 'test_tailq.c',
- 'test_thash.c',
- 'test_timer.c',
- 'test_timer_perf.c',
- 'test_timer_racecond.c',
- 'test_timer_secondary.c',
- 'test_ticketlock.c',
- 'test_trace.c',
- 'test_trace_register.c',
- 'test_trace_perf.c',
- 'test_version.c',
- 'virtual_pmd.c',
-)
-
-test_deps = [
- 'acl',
- 'bus_pci',
- 'bus_vdev',
- 'bitratestats',
- 'bpf',
- 'cfgfile',
- 'cmdline',
- 'cryptodev',
- 'distributor',
- 'efd',
- 'ethdev',
- 'eventdev',
- 'fib',
- 'flow_classify',
- 'graph',
- 'hash',
- 'ipsec',
- 'latencystats',
- 'lpm',
- 'member',
- 'metrics',
- 'node',
- 'pipeline',
- 'port',
- 'rawdev',
- 'rcu',
- 'reorder',
- 'rib',
- 'ring',
- 'security',
- 'stack',
- 'telemetry',
- 'timer',
-]
-
-# Each test is marked with flag true/false
-# to indicate whether it can run in no-huge mode.
-fast_tests = [
- ['acl_autotest', true],
- ['atomic_autotest', false],
- ['bitops_autotest', true],
- ['byteorder_autotest', true],
- ['cksum_autotest', true],
- ['cmdline_autotest', true],
- ['common_autotest', true],
- ['cpuflags_autotest', true],
- ['debug_autotest', true],
- ['eal_flags_c_opt_autotest', false],
- ['eal_flags_main_opt_autotest', false],
- ['eal_flags_n_opt_autotest', false],
- ['eal_flags_hpet_autotest', false],
- ['eal_flags_no_huge_autotest', false],
- ['eal_flags_a_opt_autotest', false],
- ['eal_flags_b_opt_autotest', false],
- ['eal_flags_vdev_opt_autotest', false],
- ['eal_flags_r_opt_autotest', false],
- ['eal_flags_mem_autotest', false],
- ['eal_flags_file_prefix_autotest', false],
- ['eal_flags_misc_autotest', false],
- ['eal_fs_autotest', true],
- ['errno_autotest', true],
- ['ethdev_link_status', true],
- ['event_ring_autotest', true],
- ['fib_autotest', true],
- ['fib6_autotest', true],
- ['func_reentrancy_autotest', false],
- ['flow_classify_autotest', false],
- ['hash_autotest', true],
- ['interrupt_autotest', true],
- ['ipfrag_autotest', false],
- ['lcores_autotest', true],
- ['logs_autotest', true],
- ['lpm_autotest', true],
- ['lpm6_autotest', true],
- ['malloc_autotest', false],
- ['mbuf_autotest', false],
- ['mcslock_autotest', false],
- ['memcpy_autotest', true],
- ['memory_autotest', false],
- ['mempool_autotest', false],
- ['memzone_autotest', false],
- ['meter_autotest', true],
- ['multiprocess_autotest', false],
- ['per_lcore_autotest', true],
- ['pflock_autotest', true],
- ['prefetch_autotest', true],
- ['rcu_qsbr_autotest', true],
- ['red_autotest', true],
- ['rib_autotest', true],
- ['rib6_autotest', true],
- ['ring_autotest', true],
- ['rwlock_test1_autotest', true],
- ['rwlock_rda_autotest', true],
- ['rwlock_rds_wrm_autotest', true],
- ['rwlock_rde_wro_autotest', true],
- ['sched_autotest', true],
- ['security_autotest', false],
- ['spinlock_autotest', true],
- ['stack_autotest', false],
- ['stack_lf_autotest', false],
- ['string_autotest', true],
- ['table_autotest', true],
- ['tailq_autotest', true],
- ['ticketlock_autotest', true],
- ['timer_autotest', false],
- ['user_delay_us', true],
- ['version_autotest', true],
- ['crc_autotest', true],
- ['distributor_autotest', false],
- ['eventdev_common_autotest', true],
- ['fbarray_autotest', true],
- ['hash_readwrite_func_autotest', false],
- ['ipsec_autotest', true],
- ['kni_autotest', false],
- ['kvargs_autotest', true],
- ['member_autotest', true],
- ['metrics_autotest', true],
- ['power_cpufreq_autotest', false],
- ['power_autotest', true],
- ['power_kvm_vm_autotest', false],
- ['reorder_autotest', true],
- ['service_autotest', true],
- ['thash_autotest', true],
- ['trace_autotest', true],
-]
-
-perf_test_names = [
- 'ring_perf_autotest',
- 'mempool_perf_autotest',
- 'memcpy_perf_autotest',
- 'hash_perf_autotest',
- 'timer_perf_autotest',
- 'reciprocal_division',
- 'reciprocal_division_perf',
- 'lpm_perf_autotest',
- 'rib_slow_autotest',
- 'fib_slow_autotest',
- 'fib_perf_autotest',
- 'red_all',
- 'barrier_autotest',
- 'hash_multiwriter_autotest',
- 'timer_racecond_autotest',
- 'efd_autotest',
- 'hash_functions_autotest',
- 'member_perf_autotest',
- 'efd_perf_autotest',
- 'lpm6_perf_autotest',
- 'rib6_slow_autotest',
- 'fib6_slow_autotest',
- 'fib6_perf_autotest',
- 'rcu_qsbr_perf_autotest',
- 'red_perf',
- 'distributor_perf_autotest',
- 'pmd_perf_autotest',
- 'stack_perf_autotest',
- 'stack_lf_perf_autotest',
- 'rand_perf_autotest',
- 'hash_readwrite_perf_autotest',
- 'hash_readwrite_lf_perf_autotest',
- 'trace_perf_autotest',
- 'ipsec_perf_autotest',
-]
-
-driver_test_names = [
- 'cryptodev_aesni_mb_autotest',
- 'cryptodev_aesni_gcm_autotest',
- 'cryptodev_cn9k_autotest',
- 'cryptodev_cn10k_autotest',
- 'cryptodev_dpaa_sec_autotest',
- 'cryptodev_dpaa2_sec_autotest',
- 'cryptodev_null_autotest',
- 'cryptodev_octeontx2_autotest',
- 'cryptodev_openssl_autotest',
- 'cryptodev_openssl_asym_autotest',
- 'cryptodev_qat_autotest',
- 'cryptodev_sw_armv8_autotest',
- 'cryptodev_sw_kasumi_autotest',
- 'cryptodev_sw_mvsam_autotest',
- 'cryptodev_sw_snow3g_autotest',
- 'cryptodev_sw_zuc_autotest',
- 'eventdev_selftest_octeontx',
- 'eventdev_selftest_sw',
- 'rawdev_autotest',
-]
-
-dump_test_names = [
- 'dump_struct_sizes',
- 'dump_mempool',
- 'dump_malloc_stats',
- 'dump_devargs',
- 'dump_log_types',
- 'dump_ring',
- 'dump_physmem',
- 'dump_memzone',
-]
+if is_windows
+ test_sources = files('commands.c',
+ 'packet_burst_generator.c',
+ 'test.c',
+ 'test_alarm.c',
+ 'test_atomic.c',
+ 'test_barrier.c',
+ 'test_bitops.c',
+ 'test_bitmap.c',
+ 'test_byteorder.c',
+ 'test_cmdline.c',
+ 'test_cmdline_cirbuf.c',
+ 'test_cmdline_etheraddr.c',
+ 'test_cmdline_lib.c',
+ 'test_cmdline_num.c',
+ 'test_cmdline_portlist.c',
+ 'test_cmdline_string.c',
+ 'test_common.c',
+ 'test_cpuflags.c',
+ 'test_crc.c',
+ 'test_cycles.c',
+ 'test_errno.c',
+ 'test_ethdev_link.c',
+ 'test_fbarray.c',
+ 'test_func_reentrancy.c',
+ 'test_hash.c',
+ 'test_hash_functions.c',
+ 'test_hash_multiwriter.c',
+ 'test_hash_readwrite.c',
+ 'test_hash_readwrite_lf_perf.c',
+ 'test_interrupts.c',
+ 'test_kvargs.c',
+ 'test_logs.c',
+ 'test_lpm.c',
+ 'test_memcpy.c',
+ 'test_memory.c',
+ 'test_mempool.c',
+ 'test_mempool_perf.c',
+ 'test_memzone.c',
+ 'test_meter.c',
+ 'test_metrics.c',
+ 'test_mcslock.c',
+ 'test_per_lcore.c',
+ 'test_pmd_perf.c',
+ 'test_power.c',
+ 'test_power_cpufreq.c',
+ 'test_power_kvm_vm.c',
+ 'test_prefetch.c',
+ 'test_rand_perf.c',
+ 'test_rcu_qsbr.c',
+ 'test_rcu_qsbr_perf.c',
+ 'test_reorder.c',
+ 'test_rib.c',
+ 'test_rib6.c',
+ 'test_ring.c',
+ 'test_ring_mpmc_stress.c',
+ 'test_ring_mt_peek_stress.c',
+ 'test_ring_mt_peek_stress_zc.c',
+ 'test_ring_perf.c',
+ 'test_ring_rts_stress.c',
+ 'test_ring_st_peek_stress.c',
+ 'test_ring_st_peek_stress_zc.c',
+ 'test_ring_stress.c',
+ 'test_rwlock.c',
+ 'test_service_cores.c',
+ 'test_spinlock.c',
+ 'test_stack.c',
+ 'test_stack_perf.c',
+ 'test_string_fns.c',
+ 'test_tailq.c',
+ 'test_thash.c',
+ 'test_timer.c',
+ 'test_timer_perf.c',
+ 'test_timer_racecond.c',
+ 'test_ticketlock.c',
+ 'test_trace_register.c',
+ 'test_trace_perf.c',
+ 'test_version.c',
+ 'virtual_pmd.c'
+ )
+
+ test_deps = [
+ 'bus_pci',
+ 'bus_vdev',
+ 'bitratestats',
+ 'cfgfile',
+ 'cmdline',
+ 'efd',
+ 'ethdev',
+ 'hash',
+ 'latencystats',
+ 'lpm',
+ 'metrics',
+ 'rcu',
+ 'reorder',
+ 'rib',
+ 'ring',
+ 'stack',
+ 'telemetry',
+ 'timer',
+ ]
+
+ # Each test is marked with flag true/false
+ # to indicate whether it can run in no-huge mode.
+ fast_tests = [
+ ['alarm_autotest', true],
+ ['bitops_autotest', true],
+ ['byteorder_autotest', true],
+ ['cmdline_autotest', true],
+ ['common_autotest', true],
+ ['cpuflags_autotest', true],
+ ['errno_autotest', true],
+ ['ethdev_link_status', true],
+ ['hash_autotest', true],
+ ['interrupt_autotest', true],
+ ['logs_autotest', true],
+ ['lpm_autotest', true],
+ ['mcslock_autotest', false],
+ ['memory_autotest', false],
+ ['mempool_autotest', false],
+ ['memzone_autotest', false],
+ ['meter_autotest', true],
+ ['per_lcore_autotest', true],
+ ['prefetch_autotest', true],
+ ['rcu_qsbr_autotest', true],
+ ['rib_autotest', true],
+ ['rib6_autotest', true],
+ ['ring_autotest', true],
+ ['rwlock_test1_autotest', true],
+ ['rwlock_rda_autotest', true],
+ ['rwlock_rds_wrm_autotest', true],
+ ['rwlock_rde_wro_autotest', true],
+ ['spinlock_autotest', true],
+ ['stack_autotest', false],
+ ['stack_lf_autotest', false],
+ ['string_autotest', true],
+ ['tailq_autotest', true],
+ ['ticketlock_autotest', true],
+ ['user_delay_us', true],
+ ['version_autotest', true],
+ ['crc_autotest', true],
+ ['fbarray_autotest', true],
+ ['hash_readwrite_func_autotest', false],
+ ['kvargs_autotest', true],
+ ['metrics_autotest', true],
+ ['reorder_autotest', true],
+ ['service_autotest', true],
+ ['thash_autotest', true],
+ ]
+
+ perf_test_names = [
+ 'atomic_autotest',
+ 'memcpy_autotest',
+ 'ring_perf_autotest',
+ 'timer_autotest',
+ 'timer_perf_autotest',
+ 'rib_slow_autotest',
+ 'barrier_autotest',
+ 'hash_multiwriter_autotest',
+ 'timer_racecond_autotest',
+ 'hash_functions_autotest',
+ 'pmd_perf_autotest',
+ 'stack_perf_autotest',
+ 'stack_lf_perf_autotest',
+ 'rand_perf_autotest',
+ 'hash_readwrite_perf_autotest',
+ 'hash_readwrite_lf_perf_autotest',
+ 'trace_perf_autotest',
+ ]
+
+ driver_test_names = [
+ ]
+
+ dump_test_names = [
+ ]
+else
+ test_sources = files(
+ 'commands.c',
+ 'packet_burst_generator.c',
+ 'test.c',
+ 'test_acl.c',
+ 'test_alarm.c',
+ 'test_atomic.c',
+ 'test_barrier.c',
+ 'test_bitops.c',
+ 'test_bitmap.c',
+ 'test_bpf.c',
+ 'test_byteorder.c',
+ 'test_cksum.c',
+ 'test_cmdline.c',
+ 'test_cmdline_cirbuf.c',
+ 'test_cmdline_etheraddr.c',
+ 'test_cmdline_ipaddr.c',
+ 'test_cmdline_lib.c',
+ 'test_cmdline_num.c',
+ 'test_cmdline_portlist.c',
+ 'test_cmdline_string.c',
+ 'test_common.c',
+ 'test_cpuflags.c',
+ 'test_crc.c',
+ 'test_cryptodev.c',
+ 'test_cryptodev_asym.c',
+ 'test_cryptodev_blockcipher.c',
+ 'test_cryptodev_security_pdcp.c',
+ 'test_cycles.c',
+ 'test_debug.c',
+ 'test_distributor.c',
+ 'test_distributor_perf.c',
+ 'test_eal_flags.c',
+ 'test_eal_fs.c',
+ 'test_efd.c',
+ 'test_efd_perf.c',
+ 'test_errno.c',
+ 'test_ethdev_link.c',
+ 'test_event_crypto_adapter.c',
+ 'test_event_eth_rx_adapter.c',
+ 'test_event_ring.c',
+ 'test_event_timer_adapter.c',
+ 'test_eventdev.c',
+ 'test_external_mem.c',
+ 'test_fbarray.c',
+ 'test_fib.c',
+ 'test_fib_perf.c',
+ 'test_fib6.c',
+ 'test_fib6_perf.c',
+ 'test_func_reentrancy.c',
+ 'test_flow_classify.c',
+ 'test_graph.c',
+ 'test_graph_perf.c',
+ 'test_hash.c',
+ 'test_hash_functions.c',
+ 'test_hash_multiwriter.c',
+ 'test_hash_readwrite.c',
+ 'test_hash_perf.c',
+ 'test_hash_readwrite_lf_perf.c',
+ 'test_interrupts.c',
+ 'test_ipfrag.c',
+ 'test_ipsec.c',
+ 'test_ipsec_sad.c',
+ 'test_ipsec_perf.c',
+ 'test_kni.c',
+ 'test_kvargs.c',
+ 'test_lcores.c',
+ 'test_logs.c',
+ 'test_lpm.c',
+ 'test_lpm6.c',
+ 'test_lpm6_perf.c',
+ 'test_lpm_perf.c',
+ 'test_malloc.c',
+ 'test_mbuf.c',
+ 'test_member.c',
+ 'test_member_perf.c',
+ 'test_memcpy.c',
+ 'test_memcpy_perf.c',
+ 'test_memory.c',
+ 'test_mempool.c',
+ 'test_mempool_perf.c',
+ 'test_memzone.c',
+ 'test_meter.c',
+ 'test_metrics.c',
+ 'test_mcslock.c',
+ 'test_mp_secondary.c',
+ 'test_per_lcore.c',
+ 'test_pflock.c',
+ 'test_pmd_perf.c',
+ 'test_power.c',
+ 'test_power_cpufreq.c',
+ 'test_power_kvm_vm.c',
+ 'test_prefetch.c',
+ 'test_rand_perf.c',
+ 'test_rawdev.c',
+ 'test_rcu_qsbr.c',
+ 'test_rcu_qsbr_perf.c',
+ 'test_reciprocal_division.c',
+ 'test_reciprocal_division_perf.c',
+ 'test_red.c',
+ 'test_reorder.c',
+ 'test_rib.c',
+ 'test_rib6.c',
+ 'test_ring.c',
+ 'test_ring_mpmc_stress.c',
+ 'test_ring_hts_stress.c',
+ 'test_ring_mt_peek_stress.c',
+ 'test_ring_mt_peek_stress_zc.c',
+ 'test_ring_perf.c',
+ 'test_ring_rts_stress.c',
+ 'test_ring_st_peek_stress.c',
+ 'test_ring_st_peek_stress_zc.c',
+ 'test_ring_stress.c',
+ 'test_rwlock.c',
+ 'test_sched.c',
+ 'test_security.c',
+ 'test_service_cores.c',
+ 'test_spinlock.c',
+ 'test_stack.c',
+ 'test_stack_perf.c',
+ 'test_string_fns.c',
+ 'test_table.c',
+ 'test_table_acl.c',
+ 'test_table_combined.c',
+ 'test_table_pipeline.c',
+ 'test_table_ports.c',
+ 'test_table_tables.c',
+ 'test_tailq.c',
+ 'test_thash.c',
+ 'test_timer.c',
+ 'test_timer_perf.c',
+ 'test_timer_racecond.c',
+ 'test_timer_secondary.c',
+ 'test_ticketlock.c',
+ 'test_trace.c',
+ 'test_trace_register.c',
+ 'test_trace_perf.c',
+ 'test_version.c',
+ 'virtual_pmd.c',
+ )
+
+ test_deps = [
+ 'acl',
+ 'bus_pci',
+ 'bus_vdev',
+ 'bitratestats',
+ 'bpf',
+ 'cfgfile',
+ 'cmdline',
+ 'cryptodev',
+ 'distributor',
+ 'efd',
+ 'ethdev',
+ 'eventdev',
+ 'fib',
+ 'flow_classify',
+ 'graph',
+ 'hash',
+ 'ipsec',
+ 'latencystats',
+ 'lpm',
+ 'member',
+ 'metrics',
+ 'node',
+ 'pipeline',
+ 'port',
+ 'rawdev',
+ 'rcu',
+ 'reorder',
+ 'rib',
+ 'ring',
+ 'security',
+ 'stack',
+ 'telemetry',
+ 'timer',
+ ]
+
+ # Each test is marked with flag true/false
+ # to indicate whether it can run in no-huge mode.
+ fast_tests = [
+ ['acl_autotest', true],
+ ['atomic_autotest', false],
+ ['bitops_autotest', true],
+ ['byteorder_autotest', true],
+ ['cksum_autotest', true],
+ ['cmdline_autotest', true],
+ ['common_autotest', true],
+ ['cpuflags_autotest', true],
+ ['debug_autotest', true],
+ ['eal_flags_c_opt_autotest', false],
+ ['eal_flags_main_opt_autotest', false],
+ ['eal_flags_n_opt_autotest', false],
+ ['eal_flags_hpet_autotest', false],
+ ['eal_flags_no_huge_autotest', false],
+ ['eal_flags_a_opt_autotest', false],
+ ['eal_flags_b_opt_autotest', false],
+ ['eal_flags_vdev_opt_autotest', false],
+ ['eal_flags_r_opt_autotest', false],
+ ['eal_flags_mem_autotest', false],
+ ['eal_flags_file_prefix_autotest', false],
+ ['eal_flags_misc_autotest', false],
+ ['eal_fs_autotest', true],
+ ['errno_autotest', true],
+ ['ethdev_link_status', true],
+ ['event_ring_autotest', true],
+ ['fib_autotest', true],
+ ['fib6_autotest', true],
+ ['func_reentrancy_autotest', false],
+ ['flow_classify_autotest', false],
+ ['hash_autotest', true],
+ ['interrupt_autotest', true],
+ ['ipfrag_autotest', false],
+ ['lcores_autotest', true],
+ ['logs_autotest', true],
+ ['lpm_autotest', true],
+ ['lpm6_autotest', true],
+ ['malloc_autotest', false],
+ ['mbuf_autotest', false],
+ ['mcslock_autotest', false],
+ ['memcpy_autotest', true],
+ ['memory_autotest', false],
+ ['mempool_autotest', false],
+ ['memzone_autotest', false],
+ ['meter_autotest', true],
+ ['multiprocess_autotest', false],
+ ['per_lcore_autotest', true],
+ ['pflock_autotest', true],
+ ['prefetch_autotest', true],
+ ['rcu_qsbr_autotest', true],
+ ['red_autotest', true],
+ ['rib_autotest', true],
+ ['rib6_autotest', true],
+ ['ring_autotest', true],
+ ['rwlock_test1_autotest', true],
+ ['rwlock_rda_autotest', true],
+ ['rwlock_rds_wrm_autotest', true],
+ ['rwlock_rde_wro_autotest', true],
+ ['sched_autotest', true],
+ ['security_autotest', false],
+ ['spinlock_autotest', true],
+ ['stack_autotest', false],
+ ['stack_lf_autotest', false],
+ ['string_autotest', true],
+ ['table_autotest', true],
+ ['tailq_autotest', true],
+ ['ticketlock_autotest', true],
+ ['timer_autotest', false],
+ ['user_delay_us', true],
+ ['version_autotest', true],
+ ['crc_autotest', true],
+ ['distributor_autotest', false],
+ ['eventdev_common_autotest', true],
+ ['fbarray_autotest', true],
+ ['hash_readwrite_func_autotest', false],
+ ['ipsec_autotest', true],
+ ['kni_autotest', false],
+ ['kvargs_autotest', true],
+ ['member_autotest', true],
+ ['metrics_autotest', true],
+ ['power_cpufreq_autotest', false],
+ ['power_autotest', true],
+ ['power_kvm_vm_autotest', false],
+ ['reorder_autotest', true],
+ ['service_autotest', true],
+ ['thash_autotest', true],
+ ['trace_autotest', true],
+ ]
+
+ perf_test_names = [
+ 'ring_perf_autotest',
+ 'mempool_perf_autotest',
+ 'memcpy_perf_autotest',
+ 'hash_perf_autotest',
+ 'timer_perf_autotest',
+ 'reciprocal_division',
+ 'reciprocal_division_perf',
+ 'lpm_perf_autotest',
+ 'rib_slow_autotest',
+ 'fib_slow_autotest',
+ 'fib_perf_autotest',
+ 'red_all',
+ 'barrier_autotest',
+ 'hash_multiwriter_autotest',
+ 'timer_racecond_autotest',
+ 'efd_autotest',
+ 'hash_functions_autotest',
+ 'member_perf_autotest',
+ 'efd_perf_autotest',
+ 'lpm6_perf_autotest',
+ 'rib6_slow_autotest',
+ 'fib6_slow_autotest',
+ 'fib6_perf_autotest',
+ 'rcu_qsbr_perf_autotest',
+ 'red_perf',
+ 'distributor_perf_autotest',
+ 'pmd_perf_autotest',
+ 'stack_perf_autotest',
+ 'stack_lf_perf_autotest',
+ 'rand_perf_autotest',
+ 'hash_readwrite_perf_autotest',
+ 'hash_readwrite_lf_perf_autotest',
+ 'trace_perf_autotest',
+ 'ipsec_perf_autotest',
+ ]
+
+ driver_test_names = [
+ 'cryptodev_aesni_mb_autotest',
+ 'cryptodev_aesni_gcm_autotest',
+ 'cryptodev_cn9k_autotest',
+ 'cryptodev_cn10k_autotest',
+ 'cryptodev_dpaa_sec_autotest',
+ 'cryptodev_dpaa2_sec_autotest',
+ 'cryptodev_null_autotest',
+ 'cryptodev_octeontx2_autotest',
+ 'cryptodev_openssl_autotest',
+ 'cryptodev_openssl_asym_autotest',
+ 'cryptodev_qat_autotest',
+ 'cryptodev_sw_armv8_autotest',
+ 'cryptodev_sw_kasumi_autotest',
+ 'cryptodev_sw_mvsam_autotest',
+ 'cryptodev_sw_snow3g_autotest',
+ 'cryptodev_sw_zuc_autotest',
+ 'eventdev_selftest_octeontx',
+ 'eventdev_selftest_sw',
+ 'rawdev_autotest',
+ ]
+
+ dump_test_names = [
+ 'dump_struct_sizes',
+ 'dump_mempool',
+ 'dump_malloc_stats',
+ 'dump_devargs',
+ 'dump_log_types',
+ 'dump_ring',
+ 'dump_physmem',
+ 'dump_memzone',
+ ]
+endif
# The following linkages are an exception to allow running the
# unit tests without requiring that the developer install the
@@ -362,7 +533,7 @@ endif
if dpdk_conf.has('RTE_EVENT_SKELETON')
test_deps += 'event_skeleton'
endif
-if dpdk_conf.has('RTE_LIB_TELEMETRY')
+if not(is_windows) and dpdk_conf.has('RTE_LIB_TELEMETRY')
test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
endif
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v2 00/13] app/test: enable subset of tests on Windows
2021-08-18 6:17 [dpdk-dev] [PATCH v1 00/13] app/test: enable subset of tests on Windows Jie Zhou
` (12 preceding siblings ...)
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 13/13] app/test: enable subset of unit tests on Windows Jie Zhou
@ 2021-08-18 17:13 ` Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 01/13] lib: build libraries that some tests depend on Jie Zhou
` (13 more replies)
13 siblings, 14 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 17:13 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
This patchset is to enable a subset of unit tests on windows. It mainly includes:
- Enable building libraries on Windows that some tests depend on
- Replace POSIX specific codes
- Fix some lib and tests per failures investigation
- Replace .sh scripts with .py scripts for meson.build
- Enable build and run subset of unit tests on Windows
Future work:
- Continue investigate known failure to enable more tests
- Work with CI/CD lab to onboard unit tests on Windows to capture regression
---
V2 changes:
- Fix compilation error on FreeBSD
- Fix email mismatch issue
- Add a missing space around "*"
---
Following are the unit tests on Windows baseline state:
(lab setup: a system with XL710, NetUIO and Virt2Phy installed, huge-page enabled)
c:\DPDKUpstream\dpdk\amd64\chk>meson test
ninja: Entering directory `c:\DPDKUpstream\dpdk\amd64\chk'
ninja: no work to do.
1/60 DPDK:fast-tests / alarm_autotest OK 1.62s
2/60 DPDK:fast-tests / bitops_autotest OK 1.58s
3/60 DPDK:fast-tests / byteorder_autotest OK 1.58s
4/60 DPDK:fast-tests / cmdline_autotest OK 1.58s
5/60 DPDK:fast-tests / common_autotest OK 3.77s
6/60 DPDK:fast-tests / cpuflags_autotest OK 1.58s
7/60 DPDK:fast-tests / errno_autotest OK 1.59s
8/60 DPDK:fast-tests / ethdev_link_status OK 1.58s
9/60 DPDK:fast-tests / hash_autotest OK 2.26s
10/60 DPDK:fast-tests / interrupt_autotest SKIP 1.59s exit status 77
11/60 DPDK:fast-tests / logs_autotest OK 1.58s
12/60 DPDK:fast-tests / lpm_autotest OK 3.78s
13/60 DPDK:fast-tests / mcslock_autotest OK 7.37s
14/60 DPDK:fast-tests / memory_autotest OK 1.62s
15/60 DPDK:fast-tests / mempool_autotest OK 2.23s
16/60 DPDK:fast-tests / memzone_autotest OK 1.62s
17/60 DPDK:fast-tests / meter_autotest OK 1.58s
18/60 DPDK:fast-tests / per_lcore_autotest OK 1.69s
19/60 DPDK:fast-tests / prefetch_autotest OK 1.58s
20/60 DPDK:fast-tests / rcu_qsbr_autotest OK 1.93s
21/60 DPDK:fast-tests / rib_autotest OK 6.97s
22/60 DPDK:fast-tests / rib6_autotest OK 6.98s
23/60 DPDK:fast-tests / ring_autotest OK 1.64s
24/60 DPDK:fast-tests / rwlock_test1_autotest OK 3.68s
25/60 DPDK:fast-tests / rwlock_rda_autotest OK 6.58s
26/60 DPDK:fast-tests / rwlock_rds_wrm_autotest OK 6.65s
27/60 DPDK:fast-tests / rwlock_rde_wro_autotest OK 6.59s
28/60 DPDK:fast-tests / spinlock_autotest OK 1.82s
29/60 DPDK:fast-tests / stack_autotest OK 3.56s
30/60 DPDK:fast-tests / stack_lf_autotest OK 5.84s
31/60 DPDK:fast-tests / string_autotest OK 1.59s
32/60 DPDK:fast-tests / tailq_autotest OK 1.58s
33/60 DPDK:fast-tests / ticketlock_autotest OK 1.84s
34/60 DPDK:fast-tests / user_delay_us OK 1.58s
35/60 DPDK:fast-tests / version_autotest OK 1.59s
36/60 DPDK:fast-tests / crc_autotest OK 1.58s
37/60 DPDK:fast-tests / fbarray_autotest OK 1.58s
38/60 DPDK:fast-tests / hash_readwrite_func_autotest OK 4.01s
39/60 DPDK:fast-tests / kvargs_autotest OK 1.58s
40/60 DPDK:fast-tests / metrics_autotest OK 1.58s
41/60 DPDK:fast-tests / reorder_autotest OK 1.62s
42/60 DPDK:fast-tests / service_autotest OK 5.20s
43/60 DPDK:fast-tests / thash_autotest OK 1.58s
44/60 DPDK:perf-tests / atomic_autotest OK 35.04s
45/60 DPDK:perf-tests / memcpy_autotest OK 11.36s
46/60 DPDK:perf-tests / ring_perf_autotest OK 29.48s
47/60 DPDK:perf-tests / timer_autotest OK 13.02s
48/60 DPDK:perf-tests / timer_perf_autotest OK 13.81s
49/60 DPDK:perf-tests / rib_slow_autotest OK 135.43s
50/60 DPDK:perf-tests / barrier_autotest OK 66.77s
51/60 DPDK:perf-tests / hash_multiwriter_autotest OK 8.16s
52/60 DPDK:perf-tests / timer_racecond_autotest OK 5.62s
53/60 DPDK:perf-tests / hash_functions_autotest OK 37.22s
54/60 DPDK:perf-tests / pmd_perf_autotest OK 27.82s
55/60 DPDK:perf-tests / stack_perf_autotest OK 42.71s
56/60 DPDK:perf-tests / stack_lf_perf_autotest OK 94.26s
57/60 DPDK:perf-tests / rand_perf_autotest OK 13.78s
58/60 DPDK:perf-tests / hash_readwrite_perf_autotest OK 50.86s
59/60 DPDK:perf-tests / hash_readwrite_lf_perf_autotest OK 145.72s
60/60 DPDK:perf-tests / trace_perf_autotest OK 2.29s
Ok: 59
Expected Fail: 0
Fail: 0
Unexpected Pass: 0
Skipped: 1
Timeout: 0
Full log written to c:\DPDKUpstream\dpdk\amd64\chk\meson-logs\testlog.txt
Jie Zhou (13):
lib: build libraries that some tests depend on
driver/mempool: build mempool stack on Windows
eal/windows: return ENOTSUP for not supported API
app/test: remove unnecessary headers
app/test: replace POSIX specific code
app/test: exclude ENOTSUP as failure
app/test: skip interrupt tests on Windows
app/test: temporarily "skip" one cmdline test case
app/test: skip two logs_autotest cases on Windows
app/test: differentiate a strerror on different OS
app/test: remove two alarm_autotest cases
app/test: replace .sh scripts with .py scripts
app/test: enable subset of unit tests on Windows
app/test/commands.c | 2 -
app/test/get-coremask.sh | 13 -
app/test/get_coremask.py | 8 +
app/test/has-hugepage.sh | 11 -
app/test/has_hugepage.py | 41 ++
app/test/meson.build | 866 ++++++++++++++++++------------
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +-
app/test/test.c | 5 +-
app/test/test_alarm.c | 4 +
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline.c | 2 +
app/test/test_cmdline_lib.c | 5 +-
app/test/test_crc.c | 1 -
app/test/test_errno.c | 12 +-
app/test/test_interrupts.c | 10 +
app/test/test_logs.c | 6 +-
app/test/test_memory.c | 5 +-
app/test/test_mp_secondary.c | 2 +
app/test/test_pmd_perf.c | 6 +-
app/test/test_ring_stress.c | 3 +-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_telemetry_data.c | 2 +
drivers/mempool/stack/meson.build | 5 -
lib/eal/common/eal_common_errno.c | 4 +
lib/eal/windows/eal_memalloc.c | 6 +-
lib/meson.build | 6 +
27 files changed, 641 insertions(+), 393 deletions(-)
delete mode 100755 app/test/get-coremask.sh
create mode 100644 app/test/get_coremask.py
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v2 01/13] lib: build libraries that some tests depend on
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 00/13] app/test: enable subset of " Jie Zhou
@ 2021-08-18 17:13 ` Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 02/13] driver/mempool: build mempool stack on Windows Jie Zhou
` (12 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 17:13 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Enable building subset of libraries that tests depend on for Windows
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
lib/meson.build | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/meson.build b/lib/meson.build
index 1673ca4323..f109d6987d 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -81,10 +81,16 @@ if is_windows
'timer',
'bitratestats',
'cfgfile',
+ 'efd',
'gro',
'gso',
+ 'ip_frag',
'latencystats',
+ 'lpm',
'pdump',
+ 'rib',
+ 'reorder',
+ 'stack',
] # only supported libraries for windows
endif
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v2 02/13] driver/mempool: build mempool stack on Windows
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 00/13] app/test: enable subset of " Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 01/13] lib: build libraries that some tests depend on Jie Zhou
@ 2021-08-18 17:13 ` Jie Zhou
2021-08-28 22:43 ` Dmitry Kozlyuk
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 03/13] eal/windows: return ENOTSUP for not supported API Jie Zhou
` (11 subsequent siblings)
13 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 17:13 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
mempool_autotest failed on Windows at setting the "stack" handler
test case. Per debugging, in rte_mempool_ops_table, there are only
6 ring ops registered, and no "stack" ops registered which caused
the failure of rte_mempool_set_ops_byname and thus the test failed.
Per code investigation, the "stack" ops are registered in
rte_mempool_stack.c:
MEMPOOL_REGISTER_OPS(ops_stack);
MEMPOOL_REGISTER_OPS(ops_lf_stack);
The reason these two ops are not registered is because currently
driver\mempool\stack is not build on Windows. After building stack
on Windows, the mempool_autotest now completed as pass.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
drivers/mempool/stack/meson.build | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/mempool/stack/meson.build b/drivers/mempool/stack/meson.build
index 371cf131b1..580dde79eb 100644
--- a/drivers/mempool/stack/meson.build
+++ b/drivers/mempool/stack/meson.build
@@ -1,11 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017-2019 Intel Corporation
-if is_windows
- build = false
- reason = 'not supported on Windows'
-endif
-
sources = files('rte_mempool_stack.c')
deps += ['stack']
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v2 03/13] eal/windows: return ENOTSUP for not supported API
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 00/13] app/test: enable subset of " Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 01/13] lib: build libraries that some tests depend on Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 02/13] driver/mempool: build mempool stack on Windows Jie Zhou
@ 2021-08-18 17:13 ` Jie Zhou
2021-08-28 22:44 ` Dmitry Kozlyuk
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 04/13] app/test: remove unnecessary headers Jie Zhou
` (10 subsequent siblings)
13 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 17:13 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
UT memory_autotest on Windows has 2 failed cases on eal APIs
eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2
APIs are not supported on Windows yet. Should return ENOTSUP such that
in test_memory.c these 2 ENOTSUP cases will not be marked as failures,
same as other ENOTSUP cases.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
lib/eal/windows/eal_memalloc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/eal/windows/eal_memalloc.c b/lib/eal/windows/eal_memalloc.c
index 4459d59b1a..fffdd5b976 100644
--- a/lib/eal/windows/eal_memalloc.c
+++ b/lib/eal/windows/eal_memalloc.c
@@ -17,7 +17,7 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
RTE_SET_USED(list_idx);
RTE_SET_USED(seg_idx);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
@@ -28,7 +28,7 @@ eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
RTE_SET_USED(seg_idx);
RTE_SET_USED(offset);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
static int
@@ -433,7 +433,7 @@ eal_memalloc_sync_with_primary(void)
{
/* No multi-process support. */
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v2 04/13] app/test: remove unnecessary headers
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 00/13] app/test: enable subset of " Jie Zhou
` (2 preceding siblings ...)
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 03/13] eal/windows: return ENOTSUP for not supported API Jie Zhou
@ 2021-08-18 17:13 ` Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 05/13] app/test: replace POSIX specific code Jie Zhou
` (9 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 17:13 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Remove unnecessary header inclusion
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/commands.c | 2 --
app/test/test.c | 1 -
app/test/test_cmdline_lib.c | 1 -
3 files changed, 4 deletions(-)
diff --git a/app/test/commands.c b/app/test/commands.c
index 76f6ee5d23..82bd8bf474 100644
--- a/app/test/commands.c
+++ b/app/test/commands.c
@@ -8,8 +8,6 @@
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
-#include <netinet/in.h>
-#include <termios.h>
#include <inttypes.h>
#include <errno.h>
#include <sys/queue.h>
diff --git a/app/test/test.c b/app/test/test.c
index 173d202e47..52fac24213 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index d5a09b4541..86a5b78d70 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v2 05/13] app/test: replace POSIX specific code
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 00/13] app/test: enable subset of " Jie Zhou
` (3 preceding siblings ...)
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 04/13] app/test: remove unnecessary headers Jie Zhou
@ 2021-08-18 17:13 ` Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 06/13] app/test: exclude ENOTSUP as failure Jie Zhou
` (8 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 17:13 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Include rte_os_shim.h
- Replace sleep and usleep with rte_delay_us_sleep
- #ifndef RTE_EXEC_ENV_WINDOWS for POSIX code only
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +++-
app/test/test.c | 4 ++++
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline.c | 2 ++
app/test/test_crc.c | 1 -
app/test/test_mp_secondary.c | 2 ++
app/test/test_pmd_perf.c | 6 +++++-
app/test/test_ring_stress.c | 3 ++-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_telemetry_data.c | 2 ++
11 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index 0fd7290b0e..2da4106ad6 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -5,6 +5,7 @@
#include <rte_byteorder.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
+#include <rte_os_shim.h>
#include "packet_burst_generator.h"
diff --git a/app/test/process.h b/app/test/process.h
index 5b10cf64df..1f073b9c5c 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -7,12 +7,14 @@
#include <errno.h> /* errno */
#include <limits.h> /* PATH_MAX */
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <libgen.h> /* basename et al */
+#include <sys/wait.h>
+#endif
#include <stdlib.h> /* NULL */
#include <string.h> /* strerror */
#include <unistd.h> /* readlink */
#include <dirent.h>
-#include <sys/wait.h>
#include <rte_string_fns.h> /* strlcpy */
diff --git a/app/test/test.c b/app/test/test.c
index 52fac24213..e8f8ce8335 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -62,7 +62,9 @@ do_recursive_call(void)
const char *env_var;
int (*action_fn)(void);
} actions[] = {
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "run_secondary_instances", test_mp_secondary },
+#endif
#ifdef RTE_LIB_PDUMP
#ifdef RTE_NET_RING
{ "run_pdump_server_tests", test_pdump },
@@ -81,7 +83,9 @@ do_recursive_call(void)
{ "test_file_prefix", no_action },
{ "test_no_huge_flag", no_action },
#ifdef RTE_LIB_TIMER
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "timer_secondary_spawn_wait", test_timer_secondary },
+#endif
#endif
};
diff --git a/app/test/test_byteorder.c b/app/test/test_byteorder.c
index 03c08d9abf..de14ed539e 100644
--- a/app/test/test_byteorder.c
+++ b/app/test/test_byteorder.c
@@ -46,7 +46,7 @@ test_byteorder(void)
return -1;
res_u16 = rte_bswap16(0x1337);
- printf("const %"PRIx16" -> %"PRIx16"\n", 0x1337, res_u16);
+ printf("const %"PRIx16" -> %"PRIx16"\n", (uint16_t)0x1337, res_u16);
if (res_u16 != 0x3713)
return -1;
diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c
index 115bee966d..9a76bd299f 100644
--- a/app/test/test_cmdline.c
+++ b/app/test/test_cmdline.c
@@ -31,6 +31,7 @@ test_cmdline(void)
return -1;
if (test_parse_num_invalid_param() < 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
printf("Testing parsing IP addresses...\n");
if (test_parse_ipaddr_valid() < 0)
return -1;
@@ -38,6 +39,7 @@ test_cmdline(void)
return -1;
if (test_parse_ipaddr_invalid_param() < 0)
return -1;
+#endif
printf("Testing parsing strings...\n");
if (test_parse_string_valid() < 0)
return -1;
diff --git a/app/test/test_crc.c b/app/test/test_crc.c
index bf1d344359..0ed080e482 100644
--- a/app/test/test_crc.c
+++ b/app/test/test_crc.c
@@ -14,7 +14,6 @@
#define CRC32_VEC_LEN2 348
#define CRC16_VEC_LEN1 12
#define CRC16_VEC_LEN2 2
-#define LINE_LEN 75
/* CRC test vector */
static const uint8_t crc_vec[CRC_VEC_LEN] = {
diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c
index 5b6f05dbb1..da035348bd 100644
--- a/app/test/test_mp_secondary.c
+++ b/app/test/test_mp_secondary.c
@@ -14,7 +14,9 @@
#include <errno.h>
#include <string.h>
#include <unistd.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/wait.h>
+#endif
#include <libgen.h>
#include <dirent.h>
#include <limits.h>
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 3a248d512c..8698d24eac 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -298,6 +298,7 @@ reset_count(void)
idle = 0;
}
+#ifndef RTE_EXEC_ENV_WINDOWS
static void
stats_display(uint16_t port_id)
{
@@ -327,6 +328,7 @@ signal_handler(int signum)
if (signum == SIGUSR2)
stats_display(0);
}
+#endif
struct rte_mbuf **tx_burst;
@@ -638,7 +640,7 @@ exec_burst(uint32_t flags, int lcore)
i = (i >= conf->nb_ports - 1) ? 0 : (i + 1);
}
- sleep(5);
+ rte_delay_us(5 * US_PER_S);
/* only when polling second */
if (flags == SC_BURST_XMIT_FIRST)
@@ -669,8 +671,10 @@ test_pmd_perf(void)
printf("Start PMD RXTX cycles cost test.\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
signal(SIGUSR1, signal_handler);
signal(SIGUSR2, signal_handler);
+#endif
nb_ports = rte_eth_dev_count_avail();
if (nb_ports < NB_ETHPORTS_USED) {
diff --git a/app/test/test_ring_stress.c b/app/test/test_ring_stress.c
index 1af45e0fc8..ce3535c6b2 100644
--- a/app/test/test_ring_stress.c
+++ b/app/test/test_ring_stress.c
@@ -43,9 +43,10 @@ test_ring_stress(void)
n += test_ring_rts_stress.nb_case;
k += run_test(&test_ring_rts_stress);
+#ifndef RTE_EXEC_ENV_WINDOWS
n += test_ring_hts_stress.nb_case;
k += run_test(&test_ring_hts_stress);
-
+#endif
n += test_ring_mt_peek_stress.nb_case;
k += run_test(&test_ring_mt_peek_stress);
diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h
index f9ca63b908..feb4b96ea1 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -359,7 +359,7 @@ test_mt1(int (*test)(void *))
wrk_cmd = WRK_CMD_RUN;
rte_smp_wmb();
- usleep(run_time * US_PER_S);
+ rte_delay_us(run_time * US_PER_S);
/* signal worker to start test */
wrk_cmd = WRK_CMD_STOP;
diff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c
index f34d691265..a0450337ea 100644
--- a/app/test/test_telemetry_data.c
+++ b/app/test/test_telemetry_data.c
@@ -4,7 +4,9 @@
#include <string.h>
#include <sys/socket.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/un.h>
+#endif
#include <unistd.h>
#include <limits.h>
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v2 06/13] app/test: exclude ENOTSUP as failure
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 00/13] app/test: enable subset of " Jie Zhou
` (4 preceding siblings ...)
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 05/13] app/test: replace POSIX specific code Jie Zhou
@ 2021-08-18 17:13 ` Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 07/13] app/test: skip interrupt tests on Windows Jie Zhou
` (7 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 17:13 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Check rte_errno to exclude ENOTSUP as failures in test_memory.c
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_memory.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index 7d5ae99bab..6f4fc02c03 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -9,6 +9,7 @@
#include <rte_memory.h>
#include <rte_common.h>
#include <rte_memzone.h>
+#include <rte_errno.h>
#include "test.h"
@@ -53,7 +54,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
/* ENOTSUP means segment is valid, but there is not support for
* segment fd API (e.g. on FreeBSD).
*/
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
/* all other errors are treated as failures */
return -1;
@@ -62,7 +63,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
/* we're able to get memseg fd - try getting its offset */
ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
if (ret < 0) {
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
return -1;
}
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v2 07/13] app/test: skip interrupt tests on Windows
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 00/13] app/test: enable subset of " Jie Zhou
` (5 preceding siblings ...)
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 06/13] app/test: exclude ENOTSUP as failure Jie Zhou
@ 2021-08-18 17:13 ` Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 08/13] app/test: temporarily "skip" one cmdline test case Jie Zhou
` (6 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 17:13 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Even though test_interrupts.c can compile on Windows, skip interrupt
tests for now since majority of eal_interrupt on Windows are stubs.
Will remove the skip after interrupt being fully enabled on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_interrupts.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
index 233b14a70b..ab52362e01 100644
--- a/app/test/test_interrupts.c
+++ b/app/test/test_interrupts.c
@@ -12,6 +12,15 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_interrupt(void)
+{
+ printf("Interrupt on Windows is not fully supported yet, skipping test\n");
+ return TEST_SKIPPED;
+}
+#else
+
#define TEST_INTERRUPT_CHECK_INTERVAL 100 /* ms */
/* predefined interrupt handle types */
@@ -558,5 +567,6 @@ test_interrupt(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v2 08/13] app/test: temporarily "skip" one cmdline test case
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 00/13] app/test: enable subset of " Jie Zhou
` (6 preceding siblings ...)
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 07/13] app/test: skip interrupt tests on Windows Jie Zhou
@ 2021-08-18 17:13 ` Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 09/13] app/test: skip two logs_autotest cases on Windows Jie Zhou
` (5 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 17:13 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
cmdline tests pass except one failure at the test_cmdline_socket_fns
test case with error: failed to open /dev/null for reading!
Temporarily "skip" this case while enable all other passing cases.
Issue is tracked internally and will add the corresponding case on
Windows in future.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_cmdline_lib.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index 86a5b78d70..1ff5c0d7e6 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -140,6 +140,9 @@ test_cmdline_vt100_fns(void)
static int
test_cmdline_socket_fns(void)
{
+#ifdef RTE_EXEC_ENV_WINDOWS
+ return 0;
+#else
cmdline_parse_ctx_t ctx;
struct cmdline *cl;
@@ -179,6 +182,7 @@ test_cmdline_socket_fns(void)
printf("Error: function accepted null parameter!\n");
cmdline_free(cl);
return -1;
+#endif
}
static int
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v2 09/13] app/test: skip two logs_autotest cases on Windows
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 00/13] app/test: enable subset of " Jie Zhou
` (7 preceding siblings ...)
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 08/13] app/test: temporarily "skip" one cmdline test case Jie Zhou
@ 2021-08-18 17:13 ` Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 10/13] app/test: differentiate a strerror on different OS Jie Zhou
` (4 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 17:13 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
DPDK logs_autotest on Windows failed at "dynamic log types" tests.
The failures are on 2 test cases for rte_log_set_level_regexp API,
due to regular expression is not supported on Windows in DPDK yet
and regcomp/regexec are just stubs on Windows (in regex.h).
In app\test\test_logs.c, ifndef these two test cases, and for the
rte_log_set_level_pattern validation case following these two cases,
differentiate the expected log level passed into macro CHECK_LEVELS
Now logs_autotest completes for all dynamic log types and static log types.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_logs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/test/test_logs.c b/app/test/test_logs.c
index 7abb6eeca2..7c001c1ab3 100644
--- a/app/test/test_logs.c
+++ b/app/test/test_logs.c
@@ -113,6 +113,7 @@ test_logs(void)
rte_log_set_level(logtype1, RTE_LOG_ERR);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#ifndef RTE_EXEC_ENV_WINDOWS
rte_log_set_level_regexp("type$", RTE_LOG_EMERG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
@@ -121,7 +122,10 @@ test_logs(void)
rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_EMERG, RTE_LOG_EMERG);
-
+#else
+ ret = rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
+ CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#endif
/* set logtype level low to so we can test global level */
rte_log_set_level_pattern("logtype*", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_DEBUG, RTE_LOG_DEBUG, RTE_LOG_DEBUG);
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v2 10/13] app/test: differentiate a strerror on different OS
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 00/13] app/test: enable subset of " Jie Zhou
` (8 preceding siblings ...)
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 09/13] app/test: skip two logs_autotest cases on Windows Jie Zhou
@ 2021-08-18 17:13 ` Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 11/13] app/test: remove two alarm_autotest cases Jie Zhou
` (3 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 17:13 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
On Windows, strerror returns just "Unknown error" for errnum greater
than MAX_ERRNO, while linux and freebsd returns "Unknown error <num>",
which is the current expectation for errno_autotest. Differentiate
the error string on Windows to remove a "duplicate error code" failure.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_errno.c | 12 +++++++++++-
lib/eal/common/eal_common_errno.c | 4 ++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/app/test/test_errno.c b/app/test/test_errno.c
index 3ff0456a58..d30ac212fd 100644
--- a/app/test/test_errno.c
+++ b/app/test/test_errno.c
@@ -18,13 +18,19 @@ test_errno(void)
{
const char *rte_retval;
const char *libc_retval;
+
+#ifndef RTE_EXEC_ENV_WINDOWS
#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD has a colon in the string, unlike linux */
const char unknown_code_result[] = "Unknown error: %d";
#else
const char unknown_code_result[] = "Unknown error %d";
#endif
- char expected_libc_retval[sizeof(unknown_code_result)+3];
+ char expected_libc_retval[sizeof(unknown_code_result) + 3];
+#else
+ /* Windows doesn't return error number for error greater than MAX_errno*/
+ const char expected_libc_retval[] = "Unknown error";
+#endif
/* use a small selection of standard errors for testing */
int std_errs[] = {EAGAIN, EBADF, EACCES, EINTR, EINVAL};
@@ -54,11 +60,13 @@ test_errno(void)
rte_retval, libc_retval);
if (strcmp(rte_retval, libc_retval) == 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
/* generate appropriate error string for unknown error number
* and then check that this is what we got back. If not, we have
* a duplicate error number that conflicts with errno.h */
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, rte_errs[i]);
+#endif
if ((strcmp(expected_libc_retval, libc_retval) != 0) &&
(strcmp("", libc_retval) != 0)){
printf("Error, duplicate error code %d\n", rte_errs[i]);
@@ -69,8 +77,10 @@ test_errno(void)
/* ensure that beyond RTE_MAX_ERRNO, we always get an unknown code */
rte_retval = rte_strerror(RTE_MAX_ERRNO + 1);
libc_retval = strerror(RTE_MAX_ERRNO + 1);
+#ifndef RTE_EXEC_ENV_WINDOWS
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, RTE_MAX_ERRNO + 1);
+#endif
printf("rte_strerror: '%s', strerror: '%s'\n",
rte_retval, libc_retval);
if ((strcmp(rte_retval, libc_retval) != 0) ||
diff --git a/lib/eal/common/eal_common_errno.c b/lib/eal/common/eal_common_errno.c
index f86802705a..4c4abb802e 100644
--- a/lib/eal/common/eal_common_errno.c
+++ b/lib/eal/common/eal_common_errno.c
@@ -37,7 +37,11 @@ rte_strerror(int errnum)
/* since some implementations of strerror_r throw an error
* themselves if errnum is too big, we handle that case here */
if (errnum >= RTE_MAX_ERRNO)
+#ifdef RTE_EXEC_ENV_WINDOWS
+ snprintf(ret, RETVAL_SZ, "Unknown error%s", sep);
+#else
snprintf(ret, RETVAL_SZ, "Unknown error%s %d", sep, errnum);
+#endif
else
switch (errnum){
case E_RTE_SECONDARY:
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v2 11/13] app/test: remove two alarm_autotest cases
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 00/13] app/test: enable subset of " Jie Zhou
` (9 preceding siblings ...)
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 10/13] app/test: differentiate a strerror on different OS Jie Zhou
@ 2021-08-18 17:13 ` Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 12/13] app/test: replace .sh scripts with .py scripts Jie Zhou
` (2 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 17:13 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Remove two alarm_autotest test cases which do bogus range check
on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_alarm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_alarm.c b/app/test/test_alarm.c
index b4034339b8..70e97a3109 100644
--- a/app/test/test_alarm.c
+++ b/app/test/test_alarm.c
@@ -10,6 +10,7 @@
#include "test.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
static volatile int flag;
static void
@@ -18,6 +19,7 @@ test_alarm_callback(void *cb_arg)
flag = 1;
printf("Callback setting flag - OK. [cb_arg = %p]\n", cb_arg);
}
+#endif
static int
test_alarm(void)
@@ -27,6 +29,7 @@ test_alarm(void)
return 0;
#endif
+#ifndef RTE_EXEC_ENV_WINDOWS
/* check if it will fail to set alarm with wrong us value */
printf("check if it will fail to set alarm with wrong ms values\n");
if (rte_eal_alarm_set(0, test_alarm_callback,
@@ -39,6 +42,7 @@ test_alarm(void)
printf("should not be successful with (UINT64_MAX-1) us value\n");
return -1;
}
+#endif
/* check if it will fail to set alarm with null callback parameter */
printf("check if it will fail to set alarm with null callback parameter\n");
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v2 12/13] app/test: replace .sh scripts with .py scripts
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 00/13] app/test: enable subset of " Jie Zhou
` (10 preceding siblings ...)
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 11/13] app/test: remove two alarm_autotest cases Jie Zhou
@ 2021-08-18 17:13 ` Jie Zhou
2021-08-28 22:17 ` Dmitry Kozlyuk
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 13/13] app/test: enable subset of unit tests on Windows Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 00/13] app/test: enable subset of " Jie Zhou
13 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 17:13 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Add python scripts to get coremask and check hugepage config
- Remove two corresponding .sh scripts
- Replace calling of .sh with corresponding .py in meson.build
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/get-coremask.sh | 13 -------------
app/test/get_coremask.py | 8 ++++++++
app/test/has-hugepage.sh | 11 -----------
app/test/has_hugepage.py | 41 ++++++++++++++++++++++++++++++++++++++++
app/test/meson.build | 7 ++++---
5 files changed, 53 insertions(+), 27 deletions(-)
delete mode 100755 app/test/get-coremask.sh
create mode 100644 app/test/get_coremask.py
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
diff --git a/app/test/get-coremask.sh b/app/test/get-coremask.sh
deleted file mode 100755
index bb8cf404d2..0000000000
--- a/app/test/get-coremask.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#! /bin/sh -e
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2019 Intel Corporation
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /sys/devices/system/cpu/present
-elif [ "$(uname)" = "FreeBSD" ] ; then
- ncpus=$(/sbin/sysctl -n hw.ncpu)
- echo 0-$(expr $ncpus - 1)
-else
-# fallback
- echo 0-3
-fi
diff --git a/app/test/get_coremask.py b/app/test/get_coremask.py
new file mode 100644
index 0000000000..3d0947e8ff
--- /dev/null
+++ b/app/test/get_coremask.py
@@ -0,0 +1,8 @@
+#! /usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2021 Microsoft Corporation
+
+import multiprocessing
+
+c = multiprocessing.cpu_count()
+print("0-"+str(c-1))
diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh
deleted file mode 100755
index d600fad319..0000000000
--- a/app/test/has-hugepage.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright 2020 Mellanox Technologies, Ltd
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /proc/sys/vm/nr_hugepages || echo 0
-elif [ "$(uname)" = "FreeBSD" ] ; then
- echo 1 # assume FreeBSD always has hugepages
-else
- echo 0
-fi
diff --git a/app/test/has_hugepage.py b/app/test/has_hugepage.py
new file mode 100644
index 0000000000..decf47df45
--- /dev/null
+++ b/app/test/has_hugepage.py
@@ -0,0 +1,41 @@
+#! /usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2021 Microsoft Corporation
+
+import os
+import platform
+
+osName = platform.system()
+if osName == "Linux":
+ file_o=open("/proc/sys/vm/nr_hugepages")
+ content=file_o.read()
+ print(content)
+ file_o.close()
+elif osName == "FreeBSD":
+ # Assume FreeBSD always has hugepages enabled
+ print("1")
+elif osName == "Windows":
+ # On Windows, check if the Administrator has "Lock pages in memory" security setting
+ # to determine if large page is enabled or not
+
+ # Export the USER_RIGHTS security settings
+ # Use os.popen instead of os.system to suppress the output of secedit to stdout
+ userRightsfile = "userrights.inf"
+ os.popen('secedit /export /areas USER_RIGHTS /cfg "' + userRightsfile + '"')
+
+ # Parse the exported user rights setting to determine if Administrator
+ # SeLockMemoryPrivilege being set or not
+ largepageEnabledStr = 'SeLockMemoryPrivilege = Administrator'
+ enabled = 0
+ # On different OS versions tested, the exported inf file has utf-16 encoding
+ with open(userRightsfile, encoding = 'utf-16') as f:
+ urcontent = f.readlines()
+ for line in urcontent:
+ if largepageEnabledStr in line:
+ enabled = 1
+ break
+
+ f.close()
+ print(enabled)
+else:
+ print("0")
diff --git a/app/test/meson.build b/app/test/meson.build
index a7611686ad..7240304916 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -450,7 +450,7 @@ dpdk_test = executable('dpdk-test',
driver_install_path),
install: true)
-has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
+has_hugepage = run_command('has_hugepage.py').stdout().strip() != '0'
message('hugepage availability: @0@'.format(has_hugepage))
# some perf tests (eg: memcpy perf autotest)take very long
@@ -458,8 +458,9 @@ message('hugepage availability: @0@'.format(has_hugepage))
timeout_seconds = 600
timeout_seconds_fast = 10
-get_coremask = find_program('get-coremask.sh')
-num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip()
+list_of_cores = run_command('get_coremask.py').stdout().strip()
+message('list of cores: @0@'.format(list_of_cores))
+num_cores_arg = '-l ' + list_of_cores
default_test_args = [num_cores_arg]
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v2 13/13] app/test: enable subset of unit tests on Windows
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 00/13] app/test: enable subset of " Jie Zhou
` (11 preceding siblings ...)
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 12/13] app/test: replace .sh scripts with .py scripts Jie Zhou
@ 2021-08-18 17:13 ` Jie Zhou
2021-08-28 22:18 ` Dmitry Kozlyuk
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 00/13] app/test: enable subset of " Jie Zhou
13 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-08-18 17:13 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
In app/test/meson.build
- Specify the subset of source files to compile on Windows
- Specify the subset of tests to be enabled on Windows
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/meson.build | 859 ++++++++++++++++++++++++++-----------------
1 file changed, 515 insertions(+), 344 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index 7240304916..1e77657510 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,353 +1,524 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if is_windows
- build = false
- reason = 'not supported on Windows'
- subdir_done()
-endif
-
if not get_option('tests')
subdir_done()
endif
-test_sources = files(
- 'commands.c',
- 'packet_burst_generator.c',
- 'test.c',
- 'test_acl.c',
- 'test_alarm.c',
- 'test_atomic.c',
- 'test_barrier.c',
- 'test_bitops.c',
- 'test_bitmap.c',
- 'test_bpf.c',
- 'test_byteorder.c',
- 'test_cksum.c',
- 'test_cmdline.c',
- 'test_cmdline_cirbuf.c',
- 'test_cmdline_etheraddr.c',
- 'test_cmdline_ipaddr.c',
- 'test_cmdline_lib.c',
- 'test_cmdline_num.c',
- 'test_cmdline_portlist.c',
- 'test_cmdline_string.c',
- 'test_common.c',
- 'test_cpuflags.c',
- 'test_crc.c',
- 'test_cryptodev.c',
- 'test_cryptodev_asym.c',
- 'test_cryptodev_blockcipher.c',
- 'test_cryptodev_security_pdcp.c',
- 'test_cycles.c',
- 'test_debug.c',
- 'test_distributor.c',
- 'test_distributor_perf.c',
- 'test_eal_flags.c',
- 'test_eal_fs.c',
- 'test_efd.c',
- 'test_efd_perf.c',
- 'test_errno.c',
- 'test_ethdev_link.c',
- 'test_event_crypto_adapter.c',
- 'test_event_eth_rx_adapter.c',
- 'test_event_ring.c',
- 'test_event_timer_adapter.c',
- 'test_eventdev.c',
- 'test_external_mem.c',
- 'test_fbarray.c',
- 'test_fib.c',
- 'test_fib_perf.c',
- 'test_fib6.c',
- 'test_fib6_perf.c',
- 'test_func_reentrancy.c',
- 'test_flow_classify.c',
- 'test_graph.c',
- 'test_graph_perf.c',
- 'test_hash.c',
- 'test_hash_functions.c',
- 'test_hash_multiwriter.c',
- 'test_hash_readwrite.c',
- 'test_hash_perf.c',
- 'test_hash_readwrite_lf_perf.c',
- 'test_interrupts.c',
- 'test_ipfrag.c',
- 'test_ipsec.c',
- 'test_ipsec_sad.c',
- 'test_ipsec_perf.c',
- 'test_kni.c',
- 'test_kvargs.c',
- 'test_lcores.c',
- 'test_logs.c',
- 'test_lpm.c',
- 'test_lpm6.c',
- 'test_lpm6_perf.c',
- 'test_lpm_perf.c',
- 'test_malloc.c',
- 'test_mbuf.c',
- 'test_member.c',
- 'test_member_perf.c',
- 'test_memcpy.c',
- 'test_memcpy_perf.c',
- 'test_memory.c',
- 'test_mempool.c',
- 'test_mempool_perf.c',
- 'test_memzone.c',
- 'test_meter.c',
- 'test_metrics.c',
- 'test_mcslock.c',
- 'test_mp_secondary.c',
- 'test_per_lcore.c',
- 'test_pflock.c',
- 'test_pmd_perf.c',
- 'test_power.c',
- 'test_power_cpufreq.c',
- 'test_power_kvm_vm.c',
- 'test_prefetch.c',
- 'test_rand_perf.c',
- 'test_rawdev.c',
- 'test_rcu_qsbr.c',
- 'test_rcu_qsbr_perf.c',
- 'test_reciprocal_division.c',
- 'test_reciprocal_division_perf.c',
- 'test_red.c',
- 'test_reorder.c',
- 'test_rib.c',
- 'test_rib6.c',
- 'test_ring.c',
- 'test_ring_mpmc_stress.c',
- 'test_ring_hts_stress.c',
- 'test_ring_mt_peek_stress.c',
- 'test_ring_mt_peek_stress_zc.c',
- 'test_ring_perf.c',
- 'test_ring_rts_stress.c',
- 'test_ring_st_peek_stress.c',
- 'test_ring_st_peek_stress_zc.c',
- 'test_ring_stress.c',
- 'test_rwlock.c',
- 'test_sched.c',
- 'test_security.c',
- 'test_service_cores.c',
- 'test_spinlock.c',
- 'test_stack.c',
- 'test_stack_perf.c',
- 'test_string_fns.c',
- 'test_table.c',
- 'test_table_acl.c',
- 'test_table_combined.c',
- 'test_table_pipeline.c',
- 'test_table_ports.c',
- 'test_table_tables.c',
- 'test_tailq.c',
- 'test_thash.c',
- 'test_timer.c',
- 'test_timer_perf.c',
- 'test_timer_racecond.c',
- 'test_timer_secondary.c',
- 'test_ticketlock.c',
- 'test_trace.c',
- 'test_trace_register.c',
- 'test_trace_perf.c',
- 'test_version.c',
- 'virtual_pmd.c',
-)
-
-test_deps = [
- 'acl',
- 'bus_pci',
- 'bus_vdev',
- 'bitratestats',
- 'bpf',
- 'cfgfile',
- 'cmdline',
- 'cryptodev',
- 'distributor',
- 'efd',
- 'ethdev',
- 'eventdev',
- 'fib',
- 'flow_classify',
- 'graph',
- 'hash',
- 'ipsec',
- 'latencystats',
- 'lpm',
- 'member',
- 'metrics',
- 'node',
- 'pipeline',
- 'port',
- 'rawdev',
- 'rcu',
- 'reorder',
- 'rib',
- 'ring',
- 'security',
- 'stack',
- 'telemetry',
- 'timer',
-]
-
-# Each test is marked with flag true/false
-# to indicate whether it can run in no-huge mode.
-fast_tests = [
- ['acl_autotest', true],
- ['atomic_autotest', false],
- ['bitops_autotest', true],
- ['byteorder_autotest', true],
- ['cksum_autotest', true],
- ['cmdline_autotest', true],
- ['common_autotest', true],
- ['cpuflags_autotest', true],
- ['debug_autotest', true],
- ['eal_flags_c_opt_autotest', false],
- ['eal_flags_main_opt_autotest', false],
- ['eal_flags_n_opt_autotest', false],
- ['eal_flags_hpet_autotest', false],
- ['eal_flags_no_huge_autotest', false],
- ['eal_flags_a_opt_autotest', false],
- ['eal_flags_b_opt_autotest', false],
- ['eal_flags_vdev_opt_autotest', false],
- ['eal_flags_r_opt_autotest', false],
- ['eal_flags_mem_autotest', false],
- ['eal_flags_file_prefix_autotest', false],
- ['eal_flags_misc_autotest', false],
- ['eal_fs_autotest', true],
- ['errno_autotest', true],
- ['ethdev_link_status', true],
- ['event_ring_autotest', true],
- ['fib_autotest', true],
- ['fib6_autotest', true],
- ['func_reentrancy_autotest', false],
- ['flow_classify_autotest', false],
- ['hash_autotest', true],
- ['interrupt_autotest', true],
- ['ipfrag_autotest', false],
- ['lcores_autotest', true],
- ['logs_autotest', true],
- ['lpm_autotest', true],
- ['lpm6_autotest', true],
- ['malloc_autotest', false],
- ['mbuf_autotest', false],
- ['mcslock_autotest', false],
- ['memcpy_autotest', true],
- ['memory_autotest', false],
- ['mempool_autotest', false],
- ['memzone_autotest', false],
- ['meter_autotest', true],
- ['multiprocess_autotest', false],
- ['per_lcore_autotest', true],
- ['pflock_autotest', true],
- ['prefetch_autotest', true],
- ['rcu_qsbr_autotest', true],
- ['red_autotest', true],
- ['rib_autotest', true],
- ['rib6_autotest', true],
- ['ring_autotest', true],
- ['rwlock_test1_autotest', true],
- ['rwlock_rda_autotest', true],
- ['rwlock_rds_wrm_autotest', true],
- ['rwlock_rde_wro_autotest', true],
- ['sched_autotest', true],
- ['security_autotest', false],
- ['spinlock_autotest', true],
- ['stack_autotest', false],
- ['stack_lf_autotest', false],
- ['string_autotest', true],
- ['table_autotest', true],
- ['tailq_autotest', true],
- ['ticketlock_autotest', true],
- ['timer_autotest', false],
- ['user_delay_us', true],
- ['version_autotest', true],
- ['crc_autotest', true],
- ['distributor_autotest', false],
- ['eventdev_common_autotest', true],
- ['fbarray_autotest', true],
- ['hash_readwrite_func_autotest', false],
- ['ipsec_autotest', true],
- ['kni_autotest', false],
- ['kvargs_autotest', true],
- ['member_autotest', true],
- ['metrics_autotest', true],
- ['power_cpufreq_autotest', false],
- ['power_autotest', true],
- ['power_kvm_vm_autotest', false],
- ['reorder_autotest', true],
- ['service_autotest', true],
- ['thash_autotest', true],
- ['trace_autotest', true],
-]
-
-perf_test_names = [
- 'ring_perf_autotest',
- 'mempool_perf_autotest',
- 'memcpy_perf_autotest',
- 'hash_perf_autotest',
- 'timer_perf_autotest',
- 'reciprocal_division',
- 'reciprocal_division_perf',
- 'lpm_perf_autotest',
- 'rib_slow_autotest',
- 'fib_slow_autotest',
- 'fib_perf_autotest',
- 'red_all',
- 'barrier_autotest',
- 'hash_multiwriter_autotest',
- 'timer_racecond_autotest',
- 'efd_autotest',
- 'hash_functions_autotest',
- 'member_perf_autotest',
- 'efd_perf_autotest',
- 'lpm6_perf_autotest',
- 'rib6_slow_autotest',
- 'fib6_slow_autotest',
- 'fib6_perf_autotest',
- 'rcu_qsbr_perf_autotest',
- 'red_perf',
- 'distributor_perf_autotest',
- 'pmd_perf_autotest',
- 'stack_perf_autotest',
- 'stack_lf_perf_autotest',
- 'rand_perf_autotest',
- 'hash_readwrite_perf_autotest',
- 'hash_readwrite_lf_perf_autotest',
- 'trace_perf_autotest',
- 'ipsec_perf_autotest',
-]
-
-driver_test_names = [
- 'cryptodev_aesni_mb_autotest',
- 'cryptodev_aesni_gcm_autotest',
- 'cryptodev_cn9k_autotest',
- 'cryptodev_cn10k_autotest',
- 'cryptodev_dpaa_sec_autotest',
- 'cryptodev_dpaa2_sec_autotest',
- 'cryptodev_null_autotest',
- 'cryptodev_octeontx2_autotest',
- 'cryptodev_openssl_autotest',
- 'cryptodev_openssl_asym_autotest',
- 'cryptodev_qat_autotest',
- 'cryptodev_sw_armv8_autotest',
- 'cryptodev_sw_kasumi_autotest',
- 'cryptodev_sw_mvsam_autotest',
- 'cryptodev_sw_snow3g_autotest',
- 'cryptodev_sw_zuc_autotest',
- 'eventdev_selftest_octeontx',
- 'eventdev_selftest_sw',
- 'rawdev_autotest',
-]
-
-dump_test_names = [
- 'dump_struct_sizes',
- 'dump_mempool',
- 'dump_malloc_stats',
- 'dump_devargs',
- 'dump_log_types',
- 'dump_ring',
- 'dump_physmem',
- 'dump_memzone',
-]
+if is_windows
+ test_sources = files('commands.c',
+ 'packet_burst_generator.c',
+ 'test.c',
+ 'test_alarm.c',
+ 'test_atomic.c',
+ 'test_barrier.c',
+ 'test_bitops.c',
+ 'test_bitmap.c',
+ 'test_byteorder.c',
+ 'test_cmdline.c',
+ 'test_cmdline_cirbuf.c',
+ 'test_cmdline_etheraddr.c',
+ 'test_cmdline_lib.c',
+ 'test_cmdline_num.c',
+ 'test_cmdline_portlist.c',
+ 'test_cmdline_string.c',
+ 'test_common.c',
+ 'test_cpuflags.c',
+ 'test_crc.c',
+ 'test_cycles.c',
+ 'test_errno.c',
+ 'test_ethdev_link.c',
+ 'test_fbarray.c',
+ 'test_func_reentrancy.c',
+ 'test_hash.c',
+ 'test_hash_functions.c',
+ 'test_hash_multiwriter.c',
+ 'test_hash_readwrite.c',
+ 'test_hash_readwrite_lf_perf.c',
+ 'test_interrupts.c',
+ 'test_kvargs.c',
+ 'test_logs.c',
+ 'test_lpm.c',
+ 'test_memcpy.c',
+ 'test_memory.c',
+ 'test_mempool.c',
+ 'test_mempool_perf.c',
+ 'test_memzone.c',
+ 'test_meter.c',
+ 'test_metrics.c',
+ 'test_mcslock.c',
+ 'test_per_lcore.c',
+ 'test_pmd_perf.c',
+ 'test_power.c',
+ 'test_power_cpufreq.c',
+ 'test_power_kvm_vm.c',
+ 'test_prefetch.c',
+ 'test_rand_perf.c',
+ 'test_rcu_qsbr.c',
+ 'test_rcu_qsbr_perf.c',
+ 'test_reorder.c',
+ 'test_rib.c',
+ 'test_rib6.c',
+ 'test_ring.c',
+ 'test_ring_mpmc_stress.c',
+ 'test_ring_mt_peek_stress.c',
+ 'test_ring_mt_peek_stress_zc.c',
+ 'test_ring_perf.c',
+ 'test_ring_rts_stress.c',
+ 'test_ring_st_peek_stress.c',
+ 'test_ring_st_peek_stress_zc.c',
+ 'test_ring_stress.c',
+ 'test_rwlock.c',
+ 'test_service_cores.c',
+ 'test_spinlock.c',
+ 'test_stack.c',
+ 'test_stack_perf.c',
+ 'test_string_fns.c',
+ 'test_tailq.c',
+ 'test_thash.c',
+ 'test_timer.c',
+ 'test_timer_perf.c',
+ 'test_timer_racecond.c',
+ 'test_ticketlock.c',
+ 'test_trace_register.c',
+ 'test_trace_perf.c',
+ 'test_version.c',
+ 'virtual_pmd.c'
+ )
+
+ test_deps = [
+ 'bus_pci',
+ 'bus_vdev',
+ 'bitratestats',
+ 'cfgfile',
+ 'cmdline',
+ 'efd',
+ 'ethdev',
+ 'hash',
+ 'latencystats',
+ 'lpm',
+ 'metrics',
+ 'rcu',
+ 'reorder',
+ 'rib',
+ 'ring',
+ 'stack',
+ 'telemetry',
+ 'timer',
+ ]
+
+ # Each test is marked with flag true/false
+ # to indicate whether it can run in no-huge mode.
+ fast_tests = [
+ ['alarm_autotest', true],
+ ['bitops_autotest', true],
+ ['byteorder_autotest', true],
+ ['cmdline_autotest', true],
+ ['common_autotest', true],
+ ['cpuflags_autotest', true],
+ ['errno_autotest', true],
+ ['ethdev_link_status', true],
+ ['hash_autotest', true],
+ ['interrupt_autotest', true],
+ ['logs_autotest', true],
+ ['lpm_autotest', true],
+ ['mcslock_autotest', false],
+ ['memory_autotest', false],
+ ['mempool_autotest', false],
+ ['memzone_autotest', false],
+ ['meter_autotest', true],
+ ['per_lcore_autotest', true],
+ ['prefetch_autotest', true],
+ ['rcu_qsbr_autotest', true],
+ ['rib_autotest', true],
+ ['rib6_autotest', true],
+ ['ring_autotest', true],
+ ['rwlock_test1_autotest', true],
+ ['rwlock_rda_autotest', true],
+ ['rwlock_rds_wrm_autotest', true],
+ ['rwlock_rde_wro_autotest', true],
+ ['spinlock_autotest', true],
+ ['stack_autotest', false],
+ ['stack_lf_autotest', false],
+ ['string_autotest', true],
+ ['tailq_autotest', true],
+ ['ticketlock_autotest', true],
+ ['user_delay_us', true],
+ ['version_autotest', true],
+ ['crc_autotest', true],
+ ['fbarray_autotest', true],
+ ['hash_readwrite_func_autotest', false],
+ ['kvargs_autotest', true],
+ ['metrics_autotest', true],
+ ['reorder_autotest', true],
+ ['service_autotest', true],
+ ['thash_autotest', true],
+ ]
+
+ perf_test_names = [
+ 'atomic_autotest',
+ 'memcpy_autotest',
+ 'ring_perf_autotest',
+ 'timer_autotest',
+ 'timer_perf_autotest',
+ 'rib_slow_autotest',
+ 'barrier_autotest',
+ 'hash_multiwriter_autotest',
+ 'timer_racecond_autotest',
+ 'hash_functions_autotest',
+ 'pmd_perf_autotest',
+ 'stack_perf_autotest',
+ 'stack_lf_perf_autotest',
+ 'rand_perf_autotest',
+ 'hash_readwrite_perf_autotest',
+ 'hash_readwrite_lf_perf_autotest',
+ 'trace_perf_autotest',
+ ]
+
+ driver_test_names = [
+ ]
+
+ dump_test_names = [
+ ]
+else
+ test_sources = files(
+ 'commands.c',
+ 'packet_burst_generator.c',
+ 'test.c',
+ 'test_acl.c',
+ 'test_alarm.c',
+ 'test_atomic.c',
+ 'test_barrier.c',
+ 'test_bitops.c',
+ 'test_bitmap.c',
+ 'test_bpf.c',
+ 'test_byteorder.c',
+ 'test_cksum.c',
+ 'test_cmdline.c',
+ 'test_cmdline_cirbuf.c',
+ 'test_cmdline_etheraddr.c',
+ 'test_cmdline_ipaddr.c',
+ 'test_cmdline_lib.c',
+ 'test_cmdline_num.c',
+ 'test_cmdline_portlist.c',
+ 'test_cmdline_string.c',
+ 'test_common.c',
+ 'test_cpuflags.c',
+ 'test_crc.c',
+ 'test_cryptodev.c',
+ 'test_cryptodev_asym.c',
+ 'test_cryptodev_blockcipher.c',
+ 'test_cryptodev_security_pdcp.c',
+ 'test_cycles.c',
+ 'test_debug.c',
+ 'test_distributor.c',
+ 'test_distributor_perf.c',
+ 'test_eal_flags.c',
+ 'test_eal_fs.c',
+ 'test_efd.c',
+ 'test_efd_perf.c',
+ 'test_errno.c',
+ 'test_ethdev_link.c',
+ 'test_event_crypto_adapter.c',
+ 'test_event_eth_rx_adapter.c',
+ 'test_event_ring.c',
+ 'test_event_timer_adapter.c',
+ 'test_eventdev.c',
+ 'test_external_mem.c',
+ 'test_fbarray.c',
+ 'test_fib.c',
+ 'test_fib_perf.c',
+ 'test_fib6.c',
+ 'test_fib6_perf.c',
+ 'test_func_reentrancy.c',
+ 'test_flow_classify.c',
+ 'test_graph.c',
+ 'test_graph_perf.c',
+ 'test_hash.c',
+ 'test_hash_functions.c',
+ 'test_hash_multiwriter.c',
+ 'test_hash_readwrite.c',
+ 'test_hash_perf.c',
+ 'test_hash_readwrite_lf_perf.c',
+ 'test_interrupts.c',
+ 'test_ipfrag.c',
+ 'test_ipsec.c',
+ 'test_ipsec_sad.c',
+ 'test_ipsec_perf.c',
+ 'test_kni.c',
+ 'test_kvargs.c',
+ 'test_lcores.c',
+ 'test_logs.c',
+ 'test_lpm.c',
+ 'test_lpm6.c',
+ 'test_lpm6_perf.c',
+ 'test_lpm_perf.c',
+ 'test_malloc.c',
+ 'test_mbuf.c',
+ 'test_member.c',
+ 'test_member_perf.c',
+ 'test_memcpy.c',
+ 'test_memcpy_perf.c',
+ 'test_memory.c',
+ 'test_mempool.c',
+ 'test_mempool_perf.c',
+ 'test_memzone.c',
+ 'test_meter.c',
+ 'test_metrics.c',
+ 'test_mcslock.c',
+ 'test_mp_secondary.c',
+ 'test_per_lcore.c',
+ 'test_pflock.c',
+ 'test_pmd_perf.c',
+ 'test_power.c',
+ 'test_power_cpufreq.c',
+ 'test_power_kvm_vm.c',
+ 'test_prefetch.c',
+ 'test_rand_perf.c',
+ 'test_rawdev.c',
+ 'test_rcu_qsbr.c',
+ 'test_rcu_qsbr_perf.c',
+ 'test_reciprocal_division.c',
+ 'test_reciprocal_division_perf.c',
+ 'test_red.c',
+ 'test_reorder.c',
+ 'test_rib.c',
+ 'test_rib6.c',
+ 'test_ring.c',
+ 'test_ring_mpmc_stress.c',
+ 'test_ring_hts_stress.c',
+ 'test_ring_mt_peek_stress.c',
+ 'test_ring_mt_peek_stress_zc.c',
+ 'test_ring_perf.c',
+ 'test_ring_rts_stress.c',
+ 'test_ring_st_peek_stress.c',
+ 'test_ring_st_peek_stress_zc.c',
+ 'test_ring_stress.c',
+ 'test_rwlock.c',
+ 'test_sched.c',
+ 'test_security.c',
+ 'test_service_cores.c',
+ 'test_spinlock.c',
+ 'test_stack.c',
+ 'test_stack_perf.c',
+ 'test_string_fns.c',
+ 'test_table.c',
+ 'test_table_acl.c',
+ 'test_table_combined.c',
+ 'test_table_pipeline.c',
+ 'test_table_ports.c',
+ 'test_table_tables.c',
+ 'test_tailq.c',
+ 'test_thash.c',
+ 'test_timer.c',
+ 'test_timer_perf.c',
+ 'test_timer_racecond.c',
+ 'test_timer_secondary.c',
+ 'test_ticketlock.c',
+ 'test_trace.c',
+ 'test_trace_register.c',
+ 'test_trace_perf.c',
+ 'test_version.c',
+ 'virtual_pmd.c',
+ )
+
+ test_deps = [
+ 'acl',
+ 'bus_pci',
+ 'bus_vdev',
+ 'bitratestats',
+ 'bpf',
+ 'cfgfile',
+ 'cmdline',
+ 'cryptodev',
+ 'distributor',
+ 'efd',
+ 'ethdev',
+ 'eventdev',
+ 'fib',
+ 'flow_classify',
+ 'graph',
+ 'hash',
+ 'ipsec',
+ 'latencystats',
+ 'lpm',
+ 'member',
+ 'metrics',
+ 'node',
+ 'pipeline',
+ 'port',
+ 'rawdev',
+ 'rcu',
+ 'reorder',
+ 'rib',
+ 'ring',
+ 'security',
+ 'stack',
+ 'telemetry',
+ 'timer',
+ ]
+
+ # Each test is marked with flag true/false
+ # to indicate whether it can run in no-huge mode.
+ fast_tests = [
+ ['acl_autotest', true],
+ ['atomic_autotest', false],
+ ['bitops_autotest', true],
+ ['byteorder_autotest', true],
+ ['cksum_autotest', true],
+ ['cmdline_autotest', true],
+ ['common_autotest', true],
+ ['cpuflags_autotest', true],
+ ['debug_autotest', true],
+ ['eal_flags_c_opt_autotest', false],
+ ['eal_flags_main_opt_autotest', false],
+ ['eal_flags_n_opt_autotest', false],
+ ['eal_flags_hpet_autotest', false],
+ ['eal_flags_no_huge_autotest', false],
+ ['eal_flags_a_opt_autotest', false],
+ ['eal_flags_b_opt_autotest', false],
+ ['eal_flags_vdev_opt_autotest', false],
+ ['eal_flags_r_opt_autotest', false],
+ ['eal_flags_mem_autotest', false],
+ ['eal_flags_file_prefix_autotest', false],
+ ['eal_flags_misc_autotest', false],
+ ['eal_fs_autotest', true],
+ ['errno_autotest', true],
+ ['ethdev_link_status', true],
+ ['event_ring_autotest', true],
+ ['fib_autotest', true],
+ ['fib6_autotest', true],
+ ['func_reentrancy_autotest', false],
+ ['flow_classify_autotest', false],
+ ['hash_autotest', true],
+ ['interrupt_autotest', true],
+ ['ipfrag_autotest', false],
+ ['lcores_autotest', true],
+ ['logs_autotest', true],
+ ['lpm_autotest', true],
+ ['lpm6_autotest', true],
+ ['malloc_autotest', false],
+ ['mbuf_autotest', false],
+ ['mcslock_autotest', false],
+ ['memcpy_autotest', true],
+ ['memory_autotest', false],
+ ['mempool_autotest', false],
+ ['memzone_autotest', false],
+ ['meter_autotest', true],
+ ['multiprocess_autotest', false],
+ ['per_lcore_autotest', true],
+ ['pflock_autotest', true],
+ ['prefetch_autotest', true],
+ ['rcu_qsbr_autotest', true],
+ ['red_autotest', true],
+ ['rib_autotest', true],
+ ['rib6_autotest', true],
+ ['ring_autotest', true],
+ ['rwlock_test1_autotest', true],
+ ['rwlock_rda_autotest', true],
+ ['rwlock_rds_wrm_autotest', true],
+ ['rwlock_rde_wro_autotest', true],
+ ['sched_autotest', true],
+ ['security_autotest', false],
+ ['spinlock_autotest', true],
+ ['stack_autotest', false],
+ ['stack_lf_autotest', false],
+ ['string_autotest', true],
+ ['table_autotest', true],
+ ['tailq_autotest', true],
+ ['ticketlock_autotest', true],
+ ['timer_autotest', false],
+ ['user_delay_us', true],
+ ['version_autotest', true],
+ ['crc_autotest', true],
+ ['distributor_autotest', false],
+ ['eventdev_common_autotest', true],
+ ['fbarray_autotest', true],
+ ['hash_readwrite_func_autotest', false],
+ ['ipsec_autotest', true],
+ ['kni_autotest', false],
+ ['kvargs_autotest', true],
+ ['member_autotest', true],
+ ['metrics_autotest', true],
+ ['power_cpufreq_autotest', false],
+ ['power_autotest', true],
+ ['power_kvm_vm_autotest', false],
+ ['reorder_autotest', true],
+ ['service_autotest', true],
+ ['thash_autotest', true],
+ ['trace_autotest', true],
+ ]
+
+ perf_test_names = [
+ 'ring_perf_autotest',
+ 'mempool_perf_autotest',
+ 'memcpy_perf_autotest',
+ 'hash_perf_autotest',
+ 'timer_perf_autotest',
+ 'reciprocal_division',
+ 'reciprocal_division_perf',
+ 'lpm_perf_autotest',
+ 'rib_slow_autotest',
+ 'fib_slow_autotest',
+ 'fib_perf_autotest',
+ 'red_all',
+ 'barrier_autotest',
+ 'hash_multiwriter_autotest',
+ 'timer_racecond_autotest',
+ 'efd_autotest',
+ 'hash_functions_autotest',
+ 'member_perf_autotest',
+ 'efd_perf_autotest',
+ 'lpm6_perf_autotest',
+ 'rib6_slow_autotest',
+ 'fib6_slow_autotest',
+ 'fib6_perf_autotest',
+ 'rcu_qsbr_perf_autotest',
+ 'red_perf',
+ 'distributor_perf_autotest',
+ 'pmd_perf_autotest',
+ 'stack_perf_autotest',
+ 'stack_lf_perf_autotest',
+ 'rand_perf_autotest',
+ 'hash_readwrite_perf_autotest',
+ 'hash_readwrite_lf_perf_autotest',
+ 'trace_perf_autotest',
+ 'ipsec_perf_autotest',
+ ]
+
+ driver_test_names = [
+ 'cryptodev_aesni_mb_autotest',
+ 'cryptodev_aesni_gcm_autotest',
+ 'cryptodev_cn9k_autotest',
+ 'cryptodev_cn10k_autotest',
+ 'cryptodev_dpaa_sec_autotest',
+ 'cryptodev_dpaa2_sec_autotest',
+ 'cryptodev_null_autotest',
+ 'cryptodev_octeontx2_autotest',
+ 'cryptodev_openssl_autotest',
+ 'cryptodev_openssl_asym_autotest',
+ 'cryptodev_qat_autotest',
+ 'cryptodev_sw_armv8_autotest',
+ 'cryptodev_sw_kasumi_autotest',
+ 'cryptodev_sw_mvsam_autotest',
+ 'cryptodev_sw_snow3g_autotest',
+ 'cryptodev_sw_zuc_autotest',
+ 'eventdev_selftest_octeontx',
+ 'eventdev_selftest_sw',
+ 'rawdev_autotest',
+ ]
+
+ dump_test_names = [
+ 'dump_struct_sizes',
+ 'dump_mempool',
+ 'dump_malloc_stats',
+ 'dump_devargs',
+ 'dump_log_types',
+ 'dump_ring',
+ 'dump_physmem',
+ 'dump_memzone',
+ ]
+endif
# The following linkages are an exception to allow running the
# unit tests without requiring that the developer install the
@@ -362,7 +533,7 @@ endif
if dpdk_conf.has('RTE_EVENT_SKELETON')
test_deps += 'event_skeleton'
endif
-if dpdk_conf.has('RTE_LIB_TELEMETRY')
+if not(is_windows) and dpdk_conf.has('RTE_LIB_TELEMETRY')
test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
endif
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [dpdk-dev] [PATCH v2 12/13] app/test: replace .sh scripts with .py scripts
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 12/13] app/test: replace .sh scripts with .py scripts Jie Zhou
@ 2021-08-28 22:17 ` Dmitry Kozlyuk
2021-08-31 16:58 ` Jie Zhou
0 siblings, 1 reply; 245+ messages in thread
From: Dmitry Kozlyuk @ 2021-08-28 22:17 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
2021-08-18 10:13 (UTC-0700), Jie Zhou:
> - Add python scripts to get coremask and check hugepage config
> - Remove two corresponding .sh scripts
> - Replace calling of .sh with corresponding .py in meson.build
There are multiple violations of PEP8 in new files,
please run a formatter on them, e.g. "black" or "yapf".
I also suggest running "pylint" on those files.
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
> app/test/get-coremask.sh | 13 -------------
> app/test/get_coremask.py | 8 ++++++++
> app/test/has-hugepage.sh | 11 -----------
> app/test/has_hugepage.py | 41 ++++++++++++++++++++++++++++++++++++++++
> app/test/meson.build | 7 ++++---
> 5 files changed, 53 insertions(+), 27 deletions(-)
> delete mode 100755 app/test/get-coremask.sh
> create mode 100644 app/test/get_coremask.py
> delete mode 100755 app/test/has-hugepage.sh
> create mode 100644 app/test/has_hugepage.py
>
> diff --git a/app/test/get-coremask.sh b/app/test/get-coremask.sh
> deleted file mode 100755
> index bb8cf404d2..0000000000
> --- a/app/test/get-coremask.sh
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -#! /bin/sh -e
> -# SPDX-License-Identifier: BSD-3-Clause
> -# Copyright(c) 2019 Intel Corporation
> -
> -if [ "$(uname)" = "Linux" ] ; then
> - cat /sys/devices/system/cpu/present
> -elif [ "$(uname)" = "FreeBSD" ] ; then
> - ncpus=$(/sbin/sysctl -n hw.ncpu)
> - echo 0-$(expr $ncpus - 1)
> -else
> -# fallback
> - echo 0-3
> -fi
> diff --git a/app/test/get_coremask.py b/app/test/get_coremask.py
> new file mode 100644
> index 0000000000..3d0947e8ff
> --- /dev/null
> +++ b/app/test/get_coremask.py
> @@ -0,0 +1,8 @@
> +#! /usr/bin/env python3
> +# SPDX-License-Identifier: BSD-3-Clause
> +# Copyright (c) 2021 Microsoft Corporation
> +
> +import multiprocessing
> +
> +c = multiprocessing.cpu_count()
> +print("0-"+str(c-1))
Fallback case is lost, error handling missing.
Or is it intended for this script to fail fast?
> diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh
> deleted file mode 100755
> index d600fad319..0000000000
> --- a/app/test/has-hugepage.sh
> +++ /dev/null
> @@ -1,11 +0,0 @@
> -#! /bin/sh
> -# SPDX-License-Identifier: BSD-3-Clause
> -# Copyright 2020 Mellanox Technologies, Ltd
> -
> -if [ "$(uname)" = "Linux" ] ; then
> - cat /proc/sys/vm/nr_hugepages || echo 0
> -elif [ "$(uname)" = "FreeBSD" ] ; then
> - echo 1 # assume FreeBSD always has hugepages
> -else
> - echo 0
> -fi
> diff --git a/app/test/has_hugepage.py b/app/test/has_hugepage.py
> new file mode 100644
> index 0000000000..decf47df45
> --- /dev/null
> +++ b/app/test/has_hugepage.py
> @@ -0,0 +1,41 @@
> +#! /usr/bin/env python3
> +# SPDX-License-Identifier: BSD-3-Clause
> +# Copyright (c) 2021 Microsoft Corporation
> +
> +import os
> +import platform
> +
> +osName = platform.system()
> +if osName == "Linux":
> + file_o=open("/proc/sys/vm/nr_hugepages")
> + content=file_o.read()
> + print(content)
> + file_o.close()
> +elif osName == "FreeBSD":
> + # Assume FreeBSD always has hugepages enabled
> + print("1")
> +elif osName == "Windows":
> + # On Windows, check if the Administrator has "Lock pages in memory" security setting
> + # to determine if large page is enabled or not
This script is intended to check not whether there are sufficient privileges
but whether the system supports hugepages at all.
I suggest checking ctypes.windll.kernel32.GetLargePageMinimum() > 0.
> +
> + # Export the USER_RIGHTS security settings
> + # Use os.popen instead of os.system to suppress the output of secedit to stdout
> + userRightsfile = "userrights.inf"
> + os.popen('secedit /export /areas USER_RIGHTS /cfg "' + userRightsfile + '"')
> +
> + # Parse the exported user rights setting to determine if Administrator
> + # SeLockMemoryPrivilege being set or not
> + largepageEnabledStr = 'SeLockMemoryPrivilege = Administrator'
> + enabled = 0
> + # On different OS versions tested, the exported inf file has utf-16 encoding
> + with open(userRightsfile, encoding = 'utf-16') as f:
> + urcontent = f.readlines()
> + for line in urcontent:
> + if largepageEnabledStr in line:
> + enabled = 1
> + break
> +
> + f.close()
> + print(enabled)
> +else:
> + print("0")
> diff --git a/app/test/meson.build b/app/test/meson.build
> index a7611686ad..7240304916 100644
> --- a/app/test/meson.build
> +++ b/app/test/meson.build
> @@ -450,7 +450,7 @@ dpdk_test = executable('dpdk-test',
> driver_install_path),
> install: true)
>
> -has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
> +has_hugepage = run_command('has_hugepage.py').stdout().strip() != '0'
Python scripts should be called using `py3` variable,
see buildtools/ for examples.
> message('hugepage availability: @0@'.format(has_hugepage))
>
> # some perf tests (eg: memcpy perf autotest)take very long
> @@ -458,8 +458,9 @@ message('hugepage availability: @0@'.format(has_hugepage))
> timeout_seconds = 600
> timeout_seconds_fast = 10
>
> -get_coremask = find_program('get-coremask.sh')
> -num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip()
> +list_of_cores = run_command('get_coremask.py').stdout().strip()
> +message('list of cores: @0@'.format(list_of_cores))
> +num_cores_arg = '-l ' + list_of_cores
>
> default_test_args = [num_cores_arg]
>
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [dpdk-dev] [PATCH v2 13/13] app/test: enable subset of unit tests on Windows
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 13/13] app/test: enable subset of unit tests on Windows Jie Zhou
@ 2021-08-28 22:18 ` Dmitry Kozlyuk
2021-08-31 17:01 ` Jie Zhou
0 siblings, 1 reply; 245+ messages in thread
From: Dmitry Kozlyuk @ 2021-08-28 22:18 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
2021-08-18 10:13 (UTC-0700), Jie Zhou:
> In app/test/meson.build
> - Specify the subset of source files to compile on Windows
> - Specify the subset of tests to be enabled on Windows
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
> app/test/meson.build | 859 ++++++++++++++++++++++++++-----------------
> 1 file changed, 515 insertions(+), 344 deletions(-)
Commit messages should explain the reason for the change,
which itself is precisely described by the diff below.
For example, why these specific tests are selected?
Please don't create two lists, it will be hard to maintain.
> diff --git a/app/test/meson.build b/app/test/meson.build
> index 7240304916..1e77657510 100644
> --- a/app/test/meson.build
> +++ b/app/test/meson.build
[...]
> @@ -362,7 +533,7 @@ endif
> if dpdk_conf.has('RTE_EVENT_SKELETON')
> test_deps += 'event_skeleton'
> endif
> -if dpdk_conf.has('RTE_LIB_TELEMETRY')
> +if not(is_windows) and dpdk_conf.has('RTE_LIB_TELEMETRY')
> test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
> fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
> endif
"not" is not a function, "if not is_windows and ..." is the preferred style.
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [dpdk-dev] [PATCH v2 02/13] driver/mempool: build mempool stack on Windows
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 02/13] driver/mempool: build mempool stack on Windows Jie Zhou
@ 2021-08-28 22:43 ` Dmitry Kozlyuk
2021-08-31 17:06 ` Jie Zhou
0 siblings, 1 reply; 245+ messages in thread
From: Dmitry Kozlyuk @ 2021-08-28 22:43 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
2021-08-18 10:13 (UTC-0700), Jie Zhou:
> mempool_autotest failed on Windows at setting the "stack" handler
> test case. Per debugging, in rte_mempool_ops_table, there are only
> 6 ring ops registered, and no "stack" ops registered which caused
> the failure of rte_mempool_set_ops_byname and thus the test failed.
> Per code investigation, the "stack" ops are registered in
> rte_mempool_stack.c:
> MEMPOOL_REGISTER_OPS(ops_stack);
> MEMPOOL_REGISTER_OPS(ops_lf_stack);
>
> The reason these two ops are not registered is because currently
> driver\mempool\stack is not build on Windows. After building stack
> on Windows, the mempool_autotest now completed as pass.
>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
> drivers/mempool/stack/meson.build | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/mempool/stack/meson.build b/drivers/mempool/stack/meson.build
> index 371cf131b1..580dde79eb 100644
> --- a/drivers/mempool/stack/meson.build
> +++ b/drivers/mempool/stack/meson.build
> @@ -1,11 +1,6 @@
> # SPDX-License-Identifier: BSD-3-Clause
> # Copyright(c) 2017-2019 Intel Corporation
>
> -if is_windows
> - build = false
> - reason = 'not supported on Windows'
> -endif
> -
> sources = files('rte_mempool_stack.c')
>
> deps += ['stack']
1. The title should be "mempool/stack: build on Windows".
2. For the description it would be sufficient to say something like
"Mempool unit test requires mempool/stack to pass, enable this driver",
because the ops registration mechanism is standard in DPDK.
P.S. It is really the test that should skip disabled driver cases,
but mempool/ring and mempool/stack are very basic to DPDK,
so I believe just enabling the latter is OK.
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [dpdk-dev] [PATCH v2 03/13] eal/windows: return ENOTSUP for not supported API
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 03/13] eal/windows: return ENOTSUP for not supported API Jie Zhou
@ 2021-08-28 22:44 ` Dmitry Kozlyuk
0 siblings, 0 replies; 245+ messages in thread
From: Dmitry Kozlyuk @ 2021-08-28 22:44 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
2021-08-18 10:13 (UTC-0700), Jie Zhou:
> UT memory_autotest on Windows has 2 failed cases on eal APIs
> eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2
> APIs are not supported on Windows yet. Should return ENOTSUP such that
> in test_memory.c these 2 ENOTSUP cases will not be marked as failures,
> same as other ENOTSUP cases.
>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
> lib/eal/windows/eal_memalloc.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [dpdk-dev] [PATCH v2 12/13] app/test: replace .sh scripts with .py scripts
2021-08-28 22:17 ` Dmitry Kozlyuk
@ 2021-08-31 16:58 ` Jie Zhou
0 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-31 16:58 UTC (permalink / raw)
To: Dmitry Kozlyuk
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
On Sun, Aug 29, 2021 at 01:17:38AM +0300, Dmitry Kozlyuk wrote:
> 2021-08-18 10:13 (UTC-0700), Jie Zhou:
> > - Add python scripts to get coremask and check hugepage config
> > - Remove two corresponding .sh scripts
> > - Replace calling of .sh with corresponding .py in meson.build
>
> There are multiple violations of PEP8 in new files,
> please run a formatter on them, e.g. "black" or "yapf".
> I also suggest running "pylint" on those files.
>
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > ---
> > app/test/get-coremask.sh | 13 -------------
> > app/test/get_coremask.py | 8 ++++++++
> > app/test/has-hugepage.sh | 11 -----------
> > app/test/has_hugepage.py | 41 ++++++++++++++++++++++++++++++++++++++++
> > app/test/meson.build | 7 ++++---
> > 5 files changed, 53 insertions(+), 27 deletions(-)
> > delete mode 100755 app/test/get-coremask.sh
> > create mode 100644 app/test/get_coremask.py
> > delete mode 100755 app/test/has-hugepage.sh
> > create mode 100644 app/test/has_hugepage.py
> >
> > diff --git a/app/test/get-coremask.sh b/app/test/get-coremask.sh
> > deleted file mode 100755
> > index bb8cf404d2..0000000000
> > --- a/app/test/get-coremask.sh
> > +++ /dev/null
> > @@ -1,13 +0,0 @@
> > -#! /bin/sh -e
> > -# SPDX-License-Identifier: BSD-3-Clause
> > -# Copyright(c) 2019 Intel Corporation
> > -
> > -if [ "$(uname)" = "Linux" ] ; then
> > - cat /sys/devices/system/cpu/present
> > -elif [ "$(uname)" = "FreeBSD" ] ; then
> > - ncpus=$(/sbin/sysctl -n hw.ncpu)
> > - echo 0-$(expr $ncpus - 1)
> > -else
> > -# fallback
> > - echo 0-3
> > -fi
> > diff --git a/app/test/get_coremask.py b/app/test/get_coremask.py
> > new file mode 100644
> > index 0000000000..3d0947e8ff
> > --- /dev/null
> > +++ b/app/test/get_coremask.py
> > @@ -0,0 +1,8 @@
> > +#! /usr/bin/env python3
> > +# SPDX-License-Identifier: BSD-3-Clause
> > +# Copyright (c) 2021 Microsoft Corporation
> > +
> > +import multiprocessing
> > +
> > +c = multiprocessing.cpu_count()
> > +print("0-"+str(c-1))
>
> Fallback case is lost, error handling missing.
> Or is it intended for this script to fail fast?
>
> > diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh
> > deleted file mode 100755
> > index d600fad319..0000000000
> > --- a/app/test/has-hugepage.sh
> > +++ /dev/null
> > @@ -1,11 +0,0 @@
> > -#! /bin/sh
> > -# SPDX-License-Identifier: BSD-3-Clause
> > -# Copyright 2020 Mellanox Technologies, Ltd
> > -
> > -if [ "$(uname)" = "Linux" ] ; then
> > - cat /proc/sys/vm/nr_hugepages || echo 0
> > -elif [ "$(uname)" = "FreeBSD" ] ; then
> > - echo 1 # assume FreeBSD always has hugepages
> > -else
> > - echo 0
> > -fi
> > diff --git a/app/test/has_hugepage.py b/app/test/has_hugepage.py
> > new file mode 100644
> > index 0000000000..decf47df45
> > --- /dev/null
> > +++ b/app/test/has_hugepage.py
> > @@ -0,0 +1,41 @@
> > +#! /usr/bin/env python3
> > +# SPDX-License-Identifier: BSD-3-Clause
> > +# Copyright (c) 2021 Microsoft Corporation
> > +
> > +import os
> > +import platform
> > +
> > +osName = platform.system()
> > +if osName == "Linux":
> > + file_o=open("/proc/sys/vm/nr_hugepages")
> > + content=file_o.read()
> > + print(content)
> > + file_o.close()
> > +elif osName == "FreeBSD":
> > + # Assume FreeBSD always has hugepages enabled
> > + print("1")
> > +elif osName == "Windows":
> > + # On Windows, check if the Administrator has "Lock pages in memory" security setting
> > + # to determine if large page is enabled or not
>
> This script is intended to check not whether there are sufficient privileges
> but whether the system supports hugepages at all.
> I suggest checking ctypes.windll.kernel32.GetLargePageMinimum() > 0.
>
> > +
> > + # Export the USER_RIGHTS security settings
> > + # Use os.popen instead of os.system to suppress the output of secedit to stdout
> > + userRightsfile = "userrights.inf"
> > + os.popen('secedit /export /areas USER_RIGHTS /cfg "' + userRightsfile + '"')
> > +
> > + # Parse the exported user rights setting to determine if Administrator
> > + # SeLockMemoryPrivilege being set or not
> > + largepageEnabledStr = 'SeLockMemoryPrivilege = Administrator'
> > + enabled = 0
> > + # On different OS versions tested, the exported inf file has utf-16 encoding
> > + with open(userRightsfile, encoding = 'utf-16') as f:
> > + urcontent = f.readlines()
> > + for line in urcontent:
> > + if largepageEnabledStr in line:
> > + enabled = 1
> > + break
> > +
> > + f.close()
> > + print(enabled)
> > +else:
> > + print("0")
> > diff --git a/app/test/meson.build b/app/test/meson.build
> > index a7611686ad..7240304916 100644
> > --- a/app/test/meson.build
> > +++ b/app/test/meson.build
> > @@ -450,7 +450,7 @@ dpdk_test = executable('dpdk-test',
> > driver_install_path),
> > install: true)
> >
> > -has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
> > +has_hugepage = run_command('has_hugepage.py').stdout().strip() != '0'
>
> Python scripts should be called using `py3` variable,
> see buildtools/ for examples.
>
> > message('hugepage availability: @0@'.format(has_hugepage))
> >
> > # some perf tests (eg: memcpy perf autotest)take very long
> > @@ -458,8 +458,9 @@ message('hugepage availability: @0@'.format(has_hugepage))
> > timeout_seconds = 600
> > timeout_seconds_fast = 10
> >
> > -get_coremask = find_program('get-coremask.sh')
> > -num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip()
> > +list_of_cores = run_command('get_coremask.py').stdout().strip()
> > +message('list of cores: @0@'.format(list_of_cores))
> > +num_cores_arg = '-l ' + list_of_cores
> >
> > default_test_args = [num_cores_arg]
> >
Thanks Dmitry. Will address all the comments in V3.
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [dpdk-dev] [PATCH v2 13/13] app/test: enable subset of unit tests on Windows
2021-08-28 22:18 ` Dmitry Kozlyuk
@ 2021-08-31 17:01 ` Jie Zhou
2021-08-31 17:39 ` Dmitry Kozlyuk
0 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-08-31 17:01 UTC (permalink / raw)
To: Dmitry Kozlyuk
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
On Sun, Aug 29, 2021 at 01:18:12AM +0300, Dmitry Kozlyuk wrote:
> 2021-08-18 10:13 (UTC-0700), Jie Zhou:
> > In app/test/meson.build
> > - Specify the subset of source files to compile on Windows
> > - Specify the subset of tests to be enabled on Windows
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > ---
> > app/test/meson.build | 859 ++++++++++++++++++++++++++-----------------
> > 1 file changed, 515 insertions(+), 344 deletions(-)
>
> Commit messages should explain the reason for the change,
> which itself is precisely described by the diff below.
> For example, why these specific tests are selected?
>
> Please don't create two lists, it will be hard to maintain.
>
Since not all the libraries unit tests depend on are built on Windows yet, and not all unit tests are ported on Windows yet, what would be a proper way to have one list but only a subset of the list actually enabled on Windows? Thanks for any suggestions.
> > diff --git a/app/test/meson.build b/app/test/meson.build
> > index 7240304916..1e77657510 100644
> > --- a/app/test/meson.build
> > +++ b/app/test/meson.build
> [...]
> > @@ -362,7 +533,7 @@ endif
> > if dpdk_conf.has('RTE_EVENT_SKELETON')
> > test_deps += 'event_skeleton'
> > endif
> > -if dpdk_conf.has('RTE_LIB_TELEMETRY')
> > +if not(is_windows) and dpdk_conf.has('RTE_LIB_TELEMETRY')
> > test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
> > fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
> > endif
>
> "not" is not a function, "if not is_windows and ..." is the preferred style.
Will fix in V3.
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [dpdk-dev] [PATCH v2 02/13] driver/mempool: build mempool stack on Windows
2021-08-28 22:43 ` Dmitry Kozlyuk
@ 2021-08-31 17:06 ` Jie Zhou
0 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-08-31 17:06 UTC (permalink / raw)
To: Dmitry Kozlyuk
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
On Sun, Aug 29, 2021 at 01:43:13AM +0300, Dmitry Kozlyuk wrote:
> 2021-08-18 10:13 (UTC-0700), Jie Zhou:
> > mempool_autotest failed on Windows at setting the "stack" handler
> > test case. Per debugging, in rte_mempool_ops_table, there are only
> > 6 ring ops registered, and no "stack" ops registered which caused
> > the failure of rte_mempool_set_ops_byname and thus the test failed.
> > Per code investigation, the "stack" ops are registered in
> > rte_mempool_stack.c:
> > MEMPOOL_REGISTER_OPS(ops_stack);
> > MEMPOOL_REGISTER_OPS(ops_lf_stack);
> >
> > The reason these two ops are not registered is because currently
> > driver\mempool\stack is not build on Windows. After building stack
> > on Windows, the mempool_autotest now completed as pass.
> >
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > ---
> > drivers/mempool/stack/meson.build | 5 -----
> > 1 file changed, 5 deletions(-)
> >
> > diff --git a/drivers/mempool/stack/meson.build b/drivers/mempool/stack/meson.build
> > index 371cf131b1..580dde79eb 100644
> > --- a/drivers/mempool/stack/meson.build
> > +++ b/drivers/mempool/stack/meson.build
> > @@ -1,11 +1,6 @@
> > # SPDX-License-Identifier: BSD-3-Clause
> > # Copyright(c) 2017-2019 Intel Corporation
> >
> > -if is_windows
> > - build = false
> > - reason = 'not supported on Windows'
> > -endif
> > -
> > sources = files('rte_mempool_stack.c')
> >
> > deps += ['stack']
>
> 1. The title should be "mempool/stack: build on Windows".
>
> 2. For the description it would be sufficient to say something like
> "Mempool unit test requires mempool/stack to pass, enable this driver",
> because the ops registration mechanism is standard in DPDK.
>
> P.S. It is really the test that should skip disabled driver cases,
> but mempool/ring and mempool/stack are very basic to DPDK,
> so I believe just enabling the latter is OK.
Will reword the title and description in V3. Thanks.
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [dpdk-dev] [PATCH v2 13/13] app/test: enable subset of unit tests on Windows
2021-08-31 17:01 ` Jie Zhou
@ 2021-08-31 17:39 ` Dmitry Kozlyuk
0 siblings, 0 replies; 245+ messages in thread
From: Dmitry Kozlyuk @ 2021-08-31 17:39 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
2021-08-31 10:01 (UTC-0700), Jie Zhou:
> On Sun, Aug 29, 2021 at 01:18:12AM +0300, Dmitry Kozlyuk wrote:
> > 2021-08-18 10:13 (UTC-0700), Jie Zhou:
> > > In app/test/meson.build
> > > - Specify the subset of source files to compile on Windows
> > > - Specify the subset of tests to be enabled on Windows
> > > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > > ---
> > > app/test/meson.build | 859 ++++++++++++++++++++++++++-----------------
> > > 1 file changed, 515 insertions(+), 344 deletions(-)
> >
> > Commit messages should explain the reason for the change,
> > which itself is precisely described by the diff below.
> > For example, why these specific tests are selected?
> >
> > Please don't create two lists, it will be hard to maintain.
> >
> Since not all the libraries unit tests depend on are built on Windows yet, and not all unit tests are ported on Windows yet, what would be a proper way to have one list but only a subset of the list actually enabled on Windows? Thanks for any suggestions.
I would put all the common tests to the list first,
then extend the list depending on the platform.
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v3 00/13] app/test: enable subset of tests on Windows
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 00/13] app/test: enable subset of " Jie Zhou
` (12 preceding siblings ...)
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 13/13] app/test: enable subset of unit tests on Windows Jie Zhou
@ 2021-09-04 4:19 ` Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 01/13] lib: build libraries that some tests depend on Jie Zhou
` (13 more replies)
13 siblings, 14 replies; 245+ messages in thread
From: Jie Zhou @ 2021-09-04 4:19 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
This patchset is to enable a subset of unit tests on windows. It mainly includes:
- Enable building libraries on Windows that some tests depend on
- Replace POSIX specific codes
- Fix some lib and tests per failures investigation
- Replace .sh scripts with .py scripts for meson.build
- Enable build and run subset of unit tests on Windows
Future work:
- Work with CI/CD lab to onboard unit tests on Windows to catch regression
- Onboard more tests when more libraries are enabled on Windows
---
V2 changes:
- Fix compilation error on FreeBSD
- Fix email mismatch issue
- Add a missing space around "*"
---
V3 changes:
- Fix a misc c coding style issue
- Revise some commit title and message body
- Fix violations of PEP8 in new added Python scripts
- Add error handling in get_coremask.py
- Fix has_hugepage.py to check system support of hugepages
instead of checking privileges
- Fix test meson.build to run Python scripts using py3
- Consolidate lists of source files, test dep, etc. across all
platforms, with conditional extending on some platform(s)
---
Jie Zhou (13):
lib: build libraries that some tests depend on
mempool/stack: build on Windows
eal/windows: return ENOTSUP for not supported API
app/test: remove unnecessary headers
app/test: replace POSIX specific code
app/test: exclude ENOTSUP as failure
app/test: skip interrupt tests on Windows
app/test: temporarily "skip" one cmdline test case
app/test: skip two logs_autotest cases on Windows
app/test: differentiate a strerror on different OS
app/test: remove two alarm_autotest cases
app/test: replace .sh scripts with .py scripts
app/test: enable subset of unit tests on Windows
app/test/commands.c | 2 -
app/test/get-coremask.sh | 13 --
app/test/get_coremask.py | 12 +
app/test/has-hugepage.sh | 11 -
app/test/has_hugepage.py | 25 ++
app/test/meson.build | 368 ++++++++++++++++--------------
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +-
app/test/test.c | 5 +-
app/test/test_alarm.c | 4 +
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline.c | 2 +
app/test/test_cmdline_lib.c | 5 +-
app/test/test_crc.c | 1 -
app/test/test_errno.c | 12 +-
app/test/test_interrupts.c | 10 +
app/test/test_logs.c | 6 +-
app/test/test_memory.c | 5 +-
app/test/test_mp_secondary.c | 2 +
app/test/test_pmd_perf.c | 6 +-
app/test/test_ring_stress.c | 3 +-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_telemetry_data.c | 2 +
drivers/mempool/stack/meson.build | 5 -
lib/eal/common/eal_common_errno.c | 4 +
lib/eal/windows/eal_memalloc.c | 6 +-
lib/meson.build | 6 +
27 files changed, 302 insertions(+), 222 deletions(-)
delete mode 100755 app/test/get-coremask.sh
create mode 100644 app/test/get_coremask.py
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v3 01/13] lib: build libraries that some tests depend on
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 00/13] app/test: enable subset of " Jie Zhou
@ 2021-09-04 4:19 ` Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 02/13] mempool/stack: build on Windows Jie Zhou
` (12 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-09-04 4:19 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Enable building subset of libraries that tests depend on for Windows
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
lib/meson.build | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/meson.build b/lib/meson.build
index 1673ca4323..f109d6987d 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -81,10 +81,16 @@ if is_windows
'timer',
'bitratestats',
'cfgfile',
+ 'efd',
'gro',
'gso',
+ 'ip_frag',
'latencystats',
+ 'lpm',
'pdump',
+ 'rib',
+ 'reorder',
+ 'stack',
] # only supported libraries for windows
endif
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v3 02/13] mempool/stack: build on Windows
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 00/13] app/test: enable subset of " Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 01/13] lib: build libraries that some tests depend on Jie Zhou
@ 2021-09-04 4:19 ` Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 03/13] eal/windows: return ENOTSUP for not supported API Jie Zhou
` (11 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-09-04 4:19 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Enable mempool/stack on Windows since mempool unit test depends
on this driver.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
drivers/mempool/stack/meson.build | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/mempool/stack/meson.build b/drivers/mempool/stack/meson.build
index 371cf131b1..580dde79eb 100644
--- a/drivers/mempool/stack/meson.build
+++ b/drivers/mempool/stack/meson.build
@@ -1,11 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017-2019 Intel Corporation
-if is_windows
- build = false
- reason = 'not supported on Windows'
-endif
-
sources = files('rte_mempool_stack.c')
deps += ['stack']
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v3 03/13] eal/windows: return ENOTSUP for not supported API
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 00/13] app/test: enable subset of " Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 01/13] lib: build libraries that some tests depend on Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 02/13] mempool/stack: build on Windows Jie Zhou
@ 2021-09-04 4:19 ` Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 04/13] app/test: remove unnecessary headers Jie Zhou
` (10 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-09-04 4:19 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
UT memory_autotest on Windows has 2 failed cases on eal APIs
eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2
APIs are not supported on Windows yet. Should return ENOTSUP such that
in test_memory.c these 2 ENOTSUP cases will not be marked as failures,
same as other ENOTSUP cases.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
lib/eal/windows/eal_memalloc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/eal/windows/eal_memalloc.c b/lib/eal/windows/eal_memalloc.c
index 4459d59b1a..fffdd5b976 100644
--- a/lib/eal/windows/eal_memalloc.c
+++ b/lib/eal/windows/eal_memalloc.c
@@ -17,7 +17,7 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
RTE_SET_USED(list_idx);
RTE_SET_USED(seg_idx);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
@@ -28,7 +28,7 @@ eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
RTE_SET_USED(seg_idx);
RTE_SET_USED(offset);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
static int
@@ -433,7 +433,7 @@ eal_memalloc_sync_with_primary(void)
{
/* No multi-process support. */
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v3 04/13] app/test: remove unnecessary headers
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 00/13] app/test: enable subset of " Jie Zhou
` (2 preceding siblings ...)
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 03/13] eal/windows: return ENOTSUP for not supported API Jie Zhou
@ 2021-09-04 4:19 ` Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 05/13] app/test: replace POSIX specific code Jie Zhou
` (9 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-09-04 4:19 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Remove unnecessary header inclusion
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/commands.c | 2 --
app/test/test.c | 1 -
app/test/test_cmdline_lib.c | 1 -
3 files changed, 4 deletions(-)
diff --git a/app/test/commands.c b/app/test/commands.c
index 76f6ee5d23..82bd8bf474 100644
--- a/app/test/commands.c
+++ b/app/test/commands.c
@@ -8,8 +8,6 @@
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
-#include <netinet/in.h>
-#include <termios.h>
#include <inttypes.h>
#include <errno.h>
#include <sys/queue.h>
diff --git a/app/test/test.c b/app/test/test.c
index 173d202e47..52fac24213 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index d5a09b4541..86a5b78d70 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v3 05/13] app/test: replace POSIX specific code
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 00/13] app/test: enable subset of " Jie Zhou
` (3 preceding siblings ...)
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 04/13] app/test: remove unnecessary headers Jie Zhou
@ 2021-09-04 4:19 ` Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 06/13] app/test: exclude ENOTSUP as failure Jie Zhou
` (8 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-09-04 4:19 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Include rte_os_shim.h
- Replace sleep and usleep with rte_delay_us_sleep
- #ifndef RTE_EXEC_ENV_WINDOWS for POSIX code only
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +++-
app/test/test.c | 4 ++++
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline.c | 2 ++
app/test/test_crc.c | 1 -
app/test/test_mp_secondary.c | 2 ++
app/test/test_pmd_perf.c | 6 +++++-
app/test/test_ring_stress.c | 3 ++-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_telemetry_data.c | 2 ++
11 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index 0fd7290b0e..2da4106ad6 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -5,6 +5,7 @@
#include <rte_byteorder.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
+#include <rte_os_shim.h>
#include "packet_burst_generator.h"
diff --git a/app/test/process.h b/app/test/process.h
index 5b10cf64df..1f073b9c5c 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -7,12 +7,14 @@
#include <errno.h> /* errno */
#include <limits.h> /* PATH_MAX */
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <libgen.h> /* basename et al */
+#include <sys/wait.h>
+#endif
#include <stdlib.h> /* NULL */
#include <string.h> /* strerror */
#include <unistd.h> /* readlink */
#include <dirent.h>
-#include <sys/wait.h>
#include <rte_string_fns.h> /* strlcpy */
diff --git a/app/test/test.c b/app/test/test.c
index 52fac24213..e8f8ce8335 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -62,7 +62,9 @@ do_recursive_call(void)
const char *env_var;
int (*action_fn)(void);
} actions[] = {
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "run_secondary_instances", test_mp_secondary },
+#endif
#ifdef RTE_LIB_PDUMP
#ifdef RTE_NET_RING
{ "run_pdump_server_tests", test_pdump },
@@ -81,7 +83,9 @@ do_recursive_call(void)
{ "test_file_prefix", no_action },
{ "test_no_huge_flag", no_action },
#ifdef RTE_LIB_TIMER
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "timer_secondary_spawn_wait", test_timer_secondary },
+#endif
#endif
};
diff --git a/app/test/test_byteorder.c b/app/test/test_byteorder.c
index 03c08d9abf..de14ed539e 100644
--- a/app/test/test_byteorder.c
+++ b/app/test/test_byteorder.c
@@ -46,7 +46,7 @@ test_byteorder(void)
return -1;
res_u16 = rte_bswap16(0x1337);
- printf("const %"PRIx16" -> %"PRIx16"\n", 0x1337, res_u16);
+ printf("const %"PRIx16" -> %"PRIx16"\n", (uint16_t)0x1337, res_u16);
if (res_u16 != 0x3713)
return -1;
diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c
index 115bee966d..9a76bd299f 100644
--- a/app/test/test_cmdline.c
+++ b/app/test/test_cmdline.c
@@ -31,6 +31,7 @@ test_cmdline(void)
return -1;
if (test_parse_num_invalid_param() < 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
printf("Testing parsing IP addresses...\n");
if (test_parse_ipaddr_valid() < 0)
return -1;
@@ -38,6 +39,7 @@ test_cmdline(void)
return -1;
if (test_parse_ipaddr_invalid_param() < 0)
return -1;
+#endif
printf("Testing parsing strings...\n");
if (test_parse_string_valid() < 0)
return -1;
diff --git a/app/test/test_crc.c b/app/test/test_crc.c
index bf1d344359..0ed080e482 100644
--- a/app/test/test_crc.c
+++ b/app/test/test_crc.c
@@ -14,7 +14,6 @@
#define CRC32_VEC_LEN2 348
#define CRC16_VEC_LEN1 12
#define CRC16_VEC_LEN2 2
-#define LINE_LEN 75
/* CRC test vector */
static const uint8_t crc_vec[CRC_VEC_LEN] = {
diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c
index 5b6f05dbb1..da035348bd 100644
--- a/app/test/test_mp_secondary.c
+++ b/app/test/test_mp_secondary.c
@@ -14,7 +14,9 @@
#include <errno.h>
#include <string.h>
#include <unistd.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/wait.h>
+#endif
#include <libgen.h>
#include <dirent.h>
#include <limits.h>
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 3a248d512c..8698d24eac 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -298,6 +298,7 @@ reset_count(void)
idle = 0;
}
+#ifndef RTE_EXEC_ENV_WINDOWS
static void
stats_display(uint16_t port_id)
{
@@ -327,6 +328,7 @@ signal_handler(int signum)
if (signum == SIGUSR2)
stats_display(0);
}
+#endif
struct rte_mbuf **tx_burst;
@@ -638,7 +640,7 @@ exec_burst(uint32_t flags, int lcore)
i = (i >= conf->nb_ports - 1) ? 0 : (i + 1);
}
- sleep(5);
+ rte_delay_us(5 * US_PER_S);
/* only when polling second */
if (flags == SC_BURST_XMIT_FIRST)
@@ -669,8 +671,10 @@ test_pmd_perf(void)
printf("Start PMD RXTX cycles cost test.\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
signal(SIGUSR1, signal_handler);
signal(SIGUSR2, signal_handler);
+#endif
nb_ports = rte_eth_dev_count_avail();
if (nb_ports < NB_ETHPORTS_USED) {
diff --git a/app/test/test_ring_stress.c b/app/test/test_ring_stress.c
index 1af45e0fc8..ce3535c6b2 100644
--- a/app/test/test_ring_stress.c
+++ b/app/test/test_ring_stress.c
@@ -43,9 +43,10 @@ test_ring_stress(void)
n += test_ring_rts_stress.nb_case;
k += run_test(&test_ring_rts_stress);
+#ifndef RTE_EXEC_ENV_WINDOWS
n += test_ring_hts_stress.nb_case;
k += run_test(&test_ring_hts_stress);
-
+#endif
n += test_ring_mt_peek_stress.nb_case;
k += run_test(&test_ring_mt_peek_stress);
diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h
index f9ca63b908..feb4b96ea1 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -359,7 +359,7 @@ test_mt1(int (*test)(void *))
wrk_cmd = WRK_CMD_RUN;
rte_smp_wmb();
- usleep(run_time * US_PER_S);
+ rte_delay_us(run_time * US_PER_S);
/* signal worker to start test */
wrk_cmd = WRK_CMD_STOP;
diff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c
index f34d691265..a0450337ea 100644
--- a/app/test/test_telemetry_data.c
+++ b/app/test/test_telemetry_data.c
@@ -4,7 +4,9 @@
#include <string.h>
#include <sys/socket.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/un.h>
+#endif
#include <unistd.h>
#include <limits.h>
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v3 06/13] app/test: exclude ENOTSUP as failure
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 00/13] app/test: enable subset of " Jie Zhou
` (4 preceding siblings ...)
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 05/13] app/test: replace POSIX specific code Jie Zhou
@ 2021-09-04 4:19 ` Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 07/13] app/test: skip interrupt tests on Windows Jie Zhou
` (7 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-09-04 4:19 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Check rte_errno to exclude ENOTSUP as failures in test_memory.c
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_memory.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index 7d5ae99bab..6f4fc02c03 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -9,6 +9,7 @@
#include <rte_memory.h>
#include <rte_common.h>
#include <rte_memzone.h>
+#include <rte_errno.h>
#include "test.h"
@@ -53,7 +54,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
/* ENOTSUP means segment is valid, but there is not support for
* segment fd API (e.g. on FreeBSD).
*/
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
/* all other errors are treated as failures */
return -1;
@@ -62,7 +63,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
/* we're able to get memseg fd - try getting its offset */
ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
if (ret < 0) {
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
return -1;
}
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v3 07/13] app/test: skip interrupt tests on Windows
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 00/13] app/test: enable subset of " Jie Zhou
` (5 preceding siblings ...)
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 06/13] app/test: exclude ENOTSUP as failure Jie Zhou
@ 2021-09-04 4:19 ` Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 08/13] app/test: temporarily "skip" one cmdline test case Jie Zhou
` (6 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-09-04 4:19 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Even though test_interrupts.c can compile on Windows, skip interrupt
tests for now since majority of eal_interrupt on Windows are stubs.
Will remove the skip after interrupt being fully enabled on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_interrupts.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
index 233b14a70b..ab52362e01 100644
--- a/app/test/test_interrupts.c
+++ b/app/test/test_interrupts.c
@@ -12,6 +12,15 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_interrupt(void)
+{
+ printf("Interrupt on Windows is not fully supported yet, skipping test\n");
+ return TEST_SKIPPED;
+}
+#else
+
#define TEST_INTERRUPT_CHECK_INTERVAL 100 /* ms */
/* predefined interrupt handle types */
@@ -558,5 +567,6 @@ test_interrupt(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v3 08/13] app/test: temporarily "skip" one cmdline test case
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 00/13] app/test: enable subset of " Jie Zhou
` (6 preceding siblings ...)
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 07/13] app/test: skip interrupt tests on Windows Jie Zhou
@ 2021-09-04 4:19 ` Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 09/13] app/test: skip two logs_autotest cases on Windows Jie Zhou
` (5 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-09-04 4:19 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
cmdline tests pass except one failure at the test_cmdline_socket_fns
test case with error: failed to open /dev/null for reading!
Temporarily "skip" this case while enable all other passing cases.
Issue is tracked internally and will add the corresponding case on
Windows in future.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_cmdline_lib.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index 86a5b78d70..1ff5c0d7e6 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -140,6 +140,9 @@ test_cmdline_vt100_fns(void)
static int
test_cmdline_socket_fns(void)
{
+#ifdef RTE_EXEC_ENV_WINDOWS
+ return 0;
+#else
cmdline_parse_ctx_t ctx;
struct cmdline *cl;
@@ -179,6 +182,7 @@ test_cmdline_socket_fns(void)
printf("Error: function accepted null parameter!\n");
cmdline_free(cl);
return -1;
+#endif
}
static int
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v3 09/13] app/test: skip two logs_autotest cases on Windows
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 00/13] app/test: enable subset of " Jie Zhou
` (7 preceding siblings ...)
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 08/13] app/test: temporarily "skip" one cmdline test case Jie Zhou
@ 2021-09-04 4:19 ` Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 10/13] app/test: differentiate a strerror on different OS Jie Zhou
` (4 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-09-04 4:19 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
DPDK logs_autotest on Windows failed at "dynamic log types" tests.
The failures are on 2 test cases for rte_log_set_level_regexp API,
due to regular expression is not supported on Windows in DPDK yet
and regcomp/regexec are just stubs on Windows (in regex.h).
In app\test\test_logs.c, ifndef these two test cases, and for the
rte_log_set_level_pattern validation case following these two cases,
differentiate the expected log level passed into macro CHECK_LEVELS
Now logs_autotest completes for all dynamic log types and static log types.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_logs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/test/test_logs.c b/app/test/test_logs.c
index 7abb6eeca2..7c001c1ab3 100644
--- a/app/test/test_logs.c
+++ b/app/test/test_logs.c
@@ -113,6 +113,7 @@ test_logs(void)
rte_log_set_level(logtype1, RTE_LOG_ERR);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#ifndef RTE_EXEC_ENV_WINDOWS
rte_log_set_level_regexp("type$", RTE_LOG_EMERG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
@@ -121,7 +122,10 @@ test_logs(void)
rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_EMERG, RTE_LOG_EMERG);
-
+#else
+ ret = rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
+ CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#endif
/* set logtype level low to so we can test global level */
rte_log_set_level_pattern("logtype*", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_DEBUG, RTE_LOG_DEBUG, RTE_LOG_DEBUG);
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v3 10/13] app/test: differentiate a strerror on different OS
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 00/13] app/test: enable subset of " Jie Zhou
` (8 preceding siblings ...)
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 09/13] app/test: skip two logs_autotest cases on Windows Jie Zhou
@ 2021-09-04 4:19 ` Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 11/13] app/test: remove two alarm_autotest cases Jie Zhou
` (3 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-09-04 4:19 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
On Windows, strerror returns just "Unknown error" for errnum greater
than MAX_ERRNO, while linux and freebsd returns "Unknown error <num>",
which is the current expectation for errno_autotest. Differentiate
the error string on Windows to remove a "duplicate error code" failure.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_errno.c | 12 +++++++++++-
lib/eal/common/eal_common_errno.c | 4 ++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/app/test/test_errno.c b/app/test/test_errno.c
index 3ff0456a58..0db4fbc8b3 100644
--- a/app/test/test_errno.c
+++ b/app/test/test_errno.c
@@ -18,13 +18,19 @@ test_errno(void)
{
const char *rte_retval;
const char *libc_retval;
+
+#ifndef RTE_EXEC_ENV_WINDOWS
#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD has a colon in the string, unlike linux */
const char unknown_code_result[] = "Unknown error: %d";
#else
const char unknown_code_result[] = "Unknown error %d";
#endif
- char expected_libc_retval[sizeof(unknown_code_result)+3];
+ char expected_libc_retval[sizeof(unknown_code_result) + 3];
+#else
+ /* Windows doesn't return error number for error greater than MAX_errno*/
+ static const char expected_libc_retval[] = "Unknown error";
+#endif
/* use a small selection of standard errors for testing */
int std_errs[] = {EAGAIN, EBADF, EACCES, EINTR, EINVAL};
@@ -54,11 +60,13 @@ test_errno(void)
rte_retval, libc_retval);
if (strcmp(rte_retval, libc_retval) == 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
/* generate appropriate error string for unknown error number
* and then check that this is what we got back. If not, we have
* a duplicate error number that conflicts with errno.h */
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, rte_errs[i]);
+#endif
if ((strcmp(expected_libc_retval, libc_retval) != 0) &&
(strcmp("", libc_retval) != 0)){
printf("Error, duplicate error code %d\n", rte_errs[i]);
@@ -69,8 +77,10 @@ test_errno(void)
/* ensure that beyond RTE_MAX_ERRNO, we always get an unknown code */
rte_retval = rte_strerror(RTE_MAX_ERRNO + 1);
libc_retval = strerror(RTE_MAX_ERRNO + 1);
+#ifndef RTE_EXEC_ENV_WINDOWS
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, RTE_MAX_ERRNO + 1);
+#endif
printf("rte_strerror: '%s', strerror: '%s'\n",
rte_retval, libc_retval);
if ((strcmp(rte_retval, libc_retval) != 0) ||
diff --git a/lib/eal/common/eal_common_errno.c b/lib/eal/common/eal_common_errno.c
index f86802705a..4c4abb802e 100644
--- a/lib/eal/common/eal_common_errno.c
+++ b/lib/eal/common/eal_common_errno.c
@@ -37,7 +37,11 @@ rte_strerror(int errnum)
/* since some implementations of strerror_r throw an error
* themselves if errnum is too big, we handle that case here */
if (errnum >= RTE_MAX_ERRNO)
+#ifdef RTE_EXEC_ENV_WINDOWS
+ snprintf(ret, RETVAL_SZ, "Unknown error%s", sep);
+#else
snprintf(ret, RETVAL_SZ, "Unknown error%s %d", sep, errnum);
+#endif
else
switch (errnum){
case E_RTE_SECONDARY:
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v3 11/13] app/test: remove two alarm_autotest cases
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 00/13] app/test: enable subset of " Jie Zhou
` (9 preceding siblings ...)
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 10/13] app/test: differentiate a strerror on different OS Jie Zhou
@ 2021-09-04 4:19 ` Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 12/13] app/test: replace .sh scripts with .py scripts Jie Zhou
` (2 subsequent siblings)
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-09-04 4:19 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Remove two alarm_autotest test cases which do bogus range check
on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_alarm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_alarm.c b/app/test/test_alarm.c
index b4034339b8..70e97a3109 100644
--- a/app/test/test_alarm.c
+++ b/app/test/test_alarm.c
@@ -10,6 +10,7 @@
#include "test.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
static volatile int flag;
static void
@@ -18,6 +19,7 @@ test_alarm_callback(void *cb_arg)
flag = 1;
printf("Callback setting flag - OK. [cb_arg = %p]\n", cb_arg);
}
+#endif
static int
test_alarm(void)
@@ -27,6 +29,7 @@ test_alarm(void)
return 0;
#endif
+#ifndef RTE_EXEC_ENV_WINDOWS
/* check if it will fail to set alarm with wrong us value */
printf("check if it will fail to set alarm with wrong ms values\n");
if (rte_eal_alarm_set(0, test_alarm_callback,
@@ -39,6 +42,7 @@ test_alarm(void)
printf("should not be successful with (UINT64_MAX-1) us value\n");
return -1;
}
+#endif
/* check if it will fail to set alarm with null callback parameter */
printf("check if it will fail to set alarm with null callback parameter\n");
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v3 12/13] app/test: replace .sh scripts with .py scripts
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 00/13] app/test: enable subset of " Jie Zhou
` (10 preceding siblings ...)
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 11/13] app/test: remove two alarm_autotest cases Jie Zhou
@ 2021-09-04 4:19 ` Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 13/13] app/test: enable subset of unit tests on Windows Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 00/12] app/test: enable subset of " Jie Zhou
13 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-09-04 4:19 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Add python script to get coremask
- Add python script to check if system supports hugepages
- Remove two corresponding .sh scripts
- Replace calling of .sh with corresponding .py in meson.build
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/get-coremask.sh | 13 -------------
app/test/get_coremask.py | 12 ++++++++++++
app/test/has-hugepage.sh | 11 -----------
app/test/has_hugepage.py | 25 +++++++++++++++++++++++++
app/test/meson.build | 7 ++++---
5 files changed, 41 insertions(+), 27 deletions(-)
delete mode 100755 app/test/get-coremask.sh
create mode 100644 app/test/get_coremask.py
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
diff --git a/app/test/get-coremask.sh b/app/test/get-coremask.sh
deleted file mode 100755
index bb8cf404d2..0000000000
--- a/app/test/get-coremask.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#! /bin/sh -e
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2019 Intel Corporation
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /sys/devices/system/cpu/present
-elif [ "$(uname)" = "FreeBSD" ] ; then
- ncpus=$(/sbin/sysctl -n hw.ncpu)
- echo 0-$(expr $ncpus - 1)
-else
-# fallback
- echo 0-3
-fi
diff --git a/app/test/get_coremask.py b/app/test/get_coremask.py
new file mode 100644
index 0000000000..13939bcf78
--- /dev/null
+++ b/app/test/get_coremask.py
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2021 Microsoft Corporation
+"""This script returns the system cpu range"""
+
+import multiprocessing
+
+cpucount = multiprocessing.cpu_count()
+if cpucount is None:
+ # use fallback cpu count
+ print("0-3")
+else:
+ print("0-" + str(cpucount - 1))
diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh
deleted file mode 100755
index d600fad319..0000000000
--- a/app/test/has-hugepage.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright 2020 Mellanox Technologies, Ltd
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /proc/sys/vm/nr_hugepages || echo 0
-elif [ "$(uname)" = "FreeBSD" ] ; then
- echo 1 # assume FreeBSD always has hugepages
-else
- echo 0
-fi
diff --git a/app/test/has_hugepage.py b/app/test/has_hugepage.py
new file mode 100644
index 0000000000..70107c61fd
--- /dev/null
+++ b/app/test/has_hugepage.py
@@ -0,0 +1,25 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2021 Microsoft Corporation
+"""This script checks if the system supports huge pages"""
+
+import platform
+import ctypes
+
+osName = platform.system()
+if osName == "Linux":
+ with open("/proc/sys/vm/nr_hugepages") as file_o:
+ content = file_o.read()
+ print(content)
+elif osName == "FreeBSD":
+ # Assume FreeBSD always has hugepages enabled
+ print("1")
+elif osName == "Windows":
+ # On Windows, determine if large page is supported based on the
+ # value returned by GetLargePageMinimum. If the return value is zero,
+ # the processor does not support large pages.
+ if ctypes.windll.kernel32.GetLargePageMinimum() > 0:
+ print("1")
+ else:
+ print("0")
+else:
+ print("0")
diff --git a/app/test/meson.build b/app/test/meson.build
index a7611686ad..6960cad80b 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -450,7 +450,7 @@ dpdk_test = executable('dpdk-test',
driver_install_path),
install: true)
-has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
+has_hugepage = run_command(py3, 'has_hugepage.py').stdout().strip() != '0'
message('hugepage availability: @0@'.format(has_hugepage))
# some perf tests (eg: memcpy perf autotest)take very long
@@ -458,8 +458,9 @@ message('hugepage availability: @0@'.format(has_hugepage))
timeout_seconds = 600
timeout_seconds_fast = 10
-get_coremask = find_program('get-coremask.sh')
-num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip()
+list_of_cores = run_command(py3, 'get_coremask.py').stdout().strip()
+message('list of cores: @0@'.format(list_of_cores))
+num_cores_arg = '-l ' + list_of_cores
default_test_args = [num_cores_arg]
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v3 13/13] app/test: enable subset of unit tests on Windows
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 00/13] app/test: enable subset of " Jie Zhou
` (11 preceding siblings ...)
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 12/13] app/test: replace .sh scripts with .py scripts Jie Zhou
@ 2021-09-04 4:19 ` Jie Zhou
2021-09-07 13:43 ` Aaron Conole
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 00/12] app/test: enable subset of " Jie Zhou
13 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-09-04 4:19 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Enable a subset of unit tests on Windows. Currently not all the
dependencies (e.g. libraries and some functionalities) of all unit
tests are supported on Windows yet.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/meson.build | 361 ++++++++++++++++++++++---------------------
1 file changed, 188 insertions(+), 173 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index 6960cad80b..108995db21 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,12 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if is_windows
- build = false
- reason = 'not supported on Windows'
- subdir_done()
-endif
-
if not get_option('tests')
subdir_done()
endif
@@ -15,19 +9,15 @@ test_sources = files(
'commands.c',
'packet_burst_generator.c',
'test.c',
- 'test_acl.c',
'test_alarm.c',
'test_atomic.c',
'test_barrier.c',
'test_bitops.c',
'test_bitmap.c',
- 'test_bpf.c',
'test_byteorder.c',
- 'test_cksum.c',
'test_cmdline.c',
'test_cmdline_cirbuf.c',
'test_cmdline_etheraddr.c',
- 'test_cmdline_ipaddr.c',
'test_cmdline_lib.c',
'test_cmdline_num.c',
'test_cmdline_portlist.c',
@@ -35,60 +25,21 @@ test_sources = files(
'test_common.c',
'test_cpuflags.c',
'test_crc.c',
- 'test_cryptodev.c',
- 'test_cryptodev_asym.c',
- 'test_cryptodev_blockcipher.c',
- 'test_cryptodev_security_pdcp.c',
'test_cycles.c',
- 'test_debug.c',
- 'test_distributor.c',
- 'test_distributor_perf.c',
- 'test_eal_flags.c',
- 'test_eal_fs.c',
- 'test_efd.c',
- 'test_efd_perf.c',
'test_errno.c',
'test_ethdev_link.c',
- 'test_event_crypto_adapter.c',
- 'test_event_eth_rx_adapter.c',
- 'test_event_ring.c',
- 'test_event_timer_adapter.c',
- 'test_eventdev.c',
- 'test_external_mem.c',
'test_fbarray.c',
- 'test_fib.c',
- 'test_fib_perf.c',
- 'test_fib6.c',
- 'test_fib6_perf.c',
'test_func_reentrancy.c',
- 'test_flow_classify.c',
- 'test_graph.c',
- 'test_graph_perf.c',
'test_hash.c',
'test_hash_functions.c',
'test_hash_multiwriter.c',
'test_hash_readwrite.c',
- 'test_hash_perf.c',
'test_hash_readwrite_lf_perf.c',
'test_interrupts.c',
- 'test_ipfrag.c',
- 'test_ipsec.c',
- 'test_ipsec_sad.c',
- 'test_ipsec_perf.c',
- 'test_kni.c',
'test_kvargs.c',
- 'test_lcores.c',
'test_logs.c',
'test_lpm.c',
- 'test_lpm6.c',
- 'test_lpm6_perf.c',
- 'test_lpm_perf.c',
- 'test_malloc.c',
- 'test_mbuf.c',
- 'test_member.c',
- 'test_member_perf.c',
'test_memcpy.c',
- 'test_memcpy_perf.c',
'test_memory.c',
'test_mempool.c',
'test_mempool_perf.c',
@@ -96,27 +47,20 @@ test_sources = files(
'test_meter.c',
'test_metrics.c',
'test_mcslock.c',
- 'test_mp_secondary.c',
'test_per_lcore.c',
- 'test_pflock.c',
'test_pmd_perf.c',
'test_power.c',
'test_power_cpufreq.c',
'test_power_kvm_vm.c',
'test_prefetch.c',
'test_rand_perf.c',
- 'test_rawdev.c',
'test_rcu_qsbr.c',
'test_rcu_qsbr_perf.c',
- 'test_reciprocal_division.c',
- 'test_reciprocal_division_perf.c',
- 'test_red.c',
'test_reorder.c',
'test_rib.c',
'test_rib6.c',
'test_ring.c',
'test_ring_mpmc_stress.c',
- 'test_ring_hts_stress.c',
'test_ring_mt_peek_stress.c',
'test_ring_mt_peek_stress_zc.c',
'test_ring_perf.c',
@@ -125,27 +69,17 @@ test_sources = files(
'test_ring_st_peek_stress_zc.c',
'test_ring_stress.c',
'test_rwlock.c',
- 'test_sched.c',
- 'test_security.c',
'test_service_cores.c',
'test_spinlock.c',
'test_stack.c',
'test_stack_perf.c',
'test_string_fns.c',
- 'test_table.c',
- 'test_table_acl.c',
- 'test_table_combined.c',
- 'test_table_pipeline.c',
- 'test_table_ports.c',
- 'test_table_tables.c',
'test_tailq.c',
'test_thash.c',
'test_timer.c',
'test_timer_perf.c',
'test_timer_racecond.c',
- 'test_timer_secondary.c',
'test_ticketlock.c',
- 'test_trace.c',
'test_trace_register.c',
'test_trace_perf.c',
'test_version.c',
@@ -153,36 +87,21 @@ test_sources = files(
)
test_deps = [
- 'acl',
'bus_pci',
'bus_vdev',
'bitratestats',
- 'bpf',
'cfgfile',
'cmdline',
- 'cryptodev',
- 'distributor',
'efd',
'ethdev',
- 'eventdev',
- 'fib',
- 'flow_classify',
- 'graph',
'hash',
- 'ipsec',
'latencystats',
'lpm',
- 'member',
'metrics',
- 'node',
- 'pipeline',
- 'port',
- 'rawdev',
'rcu',
'reorder',
'rib',
'ring',
- 'security',
'stack',
'telemetry',
'timer',
@@ -191,56 +110,25 @@ test_deps = [
# Each test is marked with flag true/false
# to indicate whether it can run in no-huge mode.
fast_tests = [
- ['acl_autotest', true],
- ['atomic_autotest', false],
['bitops_autotest', true],
['byteorder_autotest', true],
- ['cksum_autotest', true],
['cmdline_autotest', true],
['common_autotest', true],
['cpuflags_autotest', true],
- ['debug_autotest', true],
- ['eal_flags_c_opt_autotest', false],
- ['eal_flags_main_opt_autotest', false],
- ['eal_flags_n_opt_autotest', false],
- ['eal_flags_hpet_autotest', false],
- ['eal_flags_no_huge_autotest', false],
- ['eal_flags_a_opt_autotest', false],
- ['eal_flags_b_opt_autotest', false],
- ['eal_flags_vdev_opt_autotest', false],
- ['eal_flags_r_opt_autotest', false],
- ['eal_flags_mem_autotest', false],
- ['eal_flags_file_prefix_autotest', false],
- ['eal_flags_misc_autotest', false],
- ['eal_fs_autotest', true],
['errno_autotest', true],
['ethdev_link_status', true],
- ['event_ring_autotest', true],
- ['fib_autotest', true],
- ['fib6_autotest', true],
- ['func_reentrancy_autotest', false],
- ['flow_classify_autotest', false],
['hash_autotest', true],
['interrupt_autotest', true],
- ['ipfrag_autotest', false],
- ['lcores_autotest', true],
['logs_autotest', true],
['lpm_autotest', true],
- ['lpm6_autotest', true],
- ['malloc_autotest', false],
- ['mbuf_autotest', false],
['mcslock_autotest', false],
- ['memcpy_autotest', true],
['memory_autotest', false],
['mempool_autotest', false],
['memzone_autotest', false],
['meter_autotest', true],
- ['multiprocess_autotest', false],
['per_lcore_autotest', true],
- ['pflock_autotest', true],
['prefetch_autotest', true],
['rcu_qsbr_autotest', true],
- ['red_autotest', true],
['rib_autotest', true],
['rib6_autotest', true],
['ring_autotest', true],
@@ -248,64 +136,32 @@ fast_tests = [
['rwlock_rda_autotest', true],
['rwlock_rds_wrm_autotest', true],
['rwlock_rde_wro_autotest', true],
- ['sched_autotest', true],
- ['security_autotest', false],
['spinlock_autotest', true],
['stack_autotest', false],
['stack_lf_autotest', false],
['string_autotest', true],
- ['table_autotest', true],
['tailq_autotest', true],
['ticketlock_autotest', true],
- ['timer_autotest', false],
['user_delay_us', true],
['version_autotest', true],
['crc_autotest', true],
- ['distributor_autotest', false],
- ['eventdev_common_autotest', true],
['fbarray_autotest', true],
['hash_readwrite_func_autotest', false],
- ['ipsec_autotest', true],
- ['kni_autotest', false],
['kvargs_autotest', true],
- ['member_autotest', true],
['metrics_autotest', true],
- ['power_cpufreq_autotest', false],
- ['power_autotest', true],
- ['power_kvm_vm_autotest', false],
['reorder_autotest', true],
['service_autotest', true],
['thash_autotest', true],
- ['trace_autotest', true],
]
perf_test_names = [
'ring_perf_autotest',
- 'mempool_perf_autotest',
- 'memcpy_perf_autotest',
- 'hash_perf_autotest',
'timer_perf_autotest',
- 'reciprocal_division',
- 'reciprocal_division_perf',
- 'lpm_perf_autotest',
'rib_slow_autotest',
- 'fib_slow_autotest',
- 'fib_perf_autotest',
- 'red_all',
'barrier_autotest',
'hash_multiwriter_autotest',
'timer_racecond_autotest',
- 'efd_autotest',
'hash_functions_autotest',
- 'member_perf_autotest',
- 'efd_perf_autotest',
- 'lpm6_perf_autotest',
- 'rib6_slow_autotest',
- 'fib6_slow_autotest',
- 'fib6_perf_autotest',
- 'rcu_qsbr_perf_autotest',
- 'red_perf',
- 'distributor_perf_autotest',
'pmd_perf_autotest',
'stack_perf_autotest',
'stack_lf_perf_autotest',
@@ -313,42 +169,201 @@ perf_test_names = [
'hash_readwrite_perf_autotest',
'hash_readwrite_lf_perf_autotest',
'trace_perf_autotest',
- 'ipsec_perf_autotest',
]
driver_test_names = [
- 'cryptodev_aesni_mb_autotest',
- 'cryptodev_aesni_gcm_autotest',
- 'cryptodev_cn9k_autotest',
- 'cryptodev_cn10k_autotest',
- 'cryptodev_dpaa_sec_autotest',
- 'cryptodev_dpaa2_sec_autotest',
- 'cryptodev_null_autotest',
- 'cryptodev_octeontx2_autotest',
- 'cryptodev_openssl_autotest',
- 'cryptodev_openssl_asym_autotest',
- 'cryptodev_qat_autotest',
- 'cryptodev_sw_armv8_autotest',
- 'cryptodev_sw_kasumi_autotest',
- 'cryptodev_sw_mvsam_autotest',
- 'cryptodev_sw_snow3g_autotest',
- 'cryptodev_sw_zuc_autotest',
- 'eventdev_selftest_octeontx',
- 'eventdev_selftest_sw',
- 'rawdev_autotest',
]
dump_test_names = [
- 'dump_struct_sizes',
- 'dump_mempool',
- 'dump_malloc_stats',
- 'dump_devargs',
- 'dump_log_types',
- 'dump_ring',
- 'dump_physmem',
- 'dump_memzone',
]
+if not is_windows
+ test_sources += files(
+ 'test_acl.c',
+ 'test_bpf.c',
+ 'test_cksum.c',
+ 'test_cmdline_ipaddr.c',
+ 'test_cryptodev.c',
+ 'test_cryptodev_asym.c',
+ 'test_cryptodev_blockcipher.c',
+ 'test_cryptodev_security_pdcp.c',
+ 'test_debug.c',
+ 'test_distributor.c',
+ 'test_distributor_perf.c',
+ 'test_eal_flags.c',
+ 'test_eal_fs.c',
+ 'test_efd.c',
+ 'test_efd_perf.c',
+ 'test_event_crypto_adapter.c',
+ 'test_event_eth_rx_adapter.c',
+ 'test_event_ring.c',
+ 'test_event_timer_adapter.c',
+ 'test_eventdev.c',
+ 'test_external_mem.c',
+ 'test_fib.c',
+ 'test_fib_perf.c',
+ 'test_fib6.c',
+ 'test_fib6_perf.c',
+ 'test_flow_classify.c',
+ 'test_graph.c',
+ 'test_graph_perf.c',
+ 'test_hash_perf.c',
+ 'test_ipfrag.c',
+ 'test_ipsec.c',
+ 'test_ipsec_sad.c',
+ 'test_ipsec_perf.c',
+ 'test_kni.c',
+ 'test_lcores.c',
+ 'test_lpm6.c',
+ 'test_lpm6_perf.c',
+ 'test_lpm_perf.c',
+ 'test_malloc.c',
+ 'test_mbuf.c',
+ 'test_member.c',
+ 'test_member_perf.c',
+ 'test_memcpy_perf.c',
+ 'test_mp_secondary.c',
+ 'test_pflock.c',
+ 'test_rawdev.c',
+ 'test_reciprocal_division.c',
+ 'test_reciprocal_division_perf.c',
+ 'test_red.c',
+ 'test_ring_hts_stress.c',
+ 'test_sched.c',
+ 'test_security.c',
+ 'test_table.c',
+ 'test_table_acl.c',
+ 'test_table_combined.c',
+ 'test_table_pipeline.c',
+ 'test_table_ports.c',
+ 'test_table_tables.c',
+ 'test_timer_secondary.c',
+ 'test_trace.c',
+ )
+
+ test_deps += [
+ 'acl',
+ 'bpf',
+ 'cryptodev',
+ 'distributor',
+ 'eventdev',
+ 'fib',
+ 'flow_classify',
+ 'graph',
+ 'ipsec',
+ 'member',
+ 'node',
+ 'pipeline',
+ 'port',
+ 'rawdev',
+ 'security',
+ ]
+
+ fast_tests += [
+ ['atomic_autotest', true],
+ ['acl_autotest', true],
+ ['cksum_autotest', true],
+ ['debug_autotest', true],
+ ['eal_flags_c_opt_autotest', false],
+ ['eal_flags_main_opt_autotest', false],
+ ['eal_flags_n_opt_autotest', false],
+ ['eal_flags_hpet_autotest', false],
+ ['eal_flags_no_huge_autotest', false],
+ ['eal_flags_a_opt_autotest', false],
+ ['eal_flags_b_opt_autotest', false],
+ ['eal_flags_vdev_opt_autotest', false],
+ ['eal_flags_r_opt_autotest', false],
+ ['eal_flags_mem_autotest', false],
+ ['eal_flags_file_prefix_autotest', false],
+ ['eal_flags_misc_autotest', false],
+ ['eal_fs_autotest', true],
+ ['event_ring_autotest', true],
+ ['fib_autotest', true],
+ ['fib6_autotest', true],
+ ['func_reentrancy_autotest', false],
+ ['flow_classify_autotest', false],
+ ['ipfrag_autotest', false],
+ ['lcores_autotest', true],
+ ['lpm6_autotest', true],
+ ['malloc_autotest', false],
+ ['mbuf_autotest', false],
+ ['memcopy_autotest', true],
+ ['multiprocess_autotest', false],
+ ['pflock_autotest', true],
+ ['red_autotest', true],
+ ['sched_autotest', true],
+ ['security_autotest', false],
+ ['table_autotest', true],
+ ['timer_autotest', false],
+ ['distributor_autotest', false],
+ ['eventdev_common_autotest', true],
+ ['ipsec_autotest', true],
+ ['kni_autotest', false],
+ ['member_autotest', true],
+ ['power_cpufreq_autotest', false],
+ ['power_autotest', true],
+ ['power_kvm_vm_autotest', false],
+ ['trace_autotest', true],
+ ]
+
+ perf_test_names += [
+ 'mempool_perf_autotest',
+ 'memcpy_perf_autotest',
+ 'hash_perf_autotest',
+ 'reciprocal_division',
+ 'reciprocal_division_perf',
+ 'lpm_perf_autotest',
+ 'fib_slow_autotest',
+ 'fib_perf_autotest',
+ 'red_all',
+ 'efd_autotest',
+ 'hash_functions_autotest',
+ 'member_perf_autotest',
+ 'efd_perf_autotest',
+ 'lpm6_perf_autotest',
+ 'rib6_slow_autotest',
+ 'fib6_slow_autotest',
+ 'fib6_perf_autotest',
+ 'rcu_qsbr_perf_autotest',
+ 'red_perf',
+ 'distributor_perf_autotest',
+ 'ipsec_perf_autotest',
+ ]
+
+ driver_test_names += [
+ 'cryptodev_aesni_mb_autotest',
+ 'cryptodev_aesni_gcm_autotest',
+ 'cryptodev_cn9k_autotest',
+ 'cryptodev_cn10k_autotest',
+ 'cryptodev_dpaa_sec_autotest',
+ 'cryptodev_dpaa2_sec_autotest',
+ 'cryptodev_null_autotest',
+ 'cryptodev_octeontx2_autotest',
+ 'cryptodev_openssl_autotest',
+ 'cryptodev_openssl_asym_autotest',
+ 'cryptodev_qat_autotest',
+ 'cryptodev_sw_armv8_autotest',
+ 'cryptodev_sw_kasumi_autotest',
+ 'cryptodev_sw_mvsam_autotest',
+ 'cryptodev_sw_snow3g_autotest',
+ 'cryptodev_sw_zuc_autotest',
+ 'eventdev_selftest_octeontx',
+ 'eventdev_selftest_sw',
+ 'rawdev_autotest',
+ ]
+
+ dump_test_names += [
+ 'dump_struct_sizes',
+ 'dump_mempool',
+ 'dump_malloc_stats',
+ 'dump_devargs',
+ 'dump_log_types',
+ 'dump_ring',
+ 'dump_physmem',
+ 'dump_memzone',
+ ]
+endif
+
# The following linkages are an exception to allow running the
# unit tests without requiring that the developer install the
# DPDK libraries. Explicit linkage of drivers (plugin libraries)
@@ -362,7 +377,7 @@ endif
if dpdk_conf.has('RTE_EVENT_SKELETON')
test_deps += 'event_skeleton'
endif
-if dpdk_conf.has('RTE_LIB_TELEMETRY')
+if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
endif
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [dpdk-dev] [PATCH v3 13/13] app/test: enable subset of unit tests on Windows
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 13/13] app/test: enable subset of unit tests on Windows Jie Zhou
@ 2021-09-07 13:43 ` Aaron Conole
2021-09-08 22:14 ` Jie Zhou
0 siblings, 1 reply; 245+ messages in thread
From: Aaron Conole @ 2021-09-07 13:43 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas
Jie Zhou <jizh@linux.microsoft.com> writes:
> Enable a subset of unit tests on Windows. Currently not all the
> dependencies (e.g. libraries and some functionalities) of all unit
> tests are supported on Windows yet.
>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
Hi Jie,
How is it expected that a developer will add unit tests here? For
example, let's pretend I develop some new test. Do I insert it into the
non-windows section or the 'all' section? Will it ever be moved common
(for example, do windows development team aim to provide some additional
test / review cycles for new tests added)? This have some implication
on how developers need to add tests - maybe there can be a documented
process for getting code more common (between windows / linux /
freebsd)?
-Aaron
PS: I would suggest a possible route is to update to the doc proposed in
http://patches.dpdk.org/project/dpdk/patch/20210714164047.511561-1-aconole@redhat.com/
but it still isn't merged.
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [dpdk-dev] [PATCH v3 13/13] app/test: enable subset of unit tests on Windows
2021-09-07 13:43 ` Aaron Conole
@ 2021-09-08 22:14 ` Jie Zhou
2021-09-23 7:35 ` Dmitry Kozlyuk
0 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-09-08 22:14 UTC (permalink / raw)
To: Aaron Conole
Cc: dev, dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas
On Tue, Sep 07, 2021 at 09:43:56AM -0400, Aaron Conole wrote:
> Jie Zhou <jizh@linux.microsoft.com> writes:
>
> > Enable a subset of unit tests on Windows. Currently not all the
> > dependencies (e.g. libraries and some functionalities) of all unit
> > tests are supported on Windows yet.
> >
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > ---
>
> Hi Jie,
>
> How is it expected that a developer will add unit tests here? For
> example, let's pretend I develop some new test. Do I insert it into the
> non-windows section or the 'all' section? Will it ever be moved common
> (for example, do windows development team aim to provide some additional
> test / review cycles for new tests added)? This have some implication
> on how developers need to add tests - maybe there can be a documented
> process for getting code more common (between windows / linux /
> freebsd)?
>
> -Aaron
>
> PS: I would suggest a possible route is to update to the doc proposed in
> http://patches.dpdk.org/project/dpdk/patch/20210714164047.511561-1-aconole@redhat.com/
> but it still isn't merged.
Thank you Aaron for bringing up this great question! Totally agree that we need some discussion on what is the expectation for onboarding new unit tests from different OS teams. For new tests that definitely missing supports on certain OS(s), should it be authored in a way for across all OSs but skip not supported ones at the beginning? Or just onboard for supported OS thus only add to the non-windows section for example, and later DPDK Windows team move it to common section after porting? I will bring this up in DPDK Windows Community meeting and discuss there first. Yes, we should update the doc (after your change merged) on the process once reaching some agreement.
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [dpdk-dev] [PATCH v3 13/13] app/test: enable subset of unit tests on Windows
2021-09-08 22:14 ` Jie Zhou
@ 2021-09-23 7:35 ` Dmitry Kozlyuk
2021-09-30 23:57 ` Jie Zhou
0 siblings, 1 reply; 245+ messages in thread
From: Dmitry Kozlyuk @ 2021-09-23 7:35 UTC (permalink / raw)
To: Jie Zhou, Aaron Conole
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas
2021-09-08 15:14 (UTC-0700), Jie Zhou:
> On Tue, Sep 07, 2021 at 09:43:56AM -0400, Aaron Conole wrote:
> > Jie Zhou <jizh@linux.microsoft.com> writes:
> >
> > > Enable a subset of unit tests on Windows. Currently not all the
> > > dependencies (e.g. libraries and some functionalities) of all unit
> > > tests are supported on Windows yet.
> > >
> > > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > > ---
> >
> > Hi Jie,
> >
> > How is it expected that a developer will add unit tests here? For
> > example, let's pretend I develop some new test. Do I insert it into the
> > non-windows section or the 'all' section? Will it ever be moved common
> > (for example, do windows development team aim to provide some additional
> > test / review cycles for new tests added)? This have some implication
> > on how developers need to add tests - maybe there can be a documented
> > process for getting code more common (between windows / linux /
> > freebsd)?
> >
> > -Aaron
> >
> > PS: I would suggest a possible route is to update to the doc proposed in
> > http://patches.dpdk.org/project/dpdk/patch/20210714164047.511561-1-aconole@redhat.com/
> > but it still isn't merged.
>
> Thank you Aaron for bringing up this great question! Totally agree that we need some discussion on what is the expectation for onboarding new unit tests from different OS teams. For new tests that definitely missing supports on certain OS(s), should it be authored in a way for across all OSs but skip not supported ones at the beginning? Or just onboard for supported OS thus only add to the non-windows section for example, and later DPDK Windows team move it to common section after porting? I will bring this up in DPDK Windows Community meeting and discuss there first. Yes, we should update the doc (after your change merged) on the process once reaching some agreement.
Hi Aaron, Jie,
Currently tests that should not run on certain platforms are disabled with
#ifdef. This has an advantage that these tests mark themselves as skipped.
There are no principal objections against this approach instead of many lists.
Many tests files will need to be modified, but only mechanically.
New tests for generic features should be cross-platform by default; why not?
An exception I can think of is EAL that may implement some new API only for
one OS. In this case the best we can do is to make sure the test code is not
inherently bound to some OS. This is something we can document. For example,
it should use <rte_ip.h> instead of including Unix network headers directly.
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [dpdk-dev] [PATCH v3 13/13] app/test: enable subset of unit tests on Windows
2021-09-23 7:35 ` Dmitry Kozlyuk
@ 2021-09-30 23:57 ` Jie Zhou
0 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-09-30 23:57 UTC (permalink / raw)
To: Dmitry Kozlyuk
Cc: Aaron Conole, dev, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas
On Thu, Sep 23, 2021 at 10:35:37AM +0300, Dmitry Kozlyuk wrote:
> 2021-09-08 15:14 (UTC-0700), Jie Zhou:
> > On Tue, Sep 07, 2021 at 09:43:56AM -0400, Aaron Conole wrote:
> > > Jie Zhou <jizh@linux.microsoft.com> writes:
> > >
> > > > Enable a subset of unit tests on Windows. Currently not all the
> > > > dependencies (e.g. libraries and some functionalities) of all unit
> > > > tests are supported on Windows yet.
> > > >
> > > > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > > > ---
> > >
> > > Hi Jie,
> > >
> > > How is it expected that a developer will add unit tests here? For
> > > example, let's pretend I develop some new test. Do I insert it into the
> > > non-windows section or the 'all' section? Will it ever be moved common
> > > (for example, do windows development team aim to provide some additional
> > > test / review cycles for new tests added)? This have some implication
> > > on how developers need to add tests - maybe there can be a documented
> > > process for getting code more common (between windows / linux /
> > > freebsd)?
> > >
> > > -Aaron
> > >
> > > PS: I would suggest a possible route is to update to the doc proposed in
> > > http://patches.dpdk.org/project/dpdk/patch/20210714164047.511561-1-aconole@redhat.com/
> > > but it still isn't merged.
> >
> > Thank you Aaron for bringing up this great question! Totally agree that we need some discussion on what is the expectation for onboarding new unit tests from different OS teams. For new tests that definitely missing supports on certain OS(s), should it be authored in a way for across all OSs but skip not supported ones at the beginning? Or just onboard for supported OS thus only add to the non-windows section for example, and later DPDK Windows team move it to common section after porting? I will bring this up in DPDK Windows Community meeting and discuss there first. Yes, we should update the doc (after your change merged) on the process once reaching some agreement.
>
> Hi Aaron, Jie,
>
> Currently tests that should not run on certain platforms are disabled with
> #ifdef. This has an advantage that these tests mark themselves as skipped.
> There are no principal objections against this approach instead of many lists.
> Many tests files will need to be modified, but only mechanically.
>
> New tests for generic features should be cross-platform by default; why not?
> An exception I can think of is EAL that may implement some new API only for
> one OS. In this case the best we can do is to make sure the test code is not
> inherently bound to some OS. This is something we can document. For example,
> it should use <rte_ip.h> instead of including Unix network headers directly.
Thank you Dmitry. I will address this in V4 to use consolidated lists across all platforms. Aaron, please let me know if any other comments or concerns I can address together in V4. Thanks.
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v4 00/12] app/test: enable subset of tests on Windows
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 00/13] app/test: enable subset of " Jie Zhou
` (12 preceding siblings ...)
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 13/13] app/test: enable subset of unit tests on Windows Jie Zhou
@ 2021-10-14 3:30 ` Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 01/12] lib: build libraries that some tests depend on Jie Zhou
` (12 more replies)
13 siblings, 13 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 3:30 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
This patchset is to enable a subset of unit tests on windows. It mainly includes:
- Enable building libraries on Windows that some tests depend on
- Replace POSIX specific codes
- Fix some lib and tests per failures investigation
- Replace .sh scripts with .py scripts for meson.build
- Enable build and run subset of unit tests on Windows
Future work:
- Work with CI/CD lab to onboard unit tests on Windows to catch regression
- Onboard more tests when more libraries are enabled on Windows
---
V2 changes:
- Fix compilation error on FreeBSD
- Fix email mismatch issue
- Add a missing space around "*"
---
V3 changes:
- Fix a misc c coding style issue
- Revise some commit title and message body
- Fix violations of PEP8 in new added Python scripts
- Add error handling in get_coremask.py
- Fix has_hugepage.py to check system support of hugepages
instead of checking privileges
- Fix test meson.build to run Python scripts using py3
- Consolidate lists of source files, test dep, etc. across all
platforms, with conditional extending on some platform(s)
---
V4 changes:
- Remove building of ip_frag, rib, and reorder libraries on Windows.
These three libs usually can be built on Windows without change.
However, in between the time of V3 and V4, there is regression in
upstream caused build failures of these three libs. Will separately
investigate and enable these libraries.
- Remove previous patch#2 (Enable mempool/stack on Windows) from this
patchset as it was separated out and merged as patch-19314.
- Consolidate the source files, deps, tests lists across platforms as
much as possible.
Jie Zhou (12):
lib: build libraries that some tests depend on
eal/windows: return ENOTSUP for not supported API
app/test: remove unnecessary headers
app/test: replace POSIX specific code
app/test: exclude ENOTSUP as failure
app/test: skip interrupt tests on Windows
app/test: temporarily "skip" one cmdline test case
app/test: skip two logs_autotest cases on Windows
app/test: differentiate a strerror on different OS
app/test: remove two alarm_autotest cases
app/test: replace .sh scripts with .py scripts
app/test: enable subset of unit tests on Windows
app/test/commands.c | 2 -
app/test/get-coremask.sh | 13 ---
app/test/get_coremask.py | 12 +++
app/test/has-hugepage.sh | 11 ---
app/test/has_hugepage.py | 25 +++++
app/test/meson.build | 114 ++++++++++++-----------
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +-
app/test/test.c | 5 +-
app/test/test_acl.c | 12 +++
app/test/test_alarm.c | 4 +
app/test/test_bpf.c | 15 ++-
app/test/test_byteorder.c | 2 +-
app/test/test_cksum.c | 12 +++
app/test/test_cmdline.c | 2 +
app/test/test_cmdline_ipaddr.c | 5 +
app/test/test_cmdline_lib.c | 5 +-
app/test/test_crc.c | 1 -
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 | 97 +++++++++++++++++++
app/test/test_eal_fs.c | 12 +++
app/test/test_efd.c | 12 +++
app/test/test_efd_perf.c | 12 +++
app/test/test_errno.c | 12 ++-
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 | 17 +++-
app/test/test_fib.c | 22 ++++-
app/test/test_fib6.c | 23 ++++-
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 | 12 +++
app/test/test_graph.c | 18 +++-
app/test/test_graph_perf.c | 16 +++-
app/test/test_hash_perf.c | 12 +++
app/test/test_interrupts.c | 10 ++
app/test/test_ipfrag.c | 16 +++-
app/test/test_ipsec.c | 15 ++-
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 | 12 +++
app/test/test_logs.c | 6 +-
app/test/test_lpm6.c | 14 ++-
app/test/test_lpm6_perf.c | 13 +++
app/test/test_lpm_perf.c | 12 +++
app/test/test_malloc.c | 17 +++-
app/test/test_mbuf.c | 13 ++-
app/test/test_member.c | 16 +++-
app/test/test_member_perf.c | 16 +++-
app/test/test_memcpy_perf.c | 18 +++-
app/test/test_memory.c | 3 +-
app/test/test_mempool_perf.c | 12 +++
app/test/test_mp_secondary.c | 13 +++
app/test/test_pmd_perf.c | 6 +-
app/test/test_rawdev.c | 17 +++-
app/test/test_rcu_qsbr_perf.c | 12 +++
app/test/test_reciprocal_division.c | 12 +++
app/test/test_reciprocal_division_perf.c | 12 +++
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_ring_stress.c | 3 +-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_sched.c | 14 ++-
app/test/test_security.c | 16 +++-
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_telemetry_data.c | 2 +
app/test/test_timer_secondary.c | 13 +++
app/test/test_trace.c | 32 ++++++-
lib/eal/common/eal_common_errno.c | 4 +
lib/eal/windows/eal_memalloc.c | 6 +-
lib/meson.build | 2 +
91 files changed, 1084 insertions(+), 155 deletions(-)
delete mode 100755 app/test/get-coremask.sh
create mode 100644 app/test/get_coremask.py
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v4 01/12] lib: build libraries that some tests depend on
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 00/12] app/test: enable subset of " Jie Zhou
@ 2021-10-14 3:30 ` Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 02/12] eal/windows: return ENOTSUP for not supported API Jie Zhou
` (11 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 3:30 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Enable building subset of libraries that tests depend on for Windows
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
lib/meson.build | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/meson.build b/lib/meson.build
index b2ba7258d8..bd6c27deef 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -82,9 +82,11 @@ if is_windows
'bitratestats',
'cryptodev',
'cfgfile',
+ 'efd',
'gro',
'gso',
'latencystats',
+ 'lpm',
'pdump',
'stack',
'security',
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v4 02/12] eal/windows: return ENOTSUP for not supported API
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 00/12] app/test: enable subset of " Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 01/12] lib: build libraries that some tests depend on Jie Zhou
@ 2021-10-14 3:30 ` Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 03/12] app/test: remove unnecessary headers Jie Zhou
` (10 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 3:30 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
UT memory_autotest on Windows has 2 failed cases on eal APIs
eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2
APIs are not supported on Windows yet. Should return ENOTSUP such that
in test_memory.c these 2 ENOTSUP cases will not be marked as failures,
same as other ENOTSUP cases.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
lib/eal/windows/eal_memalloc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/eal/windows/eal_memalloc.c b/lib/eal/windows/eal_memalloc.c
index 4459d59b1a..fffdd5b976 100644
--- a/lib/eal/windows/eal_memalloc.c
+++ b/lib/eal/windows/eal_memalloc.c
@@ -17,7 +17,7 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
RTE_SET_USED(list_idx);
RTE_SET_USED(seg_idx);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
@@ -28,7 +28,7 @@ eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
RTE_SET_USED(seg_idx);
RTE_SET_USED(offset);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
static int
@@ -433,7 +433,7 @@ eal_memalloc_sync_with_primary(void)
{
/* No multi-process support. */
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v4 03/12] app/test: remove unnecessary headers
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 00/12] app/test: enable subset of " Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 01/12] lib: build libraries that some tests depend on Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 02/12] eal/windows: return ENOTSUP for not supported API Jie Zhou
@ 2021-10-14 3:30 ` Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 04/12] app/test: replace POSIX specific code Jie Zhou
` (9 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 3:30 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Remove unnecessary header inclusion
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/commands.c | 2 --
app/test/test.c | 1 -
app/test/test_cmdline_lib.c | 1 -
3 files changed, 4 deletions(-)
diff --git a/app/test/commands.c b/app/test/commands.c
index 76f6ee5d23..82bd8bf474 100644
--- a/app/test/commands.c
+++ b/app/test/commands.c
@@ -8,8 +8,6 @@
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
-#include <netinet/in.h>
-#include <termios.h>
#include <inttypes.h>
#include <errno.h>
#include <sys/queue.h>
diff --git a/app/test/test.c b/app/test/test.c
index 173d202e47..52fac24213 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index d5a09b4541..86a5b78d70 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v4 04/12] app/test: replace POSIX specific code
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 00/12] app/test: enable subset of " Jie Zhou
` (2 preceding siblings ...)
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 03/12] app/test: remove unnecessary headers Jie Zhou
@ 2021-10-14 3:30 ` Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 05/12] app/test: exclude ENOTSUP as failure Jie Zhou
` (8 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 3:30 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Include rte_os_shim.h
- Replace sleep and usleep with rte_delay_us_sleep
- #ifndef RTE_EXEC_ENV_WINDOWS for POSIX code only
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +++-
app/test/test.c | 4 ++++
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline.c | 2 ++
app/test/test_crc.c | 1 -
app/test/test_mp_secondary.c | 2 ++
app/test/test_pmd_perf.c | 6 +++++-
app/test/test_ring_stress.c | 3 ++-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_telemetry_data.c | 2 ++
11 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index 8ac24577ba..6b42b9b83b 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -5,6 +5,7 @@
#include <rte_byteorder.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
+#include <rte_os_shim.h>
#include "packet_burst_generator.h"
diff --git a/app/test/process.h b/app/test/process.h
index 5b10cf64df..1f073b9c5c 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -7,12 +7,14 @@
#include <errno.h> /* errno */
#include <limits.h> /* PATH_MAX */
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <libgen.h> /* basename et al */
+#include <sys/wait.h>
+#endif
#include <stdlib.h> /* NULL */
#include <string.h> /* strerror */
#include <unistd.h> /* readlink */
#include <dirent.h>
-#include <sys/wait.h>
#include <rte_string_fns.h> /* strlcpy */
diff --git a/app/test/test.c b/app/test/test.c
index 52fac24213..e8f8ce8335 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -62,7 +62,9 @@ do_recursive_call(void)
const char *env_var;
int (*action_fn)(void);
} actions[] = {
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "run_secondary_instances", test_mp_secondary },
+#endif
#ifdef RTE_LIB_PDUMP
#ifdef RTE_NET_RING
{ "run_pdump_server_tests", test_pdump },
@@ -81,7 +83,9 @@ do_recursive_call(void)
{ "test_file_prefix", no_action },
{ "test_no_huge_flag", no_action },
#ifdef RTE_LIB_TIMER
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "timer_secondary_spawn_wait", test_timer_secondary },
+#endif
#endif
};
diff --git a/app/test/test_byteorder.c b/app/test/test_byteorder.c
index 03c08d9abf..de14ed539e 100644
--- a/app/test/test_byteorder.c
+++ b/app/test/test_byteorder.c
@@ -46,7 +46,7 @@ test_byteorder(void)
return -1;
res_u16 = rte_bswap16(0x1337);
- printf("const %"PRIx16" -> %"PRIx16"\n", 0x1337, res_u16);
+ printf("const %"PRIx16" -> %"PRIx16"\n", (uint16_t)0x1337, res_u16);
if (res_u16 != 0x3713)
return -1;
diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c
index 115bee966d..9a76bd299f 100644
--- a/app/test/test_cmdline.c
+++ b/app/test/test_cmdline.c
@@ -31,6 +31,7 @@ test_cmdline(void)
return -1;
if (test_parse_num_invalid_param() < 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
printf("Testing parsing IP addresses...\n");
if (test_parse_ipaddr_valid() < 0)
return -1;
@@ -38,6 +39,7 @@ test_cmdline(void)
return -1;
if (test_parse_ipaddr_invalid_param() < 0)
return -1;
+#endif
printf("Testing parsing strings...\n");
if (test_parse_string_valid() < 0)
return -1;
diff --git a/app/test/test_crc.c b/app/test/test_crc.c
index bf1d344359..0ed080e482 100644
--- a/app/test/test_crc.c
+++ b/app/test/test_crc.c
@@ -14,7 +14,6 @@
#define CRC32_VEC_LEN2 348
#define CRC16_VEC_LEN1 12
#define CRC16_VEC_LEN2 2
-#define LINE_LEN 75
/* CRC test vector */
static const uint8_t crc_vec[CRC_VEC_LEN] = {
diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c
index 5b6f05dbb1..da035348bd 100644
--- a/app/test/test_mp_secondary.c
+++ b/app/test/test_mp_secondary.c
@@ -14,7 +14,9 @@
#include <errno.h>
#include <string.h>
#include <unistd.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/wait.h>
+#endif
#include <libgen.h>
#include <dirent.h>
#include <limits.h>
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 3a248d512c..8698d24eac 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -298,6 +298,7 @@ reset_count(void)
idle = 0;
}
+#ifndef RTE_EXEC_ENV_WINDOWS
static void
stats_display(uint16_t port_id)
{
@@ -327,6 +328,7 @@ signal_handler(int signum)
if (signum == SIGUSR2)
stats_display(0);
}
+#endif
struct rte_mbuf **tx_burst;
@@ -638,7 +640,7 @@ exec_burst(uint32_t flags, int lcore)
i = (i >= conf->nb_ports - 1) ? 0 : (i + 1);
}
- sleep(5);
+ rte_delay_us(5 * US_PER_S);
/* only when polling second */
if (flags == SC_BURST_XMIT_FIRST)
@@ -669,8 +671,10 @@ test_pmd_perf(void)
printf("Start PMD RXTX cycles cost test.\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
signal(SIGUSR1, signal_handler);
signal(SIGUSR2, signal_handler);
+#endif
nb_ports = rte_eth_dev_count_avail();
if (nb_ports < NB_ETHPORTS_USED) {
diff --git a/app/test/test_ring_stress.c b/app/test/test_ring_stress.c
index 1af45e0fc8..ce3535c6b2 100644
--- a/app/test/test_ring_stress.c
+++ b/app/test/test_ring_stress.c
@@ -43,9 +43,10 @@ test_ring_stress(void)
n += test_ring_rts_stress.nb_case;
k += run_test(&test_ring_rts_stress);
+#ifndef RTE_EXEC_ENV_WINDOWS
n += test_ring_hts_stress.nb_case;
k += run_test(&test_ring_hts_stress);
-
+#endif
n += test_ring_mt_peek_stress.nb_case;
k += run_test(&test_ring_mt_peek_stress);
diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h
index f9ca63b908..feb4b96ea1 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -359,7 +359,7 @@ test_mt1(int (*test)(void *))
wrk_cmd = WRK_CMD_RUN;
rte_smp_wmb();
- usleep(run_time * US_PER_S);
+ rte_delay_us(run_time * US_PER_S);
/* signal worker to start test */
wrk_cmd = WRK_CMD_STOP;
diff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c
index 18b93db8ef..73eee293a1 100644
--- a/app/test/test_telemetry_data.c
+++ b/app/test/test_telemetry_data.c
@@ -4,7 +4,9 @@
#include <string.h>
#include <sys/socket.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/un.h>
+#endif
#include <unistd.h>
#include <limits.h>
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v4 05/12] app/test: exclude ENOTSUP as failure
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 00/12] app/test: enable subset of " Jie Zhou
` (3 preceding siblings ...)
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 04/12] app/test: replace POSIX specific code Jie Zhou
@ 2021-10-14 3:30 ` Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 06/12] app/test: skip interrupt tests on Windows Jie Zhou
` (7 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 3:30 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Check rte_errno to exclude ENOTSUP as failures in test_memory.c
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_memory.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index dbf6871e71..379b0f99ca 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -10,6 +10,7 @@
#include <rte_memory.h>
#include <rte_common.h>
#include <rte_memzone.h>
+#include <rte_errno.h>
#include "test.h"
@@ -63,7 +64,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
/* we're able to get memseg fd - try getting its offset */
ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
if (ret < 0) {
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
return -1;
}
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v4 06/12] app/test: skip interrupt tests on Windows
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 00/12] app/test: enable subset of " Jie Zhou
` (4 preceding siblings ...)
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 05/12] app/test: exclude ENOTSUP as failure Jie Zhou
@ 2021-10-14 3:30 ` Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 07/12] app/test: temporarily "skip" one cmdline test case Jie Zhou
` (6 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 3:30 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Even though test_interrupts.c can compile on Windows, skip interrupt
tests for now since majority of eal_interrupt on Windows are stubs.
Will remove the skip after interrupt being fully enabled on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_interrupts.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
index 233b14a70b..ab52362e01 100644
--- a/app/test/test_interrupts.c
+++ b/app/test/test_interrupts.c
@@ -12,6 +12,15 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_interrupt(void)
+{
+ printf("Interrupt on Windows is not fully supported yet, skipping test\n");
+ return TEST_SKIPPED;
+}
+#else
+
#define TEST_INTERRUPT_CHECK_INTERVAL 100 /* ms */
/* predefined interrupt handle types */
@@ -558,5 +567,6 @@ test_interrupt(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v4 07/12] app/test: temporarily "skip" one cmdline test case
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 00/12] app/test: enable subset of " Jie Zhou
` (5 preceding siblings ...)
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 06/12] app/test: skip interrupt tests on Windows Jie Zhou
@ 2021-10-14 3:30 ` Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 08/12] app/test: skip two logs_autotest cases on Windows Jie Zhou
` (5 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 3:30 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
cmdline tests pass except one failure at the test_cmdline_socket_fns
test case with error: failed to open /dev/null for reading!
Temporarily "skip" this case while enable all other passing cases.
Issue is tracked internally and will add the corresponding case on
Windows in future.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_cmdline_lib.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index 86a5b78d70..1ff5c0d7e6 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -140,6 +140,9 @@ test_cmdline_vt100_fns(void)
static int
test_cmdline_socket_fns(void)
{
+#ifdef RTE_EXEC_ENV_WINDOWS
+ return 0;
+#else
cmdline_parse_ctx_t ctx;
struct cmdline *cl;
@@ -179,6 +182,7 @@ test_cmdline_socket_fns(void)
printf("Error: function accepted null parameter!\n");
cmdline_free(cl);
return -1;
+#endif
}
static int
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v4 08/12] app/test: skip two logs_autotest cases on Windows
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 00/12] app/test: enable subset of " Jie Zhou
` (6 preceding siblings ...)
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 07/12] app/test: temporarily "skip" one cmdline test case Jie Zhou
@ 2021-10-14 3:30 ` Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 09/12] app/test: differentiate a strerror on different OS Jie Zhou
` (4 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 3:30 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
DPDK logs_autotest on Windows failed at "dynamic log types" tests.
The failures are on 2 test cases for rte_log_set_level_regexp API,
due to regular expression is not supported on Windows in DPDK yet
and regcomp/regexec are just stubs on Windows (in regex.h).
In app\test\test_logs.c, ifndef these two test cases, and for the
rte_log_set_level_pattern validation case following these two cases,
differentiate the expected log level passed into macro CHECK_LEVELS
Now logs_autotest completes for all dynamic log types and static log types.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_logs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/test/test_logs.c b/app/test/test_logs.c
index 7abb6eeca2..7c001c1ab3 100644
--- a/app/test/test_logs.c
+++ b/app/test/test_logs.c
@@ -113,6 +113,7 @@ test_logs(void)
rte_log_set_level(logtype1, RTE_LOG_ERR);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#ifndef RTE_EXEC_ENV_WINDOWS
rte_log_set_level_regexp("type$", RTE_LOG_EMERG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
@@ -121,7 +122,10 @@ test_logs(void)
rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_EMERG, RTE_LOG_EMERG);
-
+#else
+ ret = rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
+ CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#endif
/* set logtype level low to so we can test global level */
rte_log_set_level_pattern("logtype*", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_DEBUG, RTE_LOG_DEBUG, RTE_LOG_DEBUG);
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v4 09/12] app/test: differentiate a strerror on different OS
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 00/12] app/test: enable subset of " Jie Zhou
` (7 preceding siblings ...)
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 08/12] app/test: skip two logs_autotest cases on Windows Jie Zhou
@ 2021-10-14 3:30 ` Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 10/12] app/test: remove two alarm_autotest cases Jie Zhou
` (3 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 3:30 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
On Windows, strerror returns just "Unknown error" for errnum greater
than MAX_ERRNO, while linux and freebsd returns "Unknown error <num>",
which is the current expectation for errno_autotest. Differentiate
the error string on Windows to remove a "duplicate error code" failure.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_errno.c | 12 +++++++++++-
lib/eal/common/eal_common_errno.c | 4 ++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/app/test/test_errno.c b/app/test/test_errno.c
index 3ff0456a58..0db4fbc8b3 100644
--- a/app/test/test_errno.c
+++ b/app/test/test_errno.c
@@ -18,13 +18,19 @@ test_errno(void)
{
const char *rte_retval;
const char *libc_retval;
+
+#ifndef RTE_EXEC_ENV_WINDOWS
#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD has a colon in the string, unlike linux */
const char unknown_code_result[] = "Unknown error: %d";
#else
const char unknown_code_result[] = "Unknown error %d";
#endif
- char expected_libc_retval[sizeof(unknown_code_result)+3];
+ char expected_libc_retval[sizeof(unknown_code_result) + 3];
+#else
+ /* Windows doesn't return error number for error greater than MAX_errno*/
+ static const char expected_libc_retval[] = "Unknown error";
+#endif
/* use a small selection of standard errors for testing */
int std_errs[] = {EAGAIN, EBADF, EACCES, EINTR, EINVAL};
@@ -54,11 +60,13 @@ test_errno(void)
rte_retval, libc_retval);
if (strcmp(rte_retval, libc_retval) == 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
/* generate appropriate error string for unknown error number
* and then check that this is what we got back. If not, we have
* a duplicate error number that conflicts with errno.h */
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, rte_errs[i]);
+#endif
if ((strcmp(expected_libc_retval, libc_retval) != 0) &&
(strcmp("", libc_retval) != 0)){
printf("Error, duplicate error code %d\n", rte_errs[i]);
@@ -69,8 +77,10 @@ test_errno(void)
/* ensure that beyond RTE_MAX_ERRNO, we always get an unknown code */
rte_retval = rte_strerror(RTE_MAX_ERRNO + 1);
libc_retval = strerror(RTE_MAX_ERRNO + 1);
+#ifndef RTE_EXEC_ENV_WINDOWS
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, RTE_MAX_ERRNO + 1);
+#endif
printf("rte_strerror: '%s', strerror: '%s'\n",
rte_retval, libc_retval);
if ((strcmp(rte_retval, libc_retval) != 0) ||
diff --git a/lib/eal/common/eal_common_errno.c b/lib/eal/common/eal_common_errno.c
index f86802705a..4c4abb802e 100644
--- a/lib/eal/common/eal_common_errno.c
+++ b/lib/eal/common/eal_common_errno.c
@@ -37,7 +37,11 @@ rte_strerror(int errnum)
/* since some implementations of strerror_r throw an error
* themselves if errnum is too big, we handle that case here */
if (errnum >= RTE_MAX_ERRNO)
+#ifdef RTE_EXEC_ENV_WINDOWS
+ snprintf(ret, RETVAL_SZ, "Unknown error%s", sep);
+#else
snprintf(ret, RETVAL_SZ, "Unknown error%s %d", sep, errnum);
+#endif
else
switch (errnum){
case E_RTE_SECONDARY:
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v4 10/12] app/test: remove two alarm_autotest cases
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 00/12] app/test: enable subset of " Jie Zhou
` (8 preceding siblings ...)
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 09/12] app/test: differentiate a strerror on different OS Jie Zhou
@ 2021-10-14 3:30 ` Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 11/12] app/test: replace .sh scripts with .py scripts Jie Zhou
` (2 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 3:30 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Remove two alarm_autotest test cases which do bogus range check
on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_alarm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_alarm.c b/app/test/test_alarm.c
index b4034339b8..70e97a3109 100644
--- a/app/test/test_alarm.c
+++ b/app/test/test_alarm.c
@@ -10,6 +10,7 @@
#include "test.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
static volatile int flag;
static void
@@ -18,6 +19,7 @@ test_alarm_callback(void *cb_arg)
flag = 1;
printf("Callback setting flag - OK. [cb_arg = %p]\n", cb_arg);
}
+#endif
static int
test_alarm(void)
@@ -27,6 +29,7 @@ test_alarm(void)
return 0;
#endif
+#ifndef RTE_EXEC_ENV_WINDOWS
/* check if it will fail to set alarm with wrong us value */
printf("check if it will fail to set alarm with wrong ms values\n");
if (rte_eal_alarm_set(0, test_alarm_callback,
@@ -39,6 +42,7 @@ test_alarm(void)
printf("should not be successful with (UINT64_MAX-1) us value\n");
return -1;
}
+#endif
/* check if it will fail to set alarm with null callback parameter */
printf("check if it will fail to set alarm with null callback parameter\n");
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v4 11/12] app/test: replace .sh scripts with .py scripts
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 00/12] app/test: enable subset of " Jie Zhou
` (9 preceding siblings ...)
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 10/12] app/test: remove two alarm_autotest cases Jie Zhou
@ 2021-10-14 3:30 ` Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 12/12] app/test: enable subset of unit tests on Windows Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 00/12] app/test: enable subset of " Jie Zhou
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 3:30 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Add python script to get coremask
- Add python script to check if system supports hugepages
- Remove two corresponding .sh scripts
- Replace calling of .sh with corresponding .py in meson.build
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/get-coremask.sh | 13 -------------
app/test/get_coremask.py | 12 ++++++++++++
app/test/has-hugepage.sh | 11 -----------
app/test/has_hugepage.py | 25 +++++++++++++++++++++++++
app/test/meson.build | 7 ++++---
5 files changed, 41 insertions(+), 27 deletions(-)
delete mode 100755 app/test/get-coremask.sh
create mode 100644 app/test/get_coremask.py
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
diff --git a/app/test/get-coremask.sh b/app/test/get-coremask.sh
deleted file mode 100755
index bb8cf404d2..0000000000
--- a/app/test/get-coremask.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#! /bin/sh -e
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2019 Intel Corporation
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /sys/devices/system/cpu/present
-elif [ "$(uname)" = "FreeBSD" ] ; then
- ncpus=$(/sbin/sysctl -n hw.ncpu)
- echo 0-$(expr $ncpus - 1)
-else
-# fallback
- echo 0-3
-fi
diff --git a/app/test/get_coremask.py b/app/test/get_coremask.py
new file mode 100644
index 0000000000..13939bcf78
--- /dev/null
+++ b/app/test/get_coremask.py
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2021 Microsoft Corporation
+"""This script returns the system cpu range"""
+
+import multiprocessing
+
+cpucount = multiprocessing.cpu_count()
+if cpucount is None:
+ # use fallback cpu count
+ print("0-3")
+else:
+ print("0-" + str(cpucount - 1))
diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh
deleted file mode 100755
index d600fad319..0000000000
--- a/app/test/has-hugepage.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright 2020 Mellanox Technologies, Ltd
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /proc/sys/vm/nr_hugepages || echo 0
-elif [ "$(uname)" = "FreeBSD" ] ; then
- echo 1 # assume FreeBSD always has hugepages
-else
- echo 0
-fi
diff --git a/app/test/has_hugepage.py b/app/test/has_hugepage.py
new file mode 100644
index 0000000000..70107c61fd
--- /dev/null
+++ b/app/test/has_hugepage.py
@@ -0,0 +1,25 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2021 Microsoft Corporation
+"""This script checks if the system supports huge pages"""
+
+import platform
+import ctypes
+
+osName = platform.system()
+if osName == "Linux":
+ with open("/proc/sys/vm/nr_hugepages") as file_o:
+ content = file_o.read()
+ print(content)
+elif osName == "FreeBSD":
+ # Assume FreeBSD always has hugepages enabled
+ print("1")
+elif osName == "Windows":
+ # On Windows, determine if large page is supported based on the
+ # value returned by GetLargePageMinimum. If the return value is zero,
+ # the processor does not support large pages.
+ if ctypes.windll.kernel32.GetLargePageMinimum() > 0:
+ print("1")
+ else:
+ print("0")
+else:
+ print("0")
diff --git a/app/test/meson.build b/app/test/meson.build
index f144d8b8ed..e1d003eff4 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -451,7 +451,7 @@ dpdk_test = executable('dpdk-test',
driver_install_path),
install: true)
-has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
+has_hugepage = run_command(py3, 'has_hugepage.py').stdout().strip() != '0'
message('hugepage availability: @0@'.format(has_hugepage))
# some perf tests (eg: memcpy perf autotest)take very long
@@ -459,8 +459,9 @@ message('hugepage availability: @0@'.format(has_hugepage))
timeout_seconds = 600
timeout_seconds_fast = 10
-get_coremask = find_program('get-coremask.sh')
-num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip()
+list_of_cores = run_command(py3, 'get_coremask.py').stdout().strip()
+message('list of cores: @0@'.format(list_of_cores))
+num_cores_arg = '-l ' + list_of_cores
default_test_args = [num_cores_arg]
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v4 12/12] app/test: enable subset of unit tests on Windows
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 00/12] app/test: enable subset of " Jie Zhou
` (10 preceding siblings ...)
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 11/12] app/test: replace .sh scripts with .py scripts Jie Zhou
@ 2021-10-14 3:30 ` Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 00/12] app/test: enable subset of " Jie Zhou
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 3:30 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- For fast tests and perf tests, add test stubs to skip not supported
ones.
- For driver tests, just skip on Windows totally to avoid
unnecessary amount of test stubs. For example, there are about 30
cryptodev related tests (even though in the meson for CI it only
listed about half) which will be enabled by "patch-18949: app/test:
enable crypto unit tests on Windows".
- For dump tests, currently the tests hang on Windows which require
further investigation. Keep the dump test list just for non-Windows
for easier tracking.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/meson.build | 107 ++++++++++++-----------
app/test/test_acl.c | 12 +++
app/test/test_bpf.c | 15 +++-
app/test/test_cksum.c | 12 +++
app/test/test_cmdline_ipaddr.c | 5 ++
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 | 97 ++++++++++++++++++++
app/test/test_eal_fs.c | 12 +++
app/test/test_efd.c | 12 +++
app/test/test_efd_perf.c | 12 +++
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 | 17 +++-
app/test/test_fib.c | 22 ++++-
app/test/test_fib6.c | 23 ++++-
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 | 12 +++
app/test/test_graph.c | 18 +++-
app/test/test_graph_perf.c | 16 +++-
app/test/test_hash_perf.c | 12 +++
app/test/test_ipfrag.c | 16 +++-
app/test/test_ipsec.c | 15 +++-
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 | 12 +++
app/test/test_lpm6.c | 14 ++-
app/test/test_lpm6_perf.c | 13 +++
app/test/test_lpm_perf.c | 12 +++
app/test/test_malloc.c | 17 +++-
app/test/test_mbuf.c | 13 ++-
app/test/test_member.c | 16 +++-
app/test/test_member_perf.c | 16 +++-
app/test/test_memcpy_perf.c | 18 +++-
app/test/test_mempool_perf.c | 12 +++
app/test/test_mp_secondary.c | 15 +++-
app/test/test_rawdev.c | 17 +++-
app/test/test_rcu_qsbr_perf.c | 12 +++
app/test/test_reciprocal_division.c | 12 +++
app/test/test_reciprocal_division_perf.c | 12 +++
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 | 16 +++-
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 ++++++-
67 files changed, 977 insertions(+), 114 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index e1d003eff4..059b14c812 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,12 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if is_windows
- build = false
- reason = 'not supported on Windows'
- subdir_done()
-endif
-
if not get_option('tests')
subdir_done()
endif
@@ -154,36 +148,19 @@ test_sources = files(
)
test_deps = [
- 'acl',
'bus_pci',
'bus_vdev',
'bitratestats',
- 'bpf',
'cfgfile',
'cmdline',
- 'cryptodev',
- 'distributor',
'efd',
'ethdev',
- 'eventdev',
- 'fib',
- 'flow_classify',
- 'graph',
'hash',
- 'ipsec',
'latencystats',
'lpm',
- 'member',
'metrics',
- 'node',
- 'pipeline',
- 'port',
- 'rawdev',
'rcu',
- 'reorder',
- 'rib',
'ring',
- 'security',
'stack',
'telemetry',
'timer',
@@ -318,38 +295,66 @@ perf_test_names = [
]
driver_test_names = [
- 'cryptodev_aesni_mb_autotest',
- 'cryptodev_aesni_gcm_autotest',
- 'cryptodev_cn9k_autotest',
- 'cryptodev_cn10k_autotest',
- 'cryptodev_dpaa_sec_autotest',
- 'cryptodev_dpaa2_sec_autotest',
- 'cryptodev_null_autotest',
- 'cryptodev_octeontx2_autotest',
- 'cryptodev_openssl_autotest',
- 'cryptodev_openssl_asym_autotest',
- 'cryptodev_qat_autotest',
- 'cryptodev_sw_armv8_autotest',
- 'cryptodev_sw_kasumi_autotest',
- 'cryptodev_sw_mvsam_autotest',
- 'cryptodev_sw_snow3g_autotest',
- 'cryptodev_sw_zuc_autotest',
- 'eventdev_selftest_octeontx',
- 'eventdev_selftest_sw',
- 'rawdev_autotest',
]
dump_test_names = [
- 'dump_struct_sizes',
- 'dump_mempool',
- 'dump_malloc_stats',
- 'dump_devargs',
- 'dump_log_types',
- 'dump_ring',
- 'dump_physmem',
- 'dump_memzone',
]
+if not is_windows
+ test_deps += [
+ 'acl',
+ 'bpf',
+ 'cryptodev',
+ 'distributor',
+ 'eventdev',
+ 'fib',
+ 'flow_classify',
+ 'graph',
+ 'ipsec',
+ 'member',
+ 'node',
+ 'pipeline',
+ 'port',
+ 'rawdev',
+ 'reorder',
+ 'rib',
+ 'security',
+ ]
+
+ driver_test_names += [
+ 'cryptodev_aesni_mb_autotest',
+ 'cryptodev_aesni_gcm_autotest',
+ 'cryptodev_cn9k_autotest',
+ 'cryptodev_cn10k_autotest',
+ 'cryptodev_dpaa_sec_autotest',
+ 'cryptodev_dpaa2_sec_autotest',
+ 'cryptodev_null_autotest',
+ 'cryptodev_octeontx2_autotest',
+ 'cryptodev_openssl_autotest',
+ 'cryptodev_openssl_asym_autotest',
+ 'cryptodev_qat_autotest',
+ 'cryptodev_sw_armv8_autotest',
+ 'cryptodev_sw_kasumi_autotest',
+ 'cryptodev_sw_mvsam_autotest',
+ 'cryptodev_sw_snow3g_autotest',
+ 'cryptodev_sw_zuc_autotest',
+ 'eventdev_selftest_octeontx',
+ 'eventdev_selftest_sw',
+ 'rawdev_autotest',
+ ]
+
+ dump_test_names += [
+ 'dump_struct_sizes',
+ 'dump_mempool',
+ 'dump_malloc_stats',
+ 'dump_devargs',
+ 'dump_log_types',
+ 'dump_ring',
+ 'dump_physmem',
+ 'dump_memzone',
+ ]
+endif
+
# The following linkages are an exception to allow running the
# unit tests without requiring that the developer install the
# DPDK libraries. Explicit linkage of drivers (plugin libraries)
@@ -363,7 +368,7 @@ endif
if dpdk_conf.has('RTE_EVENT_SKELETON')
test_deps += 'event_skeleton'
endif
-if dpdk_conf.has('RTE_LIB_TELEMETRY')
+if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
endif
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 <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 /*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 8118a1849b..f00eb0f349 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -13,11 +13,22 @@
#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.
@@ -3232,4 +3243,6 @@ test_bpf(void)
return rc;
}
+#endif
+
REGISTER_TEST_COMMAND(bpf_autotest, test_bpf);
diff --git a/app/test/test_cksum.c b/app/test/test_cksum.c
index cd983d7c01..3c5bfc8671 100644
--- a/app/test/test_cksum.c
+++ b/app/test/test_cksum.c
@@ -13,6 +13,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_cksum(void)
+{
+ printf("cksum not supported, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MEMPOOL_CACHE_SIZE 0
#define MBUF_DATA_SIZE 256
#define NB_MBUF 128
@@ -268,4 +278,6 @@ test_cksum(void)
}
#undef GOTO_FAIL
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(cksum_autotest, test_cksum);
diff --git a/app/test/test_cmdline_ipaddr.c b/app/test/test_cmdline_ipaddr.c
index 2a1ee120fc..ff039a304f 100644
--- a/app/test/test_cmdline_ipaddr.c
+++ b/app/test/test_cmdline_ipaddr.c
@@ -2,9 +2,12 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
+
#include <netinet/in.h>
#include <sys/socket.h>
@@ -669,3 +672,5 @@ test_parse_ipaddr_invalid_param(void)
}
return 0;
}
+
+#endif /*ifndef RTE_EXEC_ENV_WINDOWS*/
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 65b64e1af0..10200751f8 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 <time.h>
#include <rte_common.h>
@@ -15462,3 +15464,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 9d19a6d6d9..680ced4dbe 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 <rte_bus_vdev.h>
#include <rte_common.h>
#include <rte_hexdump.h>
@@ -2429,3 +2431,5 @@ REGISTER_TEST_COMMAND(cryptodev_octeontx2_asym_autotest,
test_cryptodev_octeontx2_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 3cdb2c96e8..a4434c020f 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 <rte_common.h>
#include <rte_hexdump.h>
#include <rte_mbuf.h>
@@ -1218,3 +1220,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 bcd9746c98..d573b64265 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 <rte_common.h>
#include <rte_cryptodev.h>
#include <rte_esp.h>
@@ -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 <time.h>
#include <rte_common.h>
@@ -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 <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 /*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 <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 @@ 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 fdbeae6d2f..c4b4c7fd97 100644
--- a/app/test/test_distributor_perf.c
+++ b/app/test/test_distributor_perf.c
@@ -10,6 +10,17 @@
#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>
@@ -267,4 +278,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 1d18a0ba8f..91908e5065 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -9,6 +9,101 @@
#include <string.h>
#include <stdarg.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_eal_flags(void)
+{
+ printf("eal_flags not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+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 <libgen.h>
#include <stdlib.h>
#include <errno.h>
@@ -1579,6 +1674,8 @@ test_eal_flags(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(eal_flags_autotest, test_eal_flags);
/* subtests used in meson for CI */
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..8494c9df2a 100644
--- a/app/test/test_efd.c
+++ b/app/test/test_efd.c
@@ -12,6 +12,16 @@
#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
+
#define EFD_TEST_KEY_LEN 8
#define TABLE_SIZE (1 << 21)
#define ITERATIONS 3
@@ -462,4 +472,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..16fb5f7f2c 100644
--- a/app/test/test_efd_perf.c
+++ b/app/test/test_efd_perf.c
@@ -15,6 +15,16 @@
#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
+
#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 0c7ebe6981..feeb3b62c6 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 <string.h>
#include <rte_common.h>
#include <rte_mempool.h>
#include <rte_mbuf.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_cryptodev.h>
#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
@@ -1003,5 +1014,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 add4d8a678..19ad36413c 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 <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
@@ -786,6 +805,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 <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 /*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 121c2d93e8..c858e6233f 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 <math.h>
@@ -11,6 +12,17 @@
#include <rte_debug.h>
#include <rte_eal.h>
#include <rte_ethdev.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_event_timer_adapter_func(void)
+{
+ printf("event_timer_adapter not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <rte_eventdev.h>
#include <rte_event_timer_adapter.h>
#include <rte_mempool.h>
@@ -22,8 +34,6 @@
#include <rte_service.h>
#include <stdbool.h>
-#include "test.h"
-
/* 4K timers corresponds to sw evdev max inflight events */
#define MAX_TIMERS (4 * 1024)
#define BKT_TCK_NSEC
@@ -1953,4 +1963,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 843d9766b0..fee2ecaa22 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 <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
@@ -1048,7 +1058,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);
@@ -1058,3 +1072,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..a19864dec5 100644
--- a/app/test/test_external_mem.c
+++ b/app/test/test_external_mem.c
@@ -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 /*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 e46b9934fe..d991017d58 100644
--- a/app/test/test_fib.c
+++ b/app/test/test_fib.c
@@ -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);
@@ -410,5 +428,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 74abfc7a5d..d6ad0072f5 100644
--- a/app/test/test_fib6.c
+++ b/app/test/test_fib6.c
@@ -9,11 +9,28 @@
#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_fib6.h>
+
typedef int32_t (*rte_fib6_test)(void);
static int32_t test_create_invalid(void);
@@ -419,5 +436,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 56c799b2e9..22e8adb738 100644
--- a/app/test/test_fib6_perf.c
+++ b/app/test/test_fib6_perf.c
@@ -10,9 +10,21 @@
#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 { \
@@ -154,4 +166,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 dd2e54db8b..c0c44c3fd5 100644
--- a/app/test/test_fib_perf.c
+++ b/app/test/test_fib_perf.c
@@ -12,11 +12,22 @@
#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__); \
@@ -408,4 +419,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 951606f248..a6b0eece3d 100644
--- a/app/test/test_flow_classify.c
+++ b/app/test/test_flow_classify.c
@@ -11,6 +11,17 @@
#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 /*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 838ab6f0f9..45f8484349 100644
--- a/app/test/test_func_reentrancy.c
+++ b/app/test/test_func_reentrancy.c
@@ -41,6 +41,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_func_reentrancy(void)
+{
+ printf("reentrancy not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
typedef int (*case_func_t)(void* arg);
typedef void (*case_clean_t)(unsigned lcore_id);
@@ -512,4 +522,6 @@ test_func_reentrancy(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(func_reentrancy_autotest, test_func_reentrancy);
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 <assert.h>
#include <inttypes.h>
#include <signal.h>
@@ -9,14 +11,23 @@
#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 +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 <inttypes.h>
#include <signal.h>
#include <stdio.h>
@@ -9,14 +11,22 @@
#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 +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 76cdac5d53..4229f85aa7 100644
--- a/app/test/test_hash_perf.c
+++ b/app/test/test_hash_perf.c
@@ -17,6 +17,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_hash_perf(void)
+{
+ printf("hash_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ENTRIES (1 << 19)
#define KEYS_TO_ADD (MAX_ENTRIES)
#define ADD_PERCENT 0.75 /* 75% table utilization */
@@ -749,4 +759,6 @@ test_hash_perf(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(hash_perf_autotest, test_hash_perf);
diff --git a/app/test/test_ipfrag.c b/app/test/test_ipfrag.c
index da8c212f92..926a621f72 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 <time.h>
@@ -8,13 +9,22 @@
#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
@@ -259,4 +269,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 c6d6b88d6d..73a433a5b6 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 <time.h>
@@ -13,15 +14,25 @@
#include <rte_bus_vdev.h>
#include <rte_ip.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_crypto.h>
#include <rte_cryptodev.h>
#include <rte_lcore.h>
+
#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 /*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 <stdio.h>
#include <rte_ip.h>
@@ -8,10 +9,20 @@
#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 +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 <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 +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 96733554b6..d0680886db 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 <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>
diff --git a/app/test/test_lcores.c b/app/test/test_lcores.c
index 19a7ab9fce..ab01197f40 100644
--- a/app/test/test_lcores.c
+++ b/app/test/test_lcores.c
@@ -11,6 +11,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_lcores(void)
+{
+ printf("lcore not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
struct thread_context {
enum { INIT, ERROR, DONE } state;
bool lcore_id_any;
@@ -370,4 +380,6 @@ test_lcores(void)
return TEST_SUCCESS;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(lcores_autotest, test_lcores);
diff --git a/app/test/test_lpm6.c b/app/test/test_lpm6.c
index 0d664546fa..cd9bc969b7 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 <stdio.h>
#include <stdint.h>
@@ -8,9 +9,18 @@
#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 +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..51e9020acd 100644
--- a/app/test/test_lpm6_perf.c
+++ b/app/test/test_lpm6_perf.c
@@ -13,6 +13,17 @@
#include <rte_lpm6.h>
#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 "test_lpm6_data.h"
#define TEST_LPM_ASSERT(cond) do { \
@@ -160,4 +171,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..24d4e673bf 100644
--- a/app/test/test_lpm_perf.c
+++ b/app/test/test_lpm_perf.c
@@ -18,6 +18,16 @@
#include "test.h"
#include "test_xmmt_ops.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_lpm_perf(void)
+{
+ printf("lpm6_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
struct rte_lpm *lpm;
static struct rte_rcu_qsbr *rv;
static volatile uint8_t writer_done;
@@ -763,4 +773,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 afff0de9f0..62af2b3d1c 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 <stdio.h>
#include <stdint.h>
@@ -8,6 +9,17 @@
#include <stdarg.h>
#include <errno.h>
#include <stdlib.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_malloc (void)
+{
+ printf("malloc not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <sys/mman.h>
#include <sys/queue.h>
#include <unistd.h>
@@ -23,11 +35,8 @@
#include <rte_random.h>
#include <rte_string_fns.h>
-#include "test.h"
-
#define N 10000
-
static int
is_mem_on_socket(int32_t socket);
@@ -1080,4 +1089,6 @@ test_malloc(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(malloc_autotest, test_malloc);
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 9a248dfaea..aeb7f4171e 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 <string.h>
#include <stdarg.h>
@@ -34,7 +35,15 @@
#include <rte_tcp.h>
#include <rte_mbuf_dyn.h>
-#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_mbuf(void)
+{
+ printf("mbuf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
#define MEMPOOL_CACHE_SIZE 32
#define MBUF_DATA_SIZE 2048
@@ -2883,4 +2892,6 @@ test_mbuf(void)
}
#undef GOTO_FAIL
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(mbuf_autotest, test_mbuf);
diff --git a/app/test/test_member.c b/app/test/test_member.c
index 40aa4c8627..85f3a126b9 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 <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 +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 <stdio.h>
#include <inttypes.h>
@@ -11,9 +12,18 @@
#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 +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 c711e36ba7..e9388fa7c4 100644
--- a/app/test/test_memcpy_perf.c
+++ b/app/test/test_memcpy_perf.c
@@ -2,21 +2,31 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#include "test.h"
+
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_memcpy_perf(void)
+{
+ printf("memcpy_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <sys/time.h>
#include <rte_common.h>
#include <rte_cycles.h>
#include <rte_random.h>
#include <rte_malloc.h>
-
#include <rte_memcpy.h>
-#include "test.h"
-
/*
* Set this to the maximum buffer size you want to test. If it is 0, then the
* values in the buf_sizes[] array below will be used.
@@ -347,4 +357,6 @@ test_memcpy_perf(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(memcpy_perf_autotest, test_memcpy_perf);
diff --git a/app/test/test_mempool_perf.c b/app/test/test_mempool_perf.c
index 8f629736e8..193327a546 100644
--- a/app/test/test_mempool_perf.c
+++ b/app/test/test_mempool_perf.c
@@ -28,6 +28,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_mempool_perf(void)
+{
+ printf("mempool_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
/*
* Mempool performance
* =======
@@ -393,4 +403,6 @@ test_mempool_perf(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(mempool_perf_autotest, test_mempool_perf);
diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c
index da035348bd..518b88daa6 100644
--- a/app/test/test_mp_secondary.c
+++ b/app/test/test_mp_secondary.c
@@ -14,9 +14,18 @@
#include <errno.h>
#include <string.h>
#include <unistd.h>
-#ifndef RTE_EXEC_ENV_WINDOWS
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_mp_secondary(void)
+{
+ printf("mp_secondary not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <sys/wait.h>
-#endif
#include <libgen.h>
#include <dirent.h>
#include <limits.h>
@@ -214,4 +223,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_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 <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 /*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..9209fb2658 100644
--- a/app/test/test_rcu_qsbr_perf.c
+++ b/app/test/test_rcu_qsbr_perf.c
@@ -15,6 +15,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_rcu_qsbr_main(void)
+{
+ printf("rcu_qsbr_main not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
/* Check condition and return an error if true. */
static uint16_t enabled_core_ids[RTE_MAX_LCORE];
static unsigned int num_cores;
@@ -687,4 +697,6 @@ test_rcu_qsbr_main(void)
return -1;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
diff --git a/app/test/test_reciprocal_division.c b/app/test/test_reciprocal_division.c
index 8ea9b1d24d..8777211cd7 100644
--- a/app/test/test_reciprocal_division.c
+++ b/app/test/test_reciprocal_division.c
@@ -13,6 +13,16 @@
#include <rte_random.h>
#include <rte_reciprocal.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_reciprocal(void)
+{
+ printf("reciprocal not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ITERATIONS (1ULL << 32)
#define DIVIDE_ITER (100)
@@ -164,4 +174,6 @@ test_reciprocal(void)
return result;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(reciprocal_division, test_reciprocal);
diff --git a/app/test/test_reciprocal_division_perf.c b/app/test/test_reciprocal_division_perf.c
index 4f625873e5..66b004fa1b 100644
--- a/app/test/test_reciprocal_division_perf.c
+++ b/app/test/test_reciprocal_division_perf.c
@@ -13,6 +13,16 @@
#include <rte_random.h>
#include <rte_reciprocal.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_reciprocal_division_perf(void)
+{
+ printf("reciprocal_division_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ITERATIONS (1ULL << 32)
#define DIVIDE_ITER (1ULL << 28)
@@ -205,4 +215,6 @@ test_reciprocal_division_perf(void)
return result;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(reciprocal_division_perf, test_reciprocal_division_perf);
diff --git a/app/test/test_red.c b/app/test/test_red.c
index e973f3131e..d0200c13aa 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 <stdlib.h>
#include <stdio.h>
@@ -8,12 +9,34 @@
#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 +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 <stdio.h>
#include <unistd.h>
@@ -9,12 +10,20 @@
#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 +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 <medvedkinv@gmail.com>
* 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 +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 <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,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 <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 +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 060cf1ffa8..c31273941c 100644
--- a/app/test/test_security.c
+++ b/app/test/test_security.c
@@ -1,12 +1,24 @@
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
*/
+#include "test.h"
#include <rte_errno.h>
#include <rte_log.h>
#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_ether.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_security(void)
+{
+ printf("security not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <rte_security.h>
#include <rte_security_driver.h>
@@ -20,7 +32,7 @@
#endif
#include <rte_test.h>
-#include "test.h"
+
/**
* Security
@@ -2639,4 +2651,6 @@ test_security(void)
return unit_test_suite_runner(&security_testsuite);
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(security_autotest, test_security);
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 <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 +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 <rte_ip.h>
#include <rte_string_fns.h>
#include <rte_hexdump.h>
@@ -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 <string.h>
#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 aabf4375db..45dc7682d8 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 <string.h>
#include <rte_pipeline.h>
#include <rte_log.h>
@@ -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 <string.h>
#include <rte_byteorder.h>
#include <rte_table_lpm_ipv6.h>
@@ -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 16a9f1878b..a954aba50c 100644
--- a/app/test/test_timer_secondary.c
+++ b/app/test/test_timer_secondary.c
@@ -16,6 +16,17 @@
#include <rte_random.h>
#include "test.h"
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static 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 */
@@ -213,4 +224,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.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v5 00/12] app/test: enable subset of tests on Windows
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 00/12] app/test: enable subset of " Jie Zhou
` (11 preceding siblings ...)
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 12/12] app/test: enable subset of unit tests on Windows Jie Zhou
@ 2021-10-14 4:52 ` Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 01/12] lib: build libraries that some tests depend on Jie Zhou
` (12 more replies)
12 siblings, 13 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 4:52 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
This patchset is to enable a subset of unit tests on windows. It mainly includes:
- Enable building libraries on Windows that some tests depend on
- Replace POSIX specific codes
- Fix some lib and tests per failures investigation
- Replace .sh scripts with .py scripts for meson.build
- Enable build and run subset of unit tests on Windows
Future work:
- Work with CI/CD lab to onboard unit tests on Windows to catch regression
- Onboard more tests when more libraries are enabled on Windows
---
V2 changes:
- Fix compilation error on FreeBSD
- Fix email mismatch issue
- Add a missing space around "*"
---
V3 changes:
- Fix a misc c coding style issue
- Revise some commit title and message body
- Fix violations of PEP8 in new added Python scripts
- Add error handling in get_coremask.py
- Fix has_hugepage.py to check system support of hugepages
instead of checking privileges
- Fix test meson.build to run Python scripts using py3
- Consolidate lists of source files, test dep, etc. across all
platforms, with conditional extending on some platform(s)
---
V4 changes:
- Remove building of ip_frag, rib, and reorder libraries on Windows.
These three libs usually can be built on Windows without change.
However, in between the time of V3 and V4, there is regression in
upstream caused build failures of these three libs. Will separately
investigate and enable these libraries.
- Remove previous patch#2 (Enable mempool/stack on Windows) from this
patchset as it was separated out and merged as patch-19314.
- Consolidate the source files, deps, tests lists across platforms as
much as possible.
---
V5 changes:
- Remove a space between function name and open parenthesis '('
- Add back a header mistakenly deleted
Jie Zhou (12):
lib: build libraries that some tests depend on
eal/windows: return ENOTSUP for not supported API
app/test: remove unnecessary headers
app/test: replace POSIX specific code
app/test: exclude ENOTSUP as failure
app/test: skip interrupt tests on Windows
app/test: temporarily "skip" one cmdline test case
app/test: skip two logs_autotest cases on Windows
app/test: differentiate a strerror on different OS
app/test: remove two alarm_autotest cases
app/test: replace .sh scripts with .py scripts
app/test: enable subset of unit tests on Windows
app/test/commands.c | 2 -
app/test/get-coremask.sh | 13 ---
app/test/get_coremask.py | 12 +++
app/test/has-hugepage.sh | 11 ---
app/test/has_hugepage.py | 25 +++++
app/test/meson.build | 114 ++++++++++++-----------
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +-
app/test/test.c | 5 +-
app/test/test_acl.c | 12 +++
app/test/test_alarm.c | 4 +
app/test/test_bpf.c | 15 ++-
app/test/test_byteorder.c | 2 +-
app/test/test_cksum.c | 12 +++
app/test/test_cmdline.c | 2 +
app/test/test_cmdline_ipaddr.c | 5 +
app/test/test_cmdline_lib.c | 5 +-
app/test/test_crc.c | 1 -
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 | 97 +++++++++++++++++++
app/test/test_eal_fs.c | 12 +++
app/test/test_efd.c | 12 +++
app/test/test_efd_perf.c | 12 +++
app/test/test_errno.c | 12 ++-
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 | 17 +++-
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 | 12 +++
app/test/test_graph.c | 18 +++-
app/test/test_graph_perf.c | 16 +++-
app/test/test_hash_perf.c | 12 +++
app/test/test_interrupts.c | 10 ++
app/test/test_ipfrag.c | 16 +++-
app/test/test_ipsec.c | 15 ++-
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 | 12 +++
app/test/test_logs.c | 6 +-
app/test/test_lpm6.c | 14 ++-
app/test/test_lpm6_perf.c | 13 +++
app/test/test_lpm_perf.c | 12 +++
app/test/test_malloc.c | 17 +++-
app/test/test_mbuf.c | 13 ++-
app/test/test_member.c | 16 +++-
app/test/test_member_perf.c | 16 +++-
app/test/test_memcpy_perf.c | 18 +++-
app/test/test_memory.c | 3 +-
app/test/test_mempool_perf.c | 12 +++
app/test/test_mp_secondary.c | 13 +++
app/test/test_pmd_perf.c | 6 +-
app/test/test_rawdev.c | 17 +++-
app/test/test_rcu_qsbr_perf.c | 12 +++
app/test/test_reciprocal_division.c | 12 +++
app/test/test_reciprocal_division_perf.c | 12 +++
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_ring_stress.c | 3 +-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_sched.c | 14 ++-
app/test/test_security.c | 16 +++-
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_telemetry_data.c | 2 +
app/test/test_timer_secondary.c | 13 +++
app/test/test_trace.c | 32 ++++++-
lib/eal/common/eal_common_errno.c | 4 +
lib/eal/windows/eal_memalloc.c | 6 +-
lib/meson.build | 2 +
91 files changed, 1085 insertions(+), 155 deletions(-)
delete mode 100755 app/test/get-coremask.sh
create mode 100644 app/test/get_coremask.py
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v5 01/12] lib: build libraries that some tests depend on
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 00/12] app/test: enable subset of " Jie Zhou
@ 2021-10-14 4:52 ` Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 02/12] eal/windows: return ENOTSUP for not supported API Jie Zhou
` (11 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 4:52 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Enable building subset of libraries that tests depend on for Windows
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
lib/meson.build | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/meson.build b/lib/meson.build
index b2ba7258d8..bd6c27deef 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -82,9 +82,11 @@ if is_windows
'bitratestats',
'cryptodev',
'cfgfile',
+ 'efd',
'gro',
'gso',
'latencystats',
+ 'lpm',
'pdump',
'stack',
'security',
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v5 02/12] eal/windows: return ENOTSUP for not supported API
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 00/12] app/test: enable subset of " Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 01/12] lib: build libraries that some tests depend on Jie Zhou
@ 2021-10-14 4:52 ` Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 03/12] app/test: remove unnecessary headers Jie Zhou
` (10 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 4:52 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
UT memory_autotest on Windows has 2 failed cases on eal APIs
eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2
APIs are not supported on Windows yet. Should return ENOTSUP such that
in test_memory.c these 2 ENOTSUP cases will not be marked as failures,
same as other ENOTSUP cases.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
lib/eal/windows/eal_memalloc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/eal/windows/eal_memalloc.c b/lib/eal/windows/eal_memalloc.c
index 4459d59b1a..fffdd5b976 100644
--- a/lib/eal/windows/eal_memalloc.c
+++ b/lib/eal/windows/eal_memalloc.c
@@ -17,7 +17,7 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
RTE_SET_USED(list_idx);
RTE_SET_USED(seg_idx);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
@@ -28,7 +28,7 @@ eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
RTE_SET_USED(seg_idx);
RTE_SET_USED(offset);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
static int
@@ -433,7 +433,7 @@ eal_memalloc_sync_with_primary(void)
{
/* No multi-process support. */
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v5 03/12] app/test: remove unnecessary headers
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 00/12] app/test: enable subset of " Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 01/12] lib: build libraries that some tests depend on Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 02/12] eal/windows: return ENOTSUP for not supported API Jie Zhou
@ 2021-10-14 4:52 ` Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 04/12] app/test: replace POSIX specific code Jie Zhou
` (9 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 4:52 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Remove unnecessary header inclusion
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/commands.c | 2 --
app/test/test.c | 1 -
app/test/test_cmdline_lib.c | 1 -
3 files changed, 4 deletions(-)
diff --git a/app/test/commands.c b/app/test/commands.c
index 76f6ee5d23..82bd8bf474 100644
--- a/app/test/commands.c
+++ b/app/test/commands.c
@@ -8,8 +8,6 @@
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
-#include <netinet/in.h>
-#include <termios.h>
#include <inttypes.h>
#include <errno.h>
#include <sys/queue.h>
diff --git a/app/test/test.c b/app/test/test.c
index 173d202e47..52fac24213 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index d5a09b4541..86a5b78d70 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v5 04/12] app/test: replace POSIX specific code
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 00/12] app/test: enable subset of " Jie Zhou
` (2 preceding siblings ...)
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 03/12] app/test: remove unnecessary headers Jie Zhou
@ 2021-10-14 4:52 ` Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 05/12] app/test: exclude ENOTSUP as failure Jie Zhou
` (8 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 4:52 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Include rte_os_shim.h
- Replace sleep and usleep with rte_delay_us_sleep
- #ifndef RTE_EXEC_ENV_WINDOWS for POSIX code only
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +++-
app/test/test.c | 4 ++++
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline.c | 2 ++
app/test/test_crc.c | 1 -
app/test/test_mp_secondary.c | 2 ++
app/test/test_pmd_perf.c | 6 +++++-
app/test/test_ring_stress.c | 3 ++-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_telemetry_data.c | 2 ++
11 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index 8ac24577ba..6b42b9b83b 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -5,6 +5,7 @@
#include <rte_byteorder.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
+#include <rte_os_shim.h>
#include "packet_burst_generator.h"
diff --git a/app/test/process.h b/app/test/process.h
index 5b10cf64df..1f073b9c5c 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -7,12 +7,14 @@
#include <errno.h> /* errno */
#include <limits.h> /* PATH_MAX */
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <libgen.h> /* basename et al */
+#include <sys/wait.h>
+#endif
#include <stdlib.h> /* NULL */
#include <string.h> /* strerror */
#include <unistd.h> /* readlink */
#include <dirent.h>
-#include <sys/wait.h>
#include <rte_string_fns.h> /* strlcpy */
diff --git a/app/test/test.c b/app/test/test.c
index 52fac24213..e8f8ce8335 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -62,7 +62,9 @@ do_recursive_call(void)
const char *env_var;
int (*action_fn)(void);
} actions[] = {
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "run_secondary_instances", test_mp_secondary },
+#endif
#ifdef RTE_LIB_PDUMP
#ifdef RTE_NET_RING
{ "run_pdump_server_tests", test_pdump },
@@ -81,7 +83,9 @@ do_recursive_call(void)
{ "test_file_prefix", no_action },
{ "test_no_huge_flag", no_action },
#ifdef RTE_LIB_TIMER
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "timer_secondary_spawn_wait", test_timer_secondary },
+#endif
#endif
};
diff --git a/app/test/test_byteorder.c b/app/test/test_byteorder.c
index 03c08d9abf..de14ed539e 100644
--- a/app/test/test_byteorder.c
+++ b/app/test/test_byteorder.c
@@ -46,7 +46,7 @@ test_byteorder(void)
return -1;
res_u16 = rte_bswap16(0x1337);
- printf("const %"PRIx16" -> %"PRIx16"\n", 0x1337, res_u16);
+ printf("const %"PRIx16" -> %"PRIx16"\n", (uint16_t)0x1337, res_u16);
if (res_u16 != 0x3713)
return -1;
diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c
index 115bee966d..9a76bd299f 100644
--- a/app/test/test_cmdline.c
+++ b/app/test/test_cmdline.c
@@ -31,6 +31,7 @@ test_cmdline(void)
return -1;
if (test_parse_num_invalid_param() < 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
printf("Testing parsing IP addresses...\n");
if (test_parse_ipaddr_valid() < 0)
return -1;
@@ -38,6 +39,7 @@ test_cmdline(void)
return -1;
if (test_parse_ipaddr_invalid_param() < 0)
return -1;
+#endif
printf("Testing parsing strings...\n");
if (test_parse_string_valid() < 0)
return -1;
diff --git a/app/test/test_crc.c b/app/test/test_crc.c
index bf1d344359..0ed080e482 100644
--- a/app/test/test_crc.c
+++ b/app/test/test_crc.c
@@ -14,7 +14,6 @@
#define CRC32_VEC_LEN2 348
#define CRC16_VEC_LEN1 12
#define CRC16_VEC_LEN2 2
-#define LINE_LEN 75
/* CRC test vector */
static const uint8_t crc_vec[CRC_VEC_LEN] = {
diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c
index 5b6f05dbb1..da035348bd 100644
--- a/app/test/test_mp_secondary.c
+++ b/app/test/test_mp_secondary.c
@@ -14,7 +14,9 @@
#include <errno.h>
#include <string.h>
#include <unistd.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/wait.h>
+#endif
#include <libgen.h>
#include <dirent.h>
#include <limits.h>
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 3a248d512c..8698d24eac 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -298,6 +298,7 @@ reset_count(void)
idle = 0;
}
+#ifndef RTE_EXEC_ENV_WINDOWS
static void
stats_display(uint16_t port_id)
{
@@ -327,6 +328,7 @@ signal_handler(int signum)
if (signum == SIGUSR2)
stats_display(0);
}
+#endif
struct rte_mbuf **tx_burst;
@@ -638,7 +640,7 @@ exec_burst(uint32_t flags, int lcore)
i = (i >= conf->nb_ports - 1) ? 0 : (i + 1);
}
- sleep(5);
+ rte_delay_us(5 * US_PER_S);
/* only when polling second */
if (flags == SC_BURST_XMIT_FIRST)
@@ -669,8 +671,10 @@ test_pmd_perf(void)
printf("Start PMD RXTX cycles cost test.\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
signal(SIGUSR1, signal_handler);
signal(SIGUSR2, signal_handler);
+#endif
nb_ports = rte_eth_dev_count_avail();
if (nb_ports < NB_ETHPORTS_USED) {
diff --git a/app/test/test_ring_stress.c b/app/test/test_ring_stress.c
index 1af45e0fc8..ce3535c6b2 100644
--- a/app/test/test_ring_stress.c
+++ b/app/test/test_ring_stress.c
@@ -43,9 +43,10 @@ test_ring_stress(void)
n += test_ring_rts_stress.nb_case;
k += run_test(&test_ring_rts_stress);
+#ifndef RTE_EXEC_ENV_WINDOWS
n += test_ring_hts_stress.nb_case;
k += run_test(&test_ring_hts_stress);
-
+#endif
n += test_ring_mt_peek_stress.nb_case;
k += run_test(&test_ring_mt_peek_stress);
diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h
index f9ca63b908..feb4b96ea1 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -359,7 +359,7 @@ test_mt1(int (*test)(void *))
wrk_cmd = WRK_CMD_RUN;
rte_smp_wmb();
- usleep(run_time * US_PER_S);
+ rte_delay_us(run_time * US_PER_S);
/* signal worker to start test */
wrk_cmd = WRK_CMD_STOP;
diff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c
index 18b93db8ef..73eee293a1 100644
--- a/app/test/test_telemetry_data.c
+++ b/app/test/test_telemetry_data.c
@@ -4,7 +4,9 @@
#include <string.h>
#include <sys/socket.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/un.h>
+#endif
#include <unistd.h>
#include <limits.h>
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v5 05/12] app/test: exclude ENOTSUP as failure
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 00/12] app/test: enable subset of " Jie Zhou
` (3 preceding siblings ...)
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 04/12] app/test: replace POSIX specific code Jie Zhou
@ 2021-10-14 4:52 ` Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 06/12] app/test: skip interrupt tests on Windows Jie Zhou
` (7 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 4:52 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Check rte_errno to exclude ENOTSUP as failures in test_memory.c
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_memory.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index dbf6871e71..379b0f99ca 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -10,6 +10,7 @@
#include <rte_memory.h>
#include <rte_common.h>
#include <rte_memzone.h>
+#include <rte_errno.h>
#include "test.h"
@@ -63,7 +64,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
/* we're able to get memseg fd - try getting its offset */
ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
if (ret < 0) {
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
return -1;
}
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v5 06/12] app/test: skip interrupt tests on Windows
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 00/12] app/test: enable subset of " Jie Zhou
` (4 preceding siblings ...)
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 05/12] app/test: exclude ENOTSUP as failure Jie Zhou
@ 2021-10-14 4:52 ` Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 07/12] app/test: temporarily "skip" one cmdline test case Jie Zhou
` (6 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 4:52 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Even though test_interrupts.c can compile on Windows, skip interrupt
tests for now since majority of eal_interrupt on Windows are stubs.
Will remove the skip after interrupt being fully enabled on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_interrupts.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
index 233b14a70b..ab52362e01 100644
--- a/app/test/test_interrupts.c
+++ b/app/test/test_interrupts.c
@@ -12,6 +12,15 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_interrupt(void)
+{
+ printf("Interrupt on Windows is not fully supported yet, skipping test\n");
+ return TEST_SKIPPED;
+}
+#else
+
#define TEST_INTERRUPT_CHECK_INTERVAL 100 /* ms */
/* predefined interrupt handle types */
@@ -558,5 +567,6 @@ test_interrupt(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v5 07/12] app/test: temporarily "skip" one cmdline test case
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 00/12] app/test: enable subset of " Jie Zhou
` (5 preceding siblings ...)
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 06/12] app/test: skip interrupt tests on Windows Jie Zhou
@ 2021-10-14 4:52 ` Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 08/12] app/test: skip two logs_autotest cases on Windows Jie Zhou
` (5 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 4:52 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
cmdline tests pass except one failure at the test_cmdline_socket_fns
test case with error: failed to open /dev/null for reading!
Temporarily "skip" this case while enable all other passing cases.
Issue is tracked internally and will add the corresponding case on
Windows in future.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_cmdline_lib.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index 86a5b78d70..1ff5c0d7e6 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -140,6 +140,9 @@ test_cmdline_vt100_fns(void)
static int
test_cmdline_socket_fns(void)
{
+#ifdef RTE_EXEC_ENV_WINDOWS
+ return 0;
+#else
cmdline_parse_ctx_t ctx;
struct cmdline *cl;
@@ -179,6 +182,7 @@ test_cmdline_socket_fns(void)
printf("Error: function accepted null parameter!\n");
cmdline_free(cl);
return -1;
+#endif
}
static int
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v5 08/12] app/test: skip two logs_autotest cases on Windows
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 00/12] app/test: enable subset of " Jie Zhou
` (6 preceding siblings ...)
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 07/12] app/test: temporarily "skip" one cmdline test case Jie Zhou
@ 2021-10-14 4:52 ` Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 09/12] app/test: differentiate a strerror on different OS Jie Zhou
` (4 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 4:52 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
DPDK logs_autotest on Windows failed at "dynamic log types" tests.
The failures are on 2 test cases for rte_log_set_level_regexp API,
due to regular expression is not supported on Windows in DPDK yet
and regcomp/regexec are just stubs on Windows (in regex.h).
In app\test\test_logs.c, ifndef these two test cases, and for the
rte_log_set_level_pattern validation case following these two cases,
differentiate the expected log level passed into macro CHECK_LEVELS
Now logs_autotest completes for all dynamic log types and static log types.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_logs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/test/test_logs.c b/app/test/test_logs.c
index 7abb6eeca2..7c001c1ab3 100644
--- a/app/test/test_logs.c
+++ b/app/test/test_logs.c
@@ -113,6 +113,7 @@ test_logs(void)
rte_log_set_level(logtype1, RTE_LOG_ERR);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#ifndef RTE_EXEC_ENV_WINDOWS
rte_log_set_level_regexp("type$", RTE_LOG_EMERG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
@@ -121,7 +122,10 @@ test_logs(void)
rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_EMERG, RTE_LOG_EMERG);
-
+#else
+ ret = rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
+ CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#endif
/* set logtype level low to so we can test global level */
rte_log_set_level_pattern("logtype*", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_DEBUG, RTE_LOG_DEBUG, RTE_LOG_DEBUG);
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v5 09/12] app/test: differentiate a strerror on different OS
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 00/12] app/test: enable subset of " Jie Zhou
` (7 preceding siblings ...)
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 08/12] app/test: skip two logs_autotest cases on Windows Jie Zhou
@ 2021-10-14 4:52 ` Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 10/12] app/test: remove two alarm_autotest cases Jie Zhou
` (3 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 4:52 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
On Windows, strerror returns just "Unknown error" for errnum greater
than MAX_ERRNO, while linux and freebsd returns "Unknown error <num>",
which is the current expectation for errno_autotest. Differentiate
the error string on Windows to remove a "duplicate error code" failure.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_errno.c | 12 +++++++++++-
lib/eal/common/eal_common_errno.c | 4 ++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/app/test/test_errno.c b/app/test/test_errno.c
index 3ff0456a58..0db4fbc8b3 100644
--- a/app/test/test_errno.c
+++ b/app/test/test_errno.c
@@ -18,13 +18,19 @@ test_errno(void)
{
const char *rte_retval;
const char *libc_retval;
+
+#ifndef RTE_EXEC_ENV_WINDOWS
#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD has a colon in the string, unlike linux */
const char unknown_code_result[] = "Unknown error: %d";
#else
const char unknown_code_result[] = "Unknown error %d";
#endif
- char expected_libc_retval[sizeof(unknown_code_result)+3];
+ char expected_libc_retval[sizeof(unknown_code_result) + 3];
+#else
+ /* Windows doesn't return error number for error greater than MAX_errno*/
+ static const char expected_libc_retval[] = "Unknown error";
+#endif
/* use a small selection of standard errors for testing */
int std_errs[] = {EAGAIN, EBADF, EACCES, EINTR, EINVAL};
@@ -54,11 +60,13 @@ test_errno(void)
rte_retval, libc_retval);
if (strcmp(rte_retval, libc_retval) == 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
/* generate appropriate error string for unknown error number
* and then check that this is what we got back. If not, we have
* a duplicate error number that conflicts with errno.h */
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, rte_errs[i]);
+#endif
if ((strcmp(expected_libc_retval, libc_retval) != 0) &&
(strcmp("", libc_retval) != 0)){
printf("Error, duplicate error code %d\n", rte_errs[i]);
@@ -69,8 +77,10 @@ test_errno(void)
/* ensure that beyond RTE_MAX_ERRNO, we always get an unknown code */
rte_retval = rte_strerror(RTE_MAX_ERRNO + 1);
libc_retval = strerror(RTE_MAX_ERRNO + 1);
+#ifndef RTE_EXEC_ENV_WINDOWS
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, RTE_MAX_ERRNO + 1);
+#endif
printf("rte_strerror: '%s', strerror: '%s'\n",
rte_retval, libc_retval);
if ((strcmp(rte_retval, libc_retval) != 0) ||
diff --git a/lib/eal/common/eal_common_errno.c b/lib/eal/common/eal_common_errno.c
index f86802705a..4c4abb802e 100644
--- a/lib/eal/common/eal_common_errno.c
+++ b/lib/eal/common/eal_common_errno.c
@@ -37,7 +37,11 @@ rte_strerror(int errnum)
/* since some implementations of strerror_r throw an error
* themselves if errnum is too big, we handle that case here */
if (errnum >= RTE_MAX_ERRNO)
+#ifdef RTE_EXEC_ENV_WINDOWS
+ snprintf(ret, RETVAL_SZ, "Unknown error%s", sep);
+#else
snprintf(ret, RETVAL_SZ, "Unknown error%s %d", sep, errnum);
+#endif
else
switch (errnum){
case E_RTE_SECONDARY:
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v5 10/12] app/test: remove two alarm_autotest cases
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 00/12] app/test: enable subset of " Jie Zhou
` (8 preceding siblings ...)
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 09/12] app/test: differentiate a strerror on different OS Jie Zhou
@ 2021-10-14 4:52 ` Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 11/12] app/test: replace .sh scripts with .py scripts Jie Zhou
` (2 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 4:52 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Remove two alarm_autotest test cases which do bogus range check
on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_alarm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_alarm.c b/app/test/test_alarm.c
index b4034339b8..70e97a3109 100644
--- a/app/test/test_alarm.c
+++ b/app/test/test_alarm.c
@@ -10,6 +10,7 @@
#include "test.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
static volatile int flag;
static void
@@ -18,6 +19,7 @@ test_alarm_callback(void *cb_arg)
flag = 1;
printf("Callback setting flag - OK. [cb_arg = %p]\n", cb_arg);
}
+#endif
static int
test_alarm(void)
@@ -27,6 +29,7 @@ test_alarm(void)
return 0;
#endif
+#ifndef RTE_EXEC_ENV_WINDOWS
/* check if it will fail to set alarm with wrong us value */
printf("check if it will fail to set alarm with wrong ms values\n");
if (rte_eal_alarm_set(0, test_alarm_callback,
@@ -39,6 +42,7 @@ test_alarm(void)
printf("should not be successful with (UINT64_MAX-1) us value\n");
return -1;
}
+#endif
/* check if it will fail to set alarm with null callback parameter */
printf("check if it will fail to set alarm with null callback parameter\n");
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v5 11/12] app/test: replace .sh scripts with .py scripts
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 00/12] app/test: enable subset of " Jie Zhou
` (9 preceding siblings ...)
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 10/12] app/test: remove two alarm_autotest cases Jie Zhou
@ 2021-10-14 4:52 ` Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 12/12] app/test: enable subset of unit tests on Windows Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 00/12] app/test: enable subset of " Jie Zhou
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 4:52 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Add python script to get coremask
- Add python script to check if system supports hugepages
- Remove two corresponding .sh scripts
- Replace calling of .sh with corresponding .py in meson.build
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/get-coremask.sh | 13 -------------
app/test/get_coremask.py | 12 ++++++++++++
app/test/has-hugepage.sh | 11 -----------
app/test/has_hugepage.py | 25 +++++++++++++++++++++++++
app/test/meson.build | 7 ++++---
5 files changed, 41 insertions(+), 27 deletions(-)
delete mode 100755 app/test/get-coremask.sh
create mode 100644 app/test/get_coremask.py
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
diff --git a/app/test/get-coremask.sh b/app/test/get-coremask.sh
deleted file mode 100755
index bb8cf404d2..0000000000
--- a/app/test/get-coremask.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#! /bin/sh -e
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2019 Intel Corporation
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /sys/devices/system/cpu/present
-elif [ "$(uname)" = "FreeBSD" ] ; then
- ncpus=$(/sbin/sysctl -n hw.ncpu)
- echo 0-$(expr $ncpus - 1)
-else
-# fallback
- echo 0-3
-fi
diff --git a/app/test/get_coremask.py b/app/test/get_coremask.py
new file mode 100644
index 0000000000..13939bcf78
--- /dev/null
+++ b/app/test/get_coremask.py
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2021 Microsoft Corporation
+"""This script returns the system cpu range"""
+
+import multiprocessing
+
+cpucount = multiprocessing.cpu_count()
+if cpucount is None:
+ # use fallback cpu count
+ print("0-3")
+else:
+ print("0-" + str(cpucount - 1))
diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh
deleted file mode 100755
index d600fad319..0000000000
--- a/app/test/has-hugepage.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright 2020 Mellanox Technologies, Ltd
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /proc/sys/vm/nr_hugepages || echo 0
-elif [ "$(uname)" = "FreeBSD" ] ; then
- echo 1 # assume FreeBSD always has hugepages
-else
- echo 0
-fi
diff --git a/app/test/has_hugepage.py b/app/test/has_hugepage.py
new file mode 100644
index 0000000000..70107c61fd
--- /dev/null
+++ b/app/test/has_hugepage.py
@@ -0,0 +1,25 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2021 Microsoft Corporation
+"""This script checks if the system supports huge pages"""
+
+import platform
+import ctypes
+
+osName = platform.system()
+if osName == "Linux":
+ with open("/proc/sys/vm/nr_hugepages") as file_o:
+ content = file_o.read()
+ print(content)
+elif osName == "FreeBSD":
+ # Assume FreeBSD always has hugepages enabled
+ print("1")
+elif osName == "Windows":
+ # On Windows, determine if large page is supported based on the
+ # value returned by GetLargePageMinimum. If the return value is zero,
+ # the processor does not support large pages.
+ if ctypes.windll.kernel32.GetLargePageMinimum() > 0:
+ print("1")
+ else:
+ print("0")
+else:
+ print("0")
diff --git a/app/test/meson.build b/app/test/meson.build
index f144d8b8ed..e1d003eff4 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -451,7 +451,7 @@ dpdk_test = executable('dpdk-test',
driver_install_path),
install: true)
-has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
+has_hugepage = run_command(py3, 'has_hugepage.py').stdout().strip() != '0'
message('hugepage availability: @0@'.format(has_hugepage))
# some perf tests (eg: memcpy perf autotest)take very long
@@ -459,8 +459,9 @@ message('hugepage availability: @0@'.format(has_hugepage))
timeout_seconds = 600
timeout_seconds_fast = 10
-get_coremask = find_program('get-coremask.sh')
-num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip()
+list_of_cores = run_command(py3, 'get_coremask.py').stdout().strip()
+message('list of cores: @0@'.format(list_of_cores))
+num_cores_arg = '-l ' + list_of_cores
default_test_args = [num_cores_arg]
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v5 12/12] app/test: enable subset of unit tests on Windows
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 00/12] app/test: enable subset of " Jie Zhou
` (10 preceding siblings ...)
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 11/12] app/test: replace .sh scripts with .py scripts Jie Zhou
@ 2021-10-14 4:52 ` Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 00/12] app/test: enable subset of " Jie Zhou
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 4:52 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- For fast tests and perf tests, add test stubs to skip not supported
ones.
- For driver tests, just skip on Windows totally to avoid
unnecessary amount of test stubs. For example, there are about 30
cryptodev related tests (even though in the meson for CI it only
listed about half) which will be enabled by "patch-18949: app/test:
enable crypto unit tests on Windows".
- For dump tests, currently the tests hang on Windows which require
further investigation. Keep the dump test list just for non-Windows
for easier tracking.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/meson.build | 107 ++++++++++++-----------
app/test/test_acl.c | 12 +++
app/test/test_bpf.c | 15 +++-
app/test/test_cksum.c | 12 +++
app/test/test_cmdline_ipaddr.c | 5 ++
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 | 97 ++++++++++++++++++++
app/test/test_eal_fs.c | 12 +++
app/test/test_efd.c | 12 +++
app/test/test_efd_perf.c | 12 +++
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 | 17 +++-
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 | 12 +++
app/test/test_graph.c | 18 +++-
app/test/test_graph_perf.c | 16 +++-
app/test/test_hash_perf.c | 12 +++
app/test/test_ipfrag.c | 16 +++-
app/test/test_ipsec.c | 15 +++-
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 | 12 +++
app/test/test_lpm6.c | 14 ++-
app/test/test_lpm6_perf.c | 13 +++
app/test/test_lpm_perf.c | 12 +++
app/test/test_malloc.c | 17 +++-
app/test/test_mbuf.c | 13 ++-
app/test/test_member.c | 16 +++-
app/test/test_member_perf.c | 16 +++-
app/test/test_memcpy_perf.c | 18 +++-
app/test/test_mempool_perf.c | 12 +++
app/test/test_mp_secondary.c | 15 +++-
app/test/test_rawdev.c | 17 +++-
app/test/test_rcu_qsbr_perf.c | 12 +++
app/test/test_reciprocal_division.c | 12 +++
app/test/test_reciprocal_division_perf.c | 12 +++
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 | 16 +++-
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 ++++++-
67 files changed, 978 insertions(+), 114 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index e1d003eff4..059b14c812 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,12 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if is_windows
- build = false
- reason = 'not supported on Windows'
- subdir_done()
-endif
-
if not get_option('tests')
subdir_done()
endif
@@ -154,36 +148,19 @@ test_sources = files(
)
test_deps = [
- 'acl',
'bus_pci',
'bus_vdev',
'bitratestats',
- 'bpf',
'cfgfile',
'cmdline',
- 'cryptodev',
- 'distributor',
'efd',
'ethdev',
- 'eventdev',
- 'fib',
- 'flow_classify',
- 'graph',
'hash',
- 'ipsec',
'latencystats',
'lpm',
- 'member',
'metrics',
- 'node',
- 'pipeline',
- 'port',
- 'rawdev',
'rcu',
- 'reorder',
- 'rib',
'ring',
- 'security',
'stack',
'telemetry',
'timer',
@@ -318,38 +295,66 @@ perf_test_names = [
]
driver_test_names = [
- 'cryptodev_aesni_mb_autotest',
- 'cryptodev_aesni_gcm_autotest',
- 'cryptodev_cn9k_autotest',
- 'cryptodev_cn10k_autotest',
- 'cryptodev_dpaa_sec_autotest',
- 'cryptodev_dpaa2_sec_autotest',
- 'cryptodev_null_autotest',
- 'cryptodev_octeontx2_autotest',
- 'cryptodev_openssl_autotest',
- 'cryptodev_openssl_asym_autotest',
- 'cryptodev_qat_autotest',
- 'cryptodev_sw_armv8_autotest',
- 'cryptodev_sw_kasumi_autotest',
- 'cryptodev_sw_mvsam_autotest',
- 'cryptodev_sw_snow3g_autotest',
- 'cryptodev_sw_zuc_autotest',
- 'eventdev_selftest_octeontx',
- 'eventdev_selftest_sw',
- 'rawdev_autotest',
]
dump_test_names = [
- 'dump_struct_sizes',
- 'dump_mempool',
- 'dump_malloc_stats',
- 'dump_devargs',
- 'dump_log_types',
- 'dump_ring',
- 'dump_physmem',
- 'dump_memzone',
]
+if not is_windows
+ test_deps += [
+ 'acl',
+ 'bpf',
+ 'cryptodev',
+ 'distributor',
+ 'eventdev',
+ 'fib',
+ 'flow_classify',
+ 'graph',
+ 'ipsec',
+ 'member',
+ 'node',
+ 'pipeline',
+ 'port',
+ 'rawdev',
+ 'reorder',
+ 'rib',
+ 'security',
+ ]
+
+ driver_test_names += [
+ 'cryptodev_aesni_mb_autotest',
+ 'cryptodev_aesni_gcm_autotest',
+ 'cryptodev_cn9k_autotest',
+ 'cryptodev_cn10k_autotest',
+ 'cryptodev_dpaa_sec_autotest',
+ 'cryptodev_dpaa2_sec_autotest',
+ 'cryptodev_null_autotest',
+ 'cryptodev_octeontx2_autotest',
+ 'cryptodev_openssl_autotest',
+ 'cryptodev_openssl_asym_autotest',
+ 'cryptodev_qat_autotest',
+ 'cryptodev_sw_armv8_autotest',
+ 'cryptodev_sw_kasumi_autotest',
+ 'cryptodev_sw_mvsam_autotest',
+ 'cryptodev_sw_snow3g_autotest',
+ 'cryptodev_sw_zuc_autotest',
+ 'eventdev_selftest_octeontx',
+ 'eventdev_selftest_sw',
+ 'rawdev_autotest',
+ ]
+
+ dump_test_names += [
+ 'dump_struct_sizes',
+ 'dump_mempool',
+ 'dump_malloc_stats',
+ 'dump_devargs',
+ 'dump_log_types',
+ 'dump_ring',
+ 'dump_physmem',
+ 'dump_memzone',
+ ]
+endif
+
# The following linkages are an exception to allow running the
# unit tests without requiring that the developer install the
# DPDK libraries. Explicit linkage of drivers (plugin libraries)
@@ -363,7 +368,7 @@ endif
if dpdk_conf.has('RTE_EVENT_SKELETON')
test_deps += 'event_skeleton'
endif
-if dpdk_conf.has('RTE_LIB_TELEMETRY')
+if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
endif
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 <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 /*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 8118a1849b..f00eb0f349 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -13,11 +13,22 @@
#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.
@@ -3232,4 +3243,6 @@ test_bpf(void)
return rc;
}
+#endif
+
REGISTER_TEST_COMMAND(bpf_autotest, test_bpf);
diff --git a/app/test/test_cksum.c b/app/test/test_cksum.c
index cd983d7c01..3c5bfc8671 100644
--- a/app/test/test_cksum.c
+++ b/app/test/test_cksum.c
@@ -13,6 +13,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_cksum(void)
+{
+ printf("cksum not supported, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MEMPOOL_CACHE_SIZE 0
#define MBUF_DATA_SIZE 256
#define NB_MBUF 128
@@ -268,4 +278,6 @@ test_cksum(void)
}
#undef GOTO_FAIL
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(cksum_autotest, test_cksum);
diff --git a/app/test/test_cmdline_ipaddr.c b/app/test/test_cmdline_ipaddr.c
index 2a1ee120fc..ff039a304f 100644
--- a/app/test/test_cmdline_ipaddr.c
+++ b/app/test/test_cmdline_ipaddr.c
@@ -2,9 +2,12 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
+
#include <netinet/in.h>
#include <sys/socket.h>
@@ -669,3 +672,5 @@ test_parse_ipaddr_invalid_param(void)
}
return 0;
}
+
+#endif /*ifndef RTE_EXEC_ENV_WINDOWS*/
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 65b64e1af0..10200751f8 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 <time.h>
#include <rte_common.h>
@@ -15462,3 +15464,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 9d19a6d6d9..680ced4dbe 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 <rte_bus_vdev.h>
#include <rte_common.h>
#include <rte_hexdump.h>
@@ -2429,3 +2431,5 @@ REGISTER_TEST_COMMAND(cryptodev_octeontx2_asym_autotest,
test_cryptodev_octeontx2_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 3cdb2c96e8..a4434c020f 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 <rte_common.h>
#include <rte_hexdump.h>
#include <rte_mbuf.h>
@@ -1218,3 +1220,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 bcd9746c98..d573b64265 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 <rte_common.h>
#include <rte_cryptodev.h>
#include <rte_esp.h>
@@ -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 <time.h>
#include <rte_common.h>
@@ -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 <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 /*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 <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 @@ 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 fdbeae6d2f..c4b4c7fd97 100644
--- a/app/test/test_distributor_perf.c
+++ b/app/test/test_distributor_perf.c
@@ -10,6 +10,17 @@
#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>
@@ -267,4 +278,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 1d18a0ba8f..91908e5065 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -9,6 +9,101 @@
#include <string.h>
#include <stdarg.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_eal_flags(void)
+{
+ printf("eal_flags not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+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 <libgen.h>
#include <stdlib.h>
#include <errno.h>
@@ -1579,6 +1674,8 @@ test_eal_flags(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(eal_flags_autotest, test_eal_flags);
/* subtests used in meson for CI */
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..8494c9df2a 100644
--- a/app/test/test_efd.c
+++ b/app/test/test_efd.c
@@ -12,6 +12,16 @@
#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
+
#define EFD_TEST_KEY_LEN 8
#define TABLE_SIZE (1 << 21)
#define ITERATIONS 3
@@ -462,4 +472,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..16fb5f7f2c 100644
--- a/app/test/test_efd_perf.c
+++ b/app/test/test_efd_perf.c
@@ -15,6 +15,16 @@
#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
+
#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 0c7ebe6981..feeb3b62c6 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 <string.h>
#include <rte_common.h>
#include <rte_mempool.h>
#include <rte_mbuf.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_cryptodev.h>
#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
@@ -1003,5 +1014,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 add4d8a678..19ad36413c 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 <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
@@ -786,6 +805,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 <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 /*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 121c2d93e8..c858e6233f 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 <math.h>
@@ -11,6 +12,17 @@
#include <rte_debug.h>
#include <rte_eal.h>
#include <rte_ethdev.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_event_timer_adapter_func(void)
+{
+ printf("event_timer_adapter not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <rte_eventdev.h>
#include <rte_event_timer_adapter.h>
#include <rte_mempool.h>
@@ -22,8 +34,6 @@
#include <rte_service.h>
#include <stdbool.h>
-#include "test.h"
-
/* 4K timers corresponds to sw evdev max inflight events */
#define MAX_TIMERS (4 * 1024)
#define BKT_TCK_NSEC
@@ -1953,4 +1963,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 843d9766b0..fee2ecaa22 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 <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
@@ -1048,7 +1058,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);
@@ -1058,3 +1072,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..a19864dec5 100644
--- a/app/test/test_external_mem.c
+++ b/app/test/test_external_mem.c
@@ -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 /*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 e46b9934fe..d991017d58 100644
--- a/app/test/test_fib.c
+++ b/app/test/test_fib.c
@@ -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);
@@ -410,5 +428,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 74abfc7a5d..7545a3496f 100644
--- a/app/test/test_fib6.c
+++ b/app/test/test_fib6.c
@@ -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);
@@ -419,5 +437,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 56c799b2e9..22e8adb738 100644
--- a/app/test/test_fib6_perf.c
+++ b/app/test/test_fib6_perf.c
@@ -10,9 +10,21 @@
#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 { \
@@ -154,4 +166,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 dd2e54db8b..c0c44c3fd5 100644
--- a/app/test/test_fib_perf.c
+++ b/app/test/test_fib_perf.c
@@ -12,11 +12,22 @@
#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__); \
@@ -408,4 +419,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 951606f248..a6b0eece3d 100644
--- a/app/test/test_flow_classify.c
+++ b/app/test/test_flow_classify.c
@@ -11,6 +11,17 @@
#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 /*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 838ab6f0f9..45f8484349 100644
--- a/app/test/test_func_reentrancy.c
+++ b/app/test/test_func_reentrancy.c
@@ -41,6 +41,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_func_reentrancy(void)
+{
+ printf("reentrancy not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
typedef int (*case_func_t)(void* arg);
typedef void (*case_clean_t)(unsigned lcore_id);
@@ -512,4 +522,6 @@ test_func_reentrancy(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(func_reentrancy_autotest, test_func_reentrancy);
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 <assert.h>
#include <inttypes.h>
#include <signal.h>
@@ -9,14 +11,23 @@
#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 +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 <inttypes.h>
#include <signal.h>
#include <stdio.h>
@@ -9,14 +11,22 @@
#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 +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 76cdac5d53..4229f85aa7 100644
--- a/app/test/test_hash_perf.c
+++ b/app/test/test_hash_perf.c
@@ -17,6 +17,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_hash_perf(void)
+{
+ printf("hash_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ENTRIES (1 << 19)
#define KEYS_TO_ADD (MAX_ENTRIES)
#define ADD_PERCENT 0.75 /* 75% table utilization */
@@ -749,4 +759,6 @@ test_hash_perf(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(hash_perf_autotest, test_hash_perf);
diff --git a/app/test/test_ipfrag.c b/app/test/test_ipfrag.c
index da8c212f92..926a621f72 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 <time.h>
@@ -8,13 +9,22 @@
#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
@@ -259,4 +269,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 c6d6b88d6d..73a433a5b6 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 <time.h>
@@ -13,15 +14,25 @@
#include <rte_bus_vdev.h>
#include <rte_ip.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_crypto.h>
#include <rte_cryptodev.h>
#include <rte_lcore.h>
+
#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 /*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 <stdio.h>
#include <rte_ip.h>
@@ -8,10 +9,20 @@
#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 +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 <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 +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 96733554b6..d0680886db 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 <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>
diff --git a/app/test/test_lcores.c b/app/test/test_lcores.c
index 19a7ab9fce..ab01197f40 100644
--- a/app/test/test_lcores.c
+++ b/app/test/test_lcores.c
@@ -11,6 +11,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_lcores(void)
+{
+ printf("lcore not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
struct thread_context {
enum { INIT, ERROR, DONE } state;
bool lcore_id_any;
@@ -370,4 +380,6 @@ test_lcores(void)
return TEST_SUCCESS;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(lcores_autotest, test_lcores);
diff --git a/app/test/test_lpm6.c b/app/test/test_lpm6.c
index 0d664546fa..cd9bc969b7 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 <stdio.h>
#include <stdint.h>
@@ -8,9 +9,18 @@
#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 +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..51e9020acd 100644
--- a/app/test/test_lpm6_perf.c
+++ b/app/test/test_lpm6_perf.c
@@ -13,6 +13,17 @@
#include <rte_lpm6.h>
#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 "test_lpm6_data.h"
#define TEST_LPM_ASSERT(cond) do { \
@@ -160,4 +171,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..24d4e673bf 100644
--- a/app/test/test_lpm_perf.c
+++ b/app/test/test_lpm_perf.c
@@ -18,6 +18,16 @@
#include "test.h"
#include "test_xmmt_ops.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_lpm_perf(void)
+{
+ printf("lpm6_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
struct rte_lpm *lpm;
static struct rte_rcu_qsbr *rv;
static volatile uint8_t writer_done;
@@ -763,4 +773,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 afff0de9f0..0c0a6cd954 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 <stdio.h>
#include <stdint.h>
@@ -8,6 +9,17 @@
#include <stdarg.h>
#include <errno.h>
#include <stdlib.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_malloc(void)
+{
+ printf("malloc not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <sys/mman.h>
#include <sys/queue.h>
#include <unistd.h>
@@ -23,11 +35,8 @@
#include <rte_random.h>
#include <rte_string_fns.h>
-#include "test.h"
-
#define N 10000
-
static int
is_mem_on_socket(int32_t socket);
@@ -1080,4 +1089,6 @@ test_malloc(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(malloc_autotest, test_malloc);
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 9a248dfaea..aeb7f4171e 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 <string.h>
#include <stdarg.h>
@@ -34,7 +35,15 @@
#include <rte_tcp.h>
#include <rte_mbuf_dyn.h>
-#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_mbuf(void)
+{
+ printf("mbuf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
#define MEMPOOL_CACHE_SIZE 32
#define MBUF_DATA_SIZE 2048
@@ -2883,4 +2892,6 @@ test_mbuf(void)
}
#undef GOTO_FAIL
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(mbuf_autotest, test_mbuf);
diff --git a/app/test/test_member.c b/app/test/test_member.c
index 40aa4c8627..85f3a126b9 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 <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 +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 <stdio.h>
#include <inttypes.h>
@@ -11,9 +12,18 @@
#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 +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 c711e36ba7..e9388fa7c4 100644
--- a/app/test/test_memcpy_perf.c
+++ b/app/test/test_memcpy_perf.c
@@ -2,21 +2,31 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#include "test.h"
+
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_memcpy_perf(void)
+{
+ printf("memcpy_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <sys/time.h>
#include <rte_common.h>
#include <rte_cycles.h>
#include <rte_random.h>
#include <rte_malloc.h>
-
#include <rte_memcpy.h>
-#include "test.h"
-
/*
* Set this to the maximum buffer size you want to test. If it is 0, then the
* values in the buf_sizes[] array below will be used.
@@ -347,4 +357,6 @@ test_memcpy_perf(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(memcpy_perf_autotest, test_memcpy_perf);
diff --git a/app/test/test_mempool_perf.c b/app/test/test_mempool_perf.c
index 8f629736e8..193327a546 100644
--- a/app/test/test_mempool_perf.c
+++ b/app/test/test_mempool_perf.c
@@ -28,6 +28,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_mempool_perf(void)
+{
+ printf("mempool_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
/*
* Mempool performance
* =======
@@ -393,4 +403,6 @@ test_mempool_perf(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(mempool_perf_autotest, test_mempool_perf);
diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c
index da035348bd..518b88daa6 100644
--- a/app/test/test_mp_secondary.c
+++ b/app/test/test_mp_secondary.c
@@ -14,9 +14,18 @@
#include <errno.h>
#include <string.h>
#include <unistd.h>
-#ifndef RTE_EXEC_ENV_WINDOWS
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_mp_secondary(void)
+{
+ printf("mp_secondary not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <sys/wait.h>
-#endif
#include <libgen.h>
#include <dirent.h>
#include <limits.h>
@@ -214,4 +223,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_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 <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 /*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..9209fb2658 100644
--- a/app/test/test_rcu_qsbr_perf.c
+++ b/app/test/test_rcu_qsbr_perf.c
@@ -15,6 +15,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_rcu_qsbr_main(void)
+{
+ printf("rcu_qsbr_main not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
/* Check condition and return an error if true. */
static uint16_t enabled_core_ids[RTE_MAX_LCORE];
static unsigned int num_cores;
@@ -687,4 +697,6 @@ test_rcu_qsbr_main(void)
return -1;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
diff --git a/app/test/test_reciprocal_division.c b/app/test/test_reciprocal_division.c
index 8ea9b1d24d..8777211cd7 100644
--- a/app/test/test_reciprocal_division.c
+++ b/app/test/test_reciprocal_division.c
@@ -13,6 +13,16 @@
#include <rte_random.h>
#include <rte_reciprocal.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_reciprocal(void)
+{
+ printf("reciprocal not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ITERATIONS (1ULL << 32)
#define DIVIDE_ITER (100)
@@ -164,4 +174,6 @@ test_reciprocal(void)
return result;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(reciprocal_division, test_reciprocal);
diff --git a/app/test/test_reciprocal_division_perf.c b/app/test/test_reciprocal_division_perf.c
index 4f625873e5..66b004fa1b 100644
--- a/app/test/test_reciprocal_division_perf.c
+++ b/app/test/test_reciprocal_division_perf.c
@@ -13,6 +13,16 @@
#include <rte_random.h>
#include <rte_reciprocal.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_reciprocal_division_perf(void)
+{
+ printf("reciprocal_division_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ITERATIONS (1ULL << 32)
#define DIVIDE_ITER (1ULL << 28)
@@ -205,4 +215,6 @@ test_reciprocal_division_perf(void)
return result;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(reciprocal_division_perf, test_reciprocal_division_perf);
diff --git a/app/test/test_red.c b/app/test/test_red.c
index e973f3131e..d0200c13aa 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 <stdlib.h>
#include <stdio.h>
@@ -8,12 +9,34 @@
#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 +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 <stdio.h>
#include <unistd.h>
@@ -9,12 +10,20 @@
#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 +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 <medvedkinv@gmail.com>
* 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 +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 <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,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 <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 +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 060cf1ffa8..c31273941c 100644
--- a/app/test/test_security.c
+++ b/app/test/test_security.c
@@ -1,12 +1,24 @@
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
*/
+#include "test.h"
#include <rte_errno.h>
#include <rte_log.h>
#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_ether.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_security(void)
+{
+ printf("security not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <rte_security.h>
#include <rte_security_driver.h>
@@ -20,7 +32,7 @@
#endif
#include <rte_test.h>
-#include "test.h"
+
/**
* Security
@@ -2639,4 +2651,6 @@ test_security(void)
return unit_test_suite_runner(&security_testsuite);
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(security_autotest, test_security);
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 <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 +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 <rte_ip.h>
#include <rte_string_fns.h>
#include <rte_hexdump.h>
@@ -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 <string.h>
#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 aabf4375db..45dc7682d8 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 <string.h>
#include <rte_pipeline.h>
#include <rte_log.h>
@@ -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 <string.h>
#include <rte_byteorder.h>
#include <rte_table_lpm_ipv6.h>
@@ -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 16a9f1878b..a954aba50c 100644
--- a/app/test/test_timer_secondary.c
+++ b/app/test/test_timer_secondary.c
@@ -16,6 +16,17 @@
#include <rte_random.h>
#include "test.h"
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static 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 */
@@ -213,4 +224,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.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v6 00/12] app/test: enable subset of tests on Windows
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 00/12] app/test: enable subset of " Jie Zhou
` (11 preceding siblings ...)
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 12/12] app/test: enable subset of unit tests on Windows Jie Zhou
@ 2021-10-14 16:21 ` Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 01/12] lib: build libraries that some tests depend on Jie Zhou
` (12 more replies)
12 siblings, 13 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 16:21 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
This patchset is to enable a subset of unit tests on windows. It mainly includes:
- Enable building libraries on Windows that some tests depend on
- Replace POSIX specific codes
- Fix some lib and tests per failures investigation
- Replace .sh scripts with .py scripts for meson.build
- Enable build and run subset of unit tests on Windows
Future work:
- Work with CI/CD lab to onboard unit tests on Windows to catch regression
- Onboard more tests when more libraries are enabled on Windows
---
V2 changes:
- Fix compilation error on FreeBSD
- Fix email mismatch issue
- Add a missing space around "*"
---
V3 changes:
- Fix a misc c coding style issue
- Revise some commit title and message body
- Fix violations of PEP8 in new added Python scripts
- Add error handling in get_coremask.py
- Fix has_hugepage.py to check system support of hugepages
instead of checking privileges
- Fix test meson.build to run Python scripts using py3
- Consolidate lists of source files, test dep, etc. across all
platforms, with conditional extending on some platform(s)
---
V4 changes:
- Remove building of ip_frag, rib, and reorder libraries on Windows.
These three libs usually can be built on Windows without change.
However, in between the time of V3 and V4, there is regression in
upstream caused build failures of these three libs. Will separately
investigate and enable these libraries.
- Remove previous patch#2 (Enable mempool/stack on Windows) from this
patchset as it was separated out and merged as patch-19314.
- Consolidate the source files, deps, tests lists across platforms as
much as possible.
---
V5 changes:
- Remove a space between function name and open parenthesis '('
- Add back a header mistakenly deleted
---
V6 changes:
- Fix inconsistent static vs. non-static declarations
Jie Zhou (12):
lib: build libraries that some tests depend on
eal/windows: return ENOTSUP for not supported API
app/test: remove unnecessary headers
app/test: replace POSIX specific code
app/test: exclude ENOTSUP as failure
app/test: skip interrupt tests on Windows
app/test: temporarily "skip" one cmdline test case
app/test: skip two logs_autotest cases on Windows
app/test: differentiate a strerror on different OS
app/test: remove two alarm_autotest cases
app/test: replace .sh scripts with .py scripts
app/test: enable subset of unit tests on Windows
app/test/commands.c | 2 -
app/test/get-coremask.sh | 13 ---
app/test/get_coremask.py | 12 +++
app/test/has-hugepage.sh | 11 ---
app/test/has_hugepage.py | 25 +++++
app/test/meson.build | 114 ++++++++++++-----------
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +-
app/test/test.c | 5 +-
app/test/test_acl.c | 12 +++
app/test/test_alarm.c | 4 +
app/test/test_bpf.c | 15 ++-
app/test/test_byteorder.c | 2 +-
app/test/test_cksum.c | 12 +++
app/test/test_cmdline.c | 2 +
app/test/test_cmdline_ipaddr.c | 5 +
app/test/test_cmdline_lib.c | 5 +-
app/test/test_crc.c | 1 -
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 | 97 +++++++++++++++++++
app/test/test_eal_fs.c | 12 +++
app/test/test_efd.c | 12 +++
app/test/test_efd_perf.c | 12 +++
app/test/test_errno.c | 12 ++-
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 | 17 +++-
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 | 12 +++
app/test/test_graph.c | 18 +++-
app/test/test_graph_perf.c | 16 +++-
app/test/test_hash_perf.c | 12 +++
app/test/test_interrupts.c | 10 ++
app/test/test_ipfrag.c | 16 +++-
app/test/test_ipsec.c | 15 ++-
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 | 12 +++
app/test/test_logs.c | 6 +-
app/test/test_lpm6.c | 14 ++-
app/test/test_lpm6_perf.c | 13 +++
app/test/test_lpm_perf.c | 12 +++
app/test/test_malloc.c | 17 +++-
app/test/test_mbuf.c | 13 ++-
app/test/test_member.c | 16 +++-
app/test/test_member_perf.c | 16 +++-
app/test/test_memcpy_perf.c | 18 +++-
app/test/test_memory.c | 3 +-
app/test/test_mempool_perf.c | 12 +++
app/test/test_mp_secondary.c | 13 +++
app/test/test_pmd_perf.c | 6 +-
app/test/test_rawdev.c | 17 +++-
app/test/test_rcu_qsbr_perf.c | 12 +++
app/test/test_reciprocal_division.c | 12 +++
app/test/test_reciprocal_division_perf.c | 12 +++
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_ring_stress.c | 3 +-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_sched.c | 14 ++-
app/test/test_security.c | 16 +++-
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_telemetry_data.c | 2 +
app/test/test_timer_secondary.c | 13 +++
app/test/test_trace.c | 32 ++++++-
lib/eal/common/eal_common_errno.c | 4 +
lib/eal/windows/eal_memalloc.c | 6 +-
lib/meson.build | 2 +
91 files changed, 1085 insertions(+), 155 deletions(-)
delete mode 100755 app/test/get-coremask.sh
create mode 100644 app/test/get_coremask.py
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v6 01/12] lib: build libraries that some tests depend on
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 00/12] app/test: enable subset of " Jie Zhou
@ 2021-10-14 16:21 ` Jie Zhou
2021-10-25 15:38 ` Thomas Monjalon
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 02/12] eal/windows: return ENOTSUP for not supported API Jie Zhou
` (11 subsequent siblings)
12 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 16:21 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Enable building subset of libraries that tests depend on for Windows
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
lib/meson.build | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/meson.build b/lib/meson.build
index b2ba7258d8..bd6c27deef 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -82,9 +82,11 @@ if is_windows
'bitratestats',
'cryptodev',
'cfgfile',
+ 'efd',
'gro',
'gso',
'latencystats',
+ 'lpm',
'pdump',
'stack',
'security',
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v6 02/12] eal/windows: return ENOTSUP for not supported API
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 00/12] app/test: enable subset of " Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 01/12] lib: build libraries that some tests depend on Jie Zhou
@ 2021-10-14 16:21 ` Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 03/12] app/test: remove unnecessary headers Jie Zhou
` (10 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 16:21 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
UT memory_autotest on Windows has 2 failed cases on eal APIs
eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2
APIs are not supported on Windows yet. Should return ENOTSUP such that
in test_memory.c these 2 ENOTSUP cases will not be marked as failures,
same as other ENOTSUP cases.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
lib/eal/windows/eal_memalloc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/eal/windows/eal_memalloc.c b/lib/eal/windows/eal_memalloc.c
index 4459d59b1a..fffdd5b976 100644
--- a/lib/eal/windows/eal_memalloc.c
+++ b/lib/eal/windows/eal_memalloc.c
@@ -17,7 +17,7 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
RTE_SET_USED(list_idx);
RTE_SET_USED(seg_idx);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
@@ -28,7 +28,7 @@ eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
RTE_SET_USED(seg_idx);
RTE_SET_USED(offset);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
static int
@@ -433,7 +433,7 @@ eal_memalloc_sync_with_primary(void)
{
/* No multi-process support. */
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v6 03/12] app/test: remove unnecessary headers
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 00/12] app/test: enable subset of " Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 01/12] lib: build libraries that some tests depend on Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 02/12] eal/windows: return ENOTSUP for not supported API Jie Zhou
@ 2021-10-14 16:21 ` Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 04/12] app/test: replace POSIX specific code Jie Zhou
` (9 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 16:21 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Remove unnecessary header inclusion
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/commands.c | 2 --
app/test/test.c | 1 -
app/test/test_cmdline_lib.c | 1 -
3 files changed, 4 deletions(-)
diff --git a/app/test/commands.c b/app/test/commands.c
index 76f6ee5d23..82bd8bf474 100644
--- a/app/test/commands.c
+++ b/app/test/commands.c
@@ -8,8 +8,6 @@
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
-#include <netinet/in.h>
-#include <termios.h>
#include <inttypes.h>
#include <errno.h>
#include <sys/queue.h>
diff --git a/app/test/test.c b/app/test/test.c
index 173d202e47..52fac24213 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index d5a09b4541..86a5b78d70 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v6 04/12] app/test: replace POSIX specific code
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 00/12] app/test: enable subset of " Jie Zhou
` (2 preceding siblings ...)
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 03/12] app/test: remove unnecessary headers Jie Zhou
@ 2021-10-14 16:21 ` Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 05/12] app/test: exclude ENOTSUP as failure Jie Zhou
` (8 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 16:21 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Include rte_os_shim.h
- Replace sleep and usleep with rte_delay_us_sleep
- #ifndef RTE_EXEC_ENV_WINDOWS for POSIX code only
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +++-
app/test/test.c | 4 ++++
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline.c | 2 ++
app/test/test_crc.c | 1 -
app/test/test_mp_secondary.c | 2 ++
app/test/test_pmd_perf.c | 6 +++++-
app/test/test_ring_stress.c | 3 ++-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_telemetry_data.c | 2 ++
11 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index 8ac24577ba..6b42b9b83b 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -5,6 +5,7 @@
#include <rte_byteorder.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
+#include <rte_os_shim.h>
#include "packet_burst_generator.h"
diff --git a/app/test/process.h b/app/test/process.h
index 5b10cf64df..1f073b9c5c 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -7,12 +7,14 @@
#include <errno.h> /* errno */
#include <limits.h> /* PATH_MAX */
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <libgen.h> /* basename et al */
+#include <sys/wait.h>
+#endif
#include <stdlib.h> /* NULL */
#include <string.h> /* strerror */
#include <unistd.h> /* readlink */
#include <dirent.h>
-#include <sys/wait.h>
#include <rte_string_fns.h> /* strlcpy */
diff --git a/app/test/test.c b/app/test/test.c
index 52fac24213..e8f8ce8335 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -62,7 +62,9 @@ do_recursive_call(void)
const char *env_var;
int (*action_fn)(void);
} actions[] = {
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "run_secondary_instances", test_mp_secondary },
+#endif
#ifdef RTE_LIB_PDUMP
#ifdef RTE_NET_RING
{ "run_pdump_server_tests", test_pdump },
@@ -81,7 +83,9 @@ do_recursive_call(void)
{ "test_file_prefix", no_action },
{ "test_no_huge_flag", no_action },
#ifdef RTE_LIB_TIMER
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "timer_secondary_spawn_wait", test_timer_secondary },
+#endif
#endif
};
diff --git a/app/test/test_byteorder.c b/app/test/test_byteorder.c
index 03c08d9abf..de14ed539e 100644
--- a/app/test/test_byteorder.c
+++ b/app/test/test_byteorder.c
@@ -46,7 +46,7 @@ test_byteorder(void)
return -1;
res_u16 = rte_bswap16(0x1337);
- printf("const %"PRIx16" -> %"PRIx16"\n", 0x1337, res_u16);
+ printf("const %"PRIx16" -> %"PRIx16"\n", (uint16_t)0x1337, res_u16);
if (res_u16 != 0x3713)
return -1;
diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c
index 115bee966d..9a76bd299f 100644
--- a/app/test/test_cmdline.c
+++ b/app/test/test_cmdline.c
@@ -31,6 +31,7 @@ test_cmdline(void)
return -1;
if (test_parse_num_invalid_param() < 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
printf("Testing parsing IP addresses...\n");
if (test_parse_ipaddr_valid() < 0)
return -1;
@@ -38,6 +39,7 @@ test_cmdline(void)
return -1;
if (test_parse_ipaddr_invalid_param() < 0)
return -1;
+#endif
printf("Testing parsing strings...\n");
if (test_parse_string_valid() < 0)
return -1;
diff --git a/app/test/test_crc.c b/app/test/test_crc.c
index bf1d344359..0ed080e482 100644
--- a/app/test/test_crc.c
+++ b/app/test/test_crc.c
@@ -14,7 +14,6 @@
#define CRC32_VEC_LEN2 348
#define CRC16_VEC_LEN1 12
#define CRC16_VEC_LEN2 2
-#define LINE_LEN 75
/* CRC test vector */
static const uint8_t crc_vec[CRC_VEC_LEN] = {
diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c
index 5b6f05dbb1..da035348bd 100644
--- a/app/test/test_mp_secondary.c
+++ b/app/test/test_mp_secondary.c
@@ -14,7 +14,9 @@
#include <errno.h>
#include <string.h>
#include <unistd.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/wait.h>
+#endif
#include <libgen.h>
#include <dirent.h>
#include <limits.h>
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 3a248d512c..8698d24eac 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -298,6 +298,7 @@ reset_count(void)
idle = 0;
}
+#ifndef RTE_EXEC_ENV_WINDOWS
static void
stats_display(uint16_t port_id)
{
@@ -327,6 +328,7 @@ signal_handler(int signum)
if (signum == SIGUSR2)
stats_display(0);
}
+#endif
struct rte_mbuf **tx_burst;
@@ -638,7 +640,7 @@ exec_burst(uint32_t flags, int lcore)
i = (i >= conf->nb_ports - 1) ? 0 : (i + 1);
}
- sleep(5);
+ rte_delay_us(5 * US_PER_S);
/* only when polling second */
if (flags == SC_BURST_XMIT_FIRST)
@@ -669,8 +671,10 @@ test_pmd_perf(void)
printf("Start PMD RXTX cycles cost test.\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
signal(SIGUSR1, signal_handler);
signal(SIGUSR2, signal_handler);
+#endif
nb_ports = rte_eth_dev_count_avail();
if (nb_ports < NB_ETHPORTS_USED) {
diff --git a/app/test/test_ring_stress.c b/app/test/test_ring_stress.c
index 1af45e0fc8..ce3535c6b2 100644
--- a/app/test/test_ring_stress.c
+++ b/app/test/test_ring_stress.c
@@ -43,9 +43,10 @@ test_ring_stress(void)
n += test_ring_rts_stress.nb_case;
k += run_test(&test_ring_rts_stress);
+#ifndef RTE_EXEC_ENV_WINDOWS
n += test_ring_hts_stress.nb_case;
k += run_test(&test_ring_hts_stress);
-
+#endif
n += test_ring_mt_peek_stress.nb_case;
k += run_test(&test_ring_mt_peek_stress);
diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h
index f9ca63b908..feb4b96ea1 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -359,7 +359,7 @@ test_mt1(int (*test)(void *))
wrk_cmd = WRK_CMD_RUN;
rte_smp_wmb();
- usleep(run_time * US_PER_S);
+ rte_delay_us(run_time * US_PER_S);
/* signal worker to start test */
wrk_cmd = WRK_CMD_STOP;
diff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c
index 18b93db8ef..73eee293a1 100644
--- a/app/test/test_telemetry_data.c
+++ b/app/test/test_telemetry_data.c
@@ -4,7 +4,9 @@
#include <string.h>
#include <sys/socket.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/un.h>
+#endif
#include <unistd.h>
#include <limits.h>
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v6 05/12] app/test: exclude ENOTSUP as failure
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 00/12] app/test: enable subset of " Jie Zhou
` (3 preceding siblings ...)
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 04/12] app/test: replace POSIX specific code Jie Zhou
@ 2021-10-14 16:21 ` Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 06/12] app/test: skip interrupt tests on Windows Jie Zhou
` (7 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 16:21 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Check rte_errno to exclude ENOTSUP as failures in test_memory.c
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_memory.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index dbf6871e71..379b0f99ca 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -10,6 +10,7 @@
#include <rte_memory.h>
#include <rte_common.h>
#include <rte_memzone.h>
+#include <rte_errno.h>
#include "test.h"
@@ -63,7 +64,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
/* we're able to get memseg fd - try getting its offset */
ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
if (ret < 0) {
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
return -1;
}
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v6 06/12] app/test: skip interrupt tests on Windows
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 00/12] app/test: enable subset of " Jie Zhou
` (4 preceding siblings ...)
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 05/12] app/test: exclude ENOTSUP as failure Jie Zhou
@ 2021-10-14 16:21 ` Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 07/12] app/test: temporarily "skip" one cmdline test case Jie Zhou
` (6 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 16:21 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Even though test_interrupts.c can compile on Windows, skip interrupt
tests for now since majority of eal_interrupt on Windows are stubs.
Will remove the skip after interrupt being fully enabled on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_interrupts.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
index 233b14a70b..ab52362e01 100644
--- a/app/test/test_interrupts.c
+++ b/app/test/test_interrupts.c
@@ -12,6 +12,15 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_interrupt(void)
+{
+ printf("Interrupt on Windows is not fully supported yet, skipping test\n");
+ return TEST_SKIPPED;
+}
+#else
+
#define TEST_INTERRUPT_CHECK_INTERVAL 100 /* ms */
/* predefined interrupt handle types */
@@ -558,5 +567,6 @@ test_interrupt(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v6 07/12] app/test: temporarily "skip" one cmdline test case
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 00/12] app/test: enable subset of " Jie Zhou
` (5 preceding siblings ...)
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 06/12] app/test: skip interrupt tests on Windows Jie Zhou
@ 2021-10-14 16:21 ` Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 08/12] app/test: skip two logs_autotest cases on Windows Jie Zhou
` (5 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 16:21 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
cmdline tests pass except one failure at the test_cmdline_socket_fns
test case with error: failed to open /dev/null for reading!
Temporarily "skip" this case while enable all other passing cases.
Issue is tracked internally and will add the corresponding case on
Windows in future.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_cmdline_lib.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index 86a5b78d70..1ff5c0d7e6 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -140,6 +140,9 @@ test_cmdline_vt100_fns(void)
static int
test_cmdline_socket_fns(void)
{
+#ifdef RTE_EXEC_ENV_WINDOWS
+ return 0;
+#else
cmdline_parse_ctx_t ctx;
struct cmdline *cl;
@@ -179,6 +182,7 @@ test_cmdline_socket_fns(void)
printf("Error: function accepted null parameter!\n");
cmdline_free(cl);
return -1;
+#endif
}
static int
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v6 08/12] app/test: skip two logs_autotest cases on Windows
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 00/12] app/test: enable subset of " Jie Zhou
` (6 preceding siblings ...)
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 07/12] app/test: temporarily "skip" one cmdline test case Jie Zhou
@ 2021-10-14 16:21 ` Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 09/12] app/test: differentiate a strerror on different OS Jie Zhou
` (4 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 16:21 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
DPDK logs_autotest on Windows failed at "dynamic log types" tests.
The failures are on 2 test cases for rte_log_set_level_regexp API,
due to regular expression is not supported on Windows in DPDK yet
and regcomp/regexec are just stubs on Windows (in regex.h).
In app\test\test_logs.c, ifndef these two test cases, and for the
rte_log_set_level_pattern validation case following these two cases,
differentiate the expected log level passed into macro CHECK_LEVELS
Now logs_autotest completes for all dynamic log types and static log types.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_logs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/test/test_logs.c b/app/test/test_logs.c
index 7abb6eeca2..7c001c1ab3 100644
--- a/app/test/test_logs.c
+++ b/app/test/test_logs.c
@@ -113,6 +113,7 @@ test_logs(void)
rte_log_set_level(logtype1, RTE_LOG_ERR);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#ifndef RTE_EXEC_ENV_WINDOWS
rte_log_set_level_regexp("type$", RTE_LOG_EMERG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
@@ -121,7 +122,10 @@ test_logs(void)
rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_EMERG, RTE_LOG_EMERG);
-
+#else
+ ret = rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
+ CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#endif
/* set logtype level low to so we can test global level */
rte_log_set_level_pattern("logtype*", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_DEBUG, RTE_LOG_DEBUG, RTE_LOG_DEBUG);
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v6 09/12] app/test: differentiate a strerror on different OS
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 00/12] app/test: enable subset of " Jie Zhou
` (7 preceding siblings ...)
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 08/12] app/test: skip two logs_autotest cases on Windows Jie Zhou
@ 2021-10-14 16:21 ` Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 10/12] app/test: remove two alarm_autotest cases Jie Zhou
` (3 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 16:21 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
On Windows, strerror returns just "Unknown error" for errnum greater
than MAX_ERRNO, while linux and freebsd returns "Unknown error <num>",
which is the current expectation for errno_autotest. Differentiate
the error string on Windows to remove a "duplicate error code" failure.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_errno.c | 12 +++++++++++-
lib/eal/common/eal_common_errno.c | 4 ++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/app/test/test_errno.c b/app/test/test_errno.c
index 3ff0456a58..0db4fbc8b3 100644
--- a/app/test/test_errno.c
+++ b/app/test/test_errno.c
@@ -18,13 +18,19 @@ test_errno(void)
{
const char *rte_retval;
const char *libc_retval;
+
+#ifndef RTE_EXEC_ENV_WINDOWS
#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD has a colon in the string, unlike linux */
const char unknown_code_result[] = "Unknown error: %d";
#else
const char unknown_code_result[] = "Unknown error %d";
#endif
- char expected_libc_retval[sizeof(unknown_code_result)+3];
+ char expected_libc_retval[sizeof(unknown_code_result) + 3];
+#else
+ /* Windows doesn't return error number for error greater than MAX_errno*/
+ static const char expected_libc_retval[] = "Unknown error";
+#endif
/* use a small selection of standard errors for testing */
int std_errs[] = {EAGAIN, EBADF, EACCES, EINTR, EINVAL};
@@ -54,11 +60,13 @@ test_errno(void)
rte_retval, libc_retval);
if (strcmp(rte_retval, libc_retval) == 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
/* generate appropriate error string for unknown error number
* and then check that this is what we got back. If not, we have
* a duplicate error number that conflicts with errno.h */
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, rte_errs[i]);
+#endif
if ((strcmp(expected_libc_retval, libc_retval) != 0) &&
(strcmp("", libc_retval) != 0)){
printf("Error, duplicate error code %d\n", rte_errs[i]);
@@ -69,8 +77,10 @@ test_errno(void)
/* ensure that beyond RTE_MAX_ERRNO, we always get an unknown code */
rte_retval = rte_strerror(RTE_MAX_ERRNO + 1);
libc_retval = strerror(RTE_MAX_ERRNO + 1);
+#ifndef RTE_EXEC_ENV_WINDOWS
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, RTE_MAX_ERRNO + 1);
+#endif
printf("rte_strerror: '%s', strerror: '%s'\n",
rte_retval, libc_retval);
if ((strcmp(rte_retval, libc_retval) != 0) ||
diff --git a/lib/eal/common/eal_common_errno.c b/lib/eal/common/eal_common_errno.c
index f86802705a..4c4abb802e 100644
--- a/lib/eal/common/eal_common_errno.c
+++ b/lib/eal/common/eal_common_errno.c
@@ -37,7 +37,11 @@ rte_strerror(int errnum)
/* since some implementations of strerror_r throw an error
* themselves if errnum is too big, we handle that case here */
if (errnum >= RTE_MAX_ERRNO)
+#ifdef RTE_EXEC_ENV_WINDOWS
+ snprintf(ret, RETVAL_SZ, "Unknown error%s", sep);
+#else
snprintf(ret, RETVAL_SZ, "Unknown error%s %d", sep, errnum);
+#endif
else
switch (errnum){
case E_RTE_SECONDARY:
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v6 10/12] app/test: remove two alarm_autotest cases
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 00/12] app/test: enable subset of " Jie Zhou
` (8 preceding siblings ...)
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 09/12] app/test: differentiate a strerror on different OS Jie Zhou
@ 2021-10-14 16:21 ` Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 11/12] app/test: replace .sh scripts with .py scripts Jie Zhou
` (2 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 16:21 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Remove two alarm_autotest test cases which do bogus range check
on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_alarm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_alarm.c b/app/test/test_alarm.c
index b4034339b8..70e97a3109 100644
--- a/app/test/test_alarm.c
+++ b/app/test/test_alarm.c
@@ -10,6 +10,7 @@
#include "test.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
static volatile int flag;
static void
@@ -18,6 +19,7 @@ test_alarm_callback(void *cb_arg)
flag = 1;
printf("Callback setting flag - OK. [cb_arg = %p]\n", cb_arg);
}
+#endif
static int
test_alarm(void)
@@ -27,6 +29,7 @@ test_alarm(void)
return 0;
#endif
+#ifndef RTE_EXEC_ENV_WINDOWS
/* check if it will fail to set alarm with wrong us value */
printf("check if it will fail to set alarm with wrong ms values\n");
if (rte_eal_alarm_set(0, test_alarm_callback,
@@ -39,6 +42,7 @@ test_alarm(void)
printf("should not be successful with (UINT64_MAX-1) us value\n");
return -1;
}
+#endif
/* check if it will fail to set alarm with null callback parameter */
printf("check if it will fail to set alarm with null callback parameter\n");
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v6 11/12] app/test: replace .sh scripts with .py scripts
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 00/12] app/test: enable subset of " Jie Zhou
` (9 preceding siblings ...)
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 10/12] app/test: remove two alarm_autotest cases Jie Zhou
@ 2021-10-14 16:21 ` Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 12/12] app/test: enable subset of unit tests on Windows Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 00/11] app/test: enable subset of " Jie Zhou
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 16:21 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Add python script to get coremask
- Add python script to check if system supports hugepages
- Remove two corresponding .sh scripts
- Replace calling of .sh with corresponding .py in meson.build
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/get-coremask.sh | 13 -------------
app/test/get_coremask.py | 12 ++++++++++++
app/test/has-hugepage.sh | 11 -----------
app/test/has_hugepage.py | 25 +++++++++++++++++++++++++
app/test/meson.build | 7 ++++---
5 files changed, 41 insertions(+), 27 deletions(-)
delete mode 100755 app/test/get-coremask.sh
create mode 100644 app/test/get_coremask.py
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
diff --git a/app/test/get-coremask.sh b/app/test/get-coremask.sh
deleted file mode 100755
index bb8cf404d2..0000000000
--- a/app/test/get-coremask.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#! /bin/sh -e
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2019 Intel Corporation
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /sys/devices/system/cpu/present
-elif [ "$(uname)" = "FreeBSD" ] ; then
- ncpus=$(/sbin/sysctl -n hw.ncpu)
- echo 0-$(expr $ncpus - 1)
-else
-# fallback
- echo 0-3
-fi
diff --git a/app/test/get_coremask.py b/app/test/get_coremask.py
new file mode 100644
index 0000000000..13939bcf78
--- /dev/null
+++ b/app/test/get_coremask.py
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2021 Microsoft Corporation
+"""This script returns the system cpu range"""
+
+import multiprocessing
+
+cpucount = multiprocessing.cpu_count()
+if cpucount is None:
+ # use fallback cpu count
+ print("0-3")
+else:
+ print("0-" + str(cpucount - 1))
diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh
deleted file mode 100755
index d600fad319..0000000000
--- a/app/test/has-hugepage.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright 2020 Mellanox Technologies, Ltd
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /proc/sys/vm/nr_hugepages || echo 0
-elif [ "$(uname)" = "FreeBSD" ] ; then
- echo 1 # assume FreeBSD always has hugepages
-else
- echo 0
-fi
diff --git a/app/test/has_hugepage.py b/app/test/has_hugepage.py
new file mode 100644
index 0000000000..70107c61fd
--- /dev/null
+++ b/app/test/has_hugepage.py
@@ -0,0 +1,25 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2021 Microsoft Corporation
+"""This script checks if the system supports huge pages"""
+
+import platform
+import ctypes
+
+osName = platform.system()
+if osName == "Linux":
+ with open("/proc/sys/vm/nr_hugepages") as file_o:
+ content = file_o.read()
+ print(content)
+elif osName == "FreeBSD":
+ # Assume FreeBSD always has hugepages enabled
+ print("1")
+elif osName == "Windows":
+ # On Windows, determine if large page is supported based on the
+ # value returned by GetLargePageMinimum. If the return value is zero,
+ # the processor does not support large pages.
+ if ctypes.windll.kernel32.GetLargePageMinimum() > 0:
+ print("1")
+ else:
+ print("0")
+else:
+ print("0")
diff --git a/app/test/meson.build b/app/test/meson.build
index f144d8b8ed..e1d003eff4 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -451,7 +451,7 @@ dpdk_test = executable('dpdk-test',
driver_install_path),
install: true)
-has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
+has_hugepage = run_command(py3, 'has_hugepage.py').stdout().strip() != '0'
message('hugepage availability: @0@'.format(has_hugepage))
# some perf tests (eg: memcpy perf autotest)take very long
@@ -459,8 +459,9 @@ message('hugepage availability: @0@'.format(has_hugepage))
timeout_seconds = 600
timeout_seconds_fast = 10
-get_coremask = find_program('get-coremask.sh')
-num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip()
+list_of_cores = run_command(py3, 'get_coremask.py').stdout().strip()
+message('list of cores: @0@'.format(list_of_cores))
+num_cores_arg = '-l ' + list_of_cores
default_test_args = [num_cores_arg]
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v6 12/12] app/test: enable subset of unit tests on Windows
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 00/12] app/test: enable subset of " Jie Zhou
` (10 preceding siblings ...)
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 11/12] app/test: replace .sh scripts with .py scripts Jie Zhou
@ 2021-10-14 16:21 ` Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 00/11] app/test: enable subset of " Jie Zhou
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-14 16:21 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- For fast tests and perf tests, add test stubs to skip not supported
ones.
- For driver tests, just skip on Windows totally to avoid
unnecessary amount of test stubs. For example, there are about 30
cryptodev related tests (even though in the meson for CI it only
listed about half) which will be enabled by "patch-18949: app/test:
enable crypto unit tests on Windows".
- For dump tests, currently the tests hang on Windows which require
further investigation. Keep the dump test list just for non-Windows
for easier tracking.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/meson.build | 107 ++++++++++++-----------
app/test/test_acl.c | 12 +++
app/test/test_bpf.c | 15 +++-
app/test/test_cksum.c | 12 +++
app/test/test_cmdline_ipaddr.c | 5 ++
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 | 97 ++++++++++++++++++++
app/test/test_eal_fs.c | 12 +++
app/test/test_efd.c | 12 +++
app/test/test_efd_perf.c | 12 +++
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 | 17 +++-
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 | 12 +++
app/test/test_graph.c | 18 +++-
app/test/test_graph_perf.c | 16 +++-
app/test/test_hash_perf.c | 12 +++
app/test/test_ipfrag.c | 16 +++-
app/test/test_ipsec.c | 15 +++-
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 | 12 +++
app/test/test_lpm6.c | 14 ++-
app/test/test_lpm6_perf.c | 13 +++
app/test/test_lpm_perf.c | 12 +++
app/test/test_malloc.c | 17 +++-
app/test/test_mbuf.c | 13 ++-
app/test/test_member.c | 16 +++-
app/test/test_member_perf.c | 16 +++-
app/test/test_memcpy_perf.c | 18 +++-
app/test/test_mempool_perf.c | 12 +++
app/test/test_mp_secondary.c | 15 +++-
app/test/test_rawdev.c | 17 +++-
app/test/test_rcu_qsbr_perf.c | 12 +++
app/test/test_reciprocal_division.c | 12 +++
app/test/test_reciprocal_division_perf.c | 12 +++
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 | 16 +++-
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 ++++++-
67 files changed, 978 insertions(+), 114 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index e1d003eff4..059b14c812 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,12 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if is_windows
- build = false
- reason = 'not supported on Windows'
- subdir_done()
-endif
-
if not get_option('tests')
subdir_done()
endif
@@ -154,36 +148,19 @@ test_sources = files(
)
test_deps = [
- 'acl',
'bus_pci',
'bus_vdev',
'bitratestats',
- 'bpf',
'cfgfile',
'cmdline',
- 'cryptodev',
- 'distributor',
'efd',
'ethdev',
- 'eventdev',
- 'fib',
- 'flow_classify',
- 'graph',
'hash',
- 'ipsec',
'latencystats',
'lpm',
- 'member',
'metrics',
- 'node',
- 'pipeline',
- 'port',
- 'rawdev',
'rcu',
- 'reorder',
- 'rib',
'ring',
- 'security',
'stack',
'telemetry',
'timer',
@@ -318,38 +295,66 @@ perf_test_names = [
]
driver_test_names = [
- 'cryptodev_aesni_mb_autotest',
- 'cryptodev_aesni_gcm_autotest',
- 'cryptodev_cn9k_autotest',
- 'cryptodev_cn10k_autotest',
- 'cryptodev_dpaa_sec_autotest',
- 'cryptodev_dpaa2_sec_autotest',
- 'cryptodev_null_autotest',
- 'cryptodev_octeontx2_autotest',
- 'cryptodev_openssl_autotest',
- 'cryptodev_openssl_asym_autotest',
- 'cryptodev_qat_autotest',
- 'cryptodev_sw_armv8_autotest',
- 'cryptodev_sw_kasumi_autotest',
- 'cryptodev_sw_mvsam_autotest',
- 'cryptodev_sw_snow3g_autotest',
- 'cryptodev_sw_zuc_autotest',
- 'eventdev_selftest_octeontx',
- 'eventdev_selftest_sw',
- 'rawdev_autotest',
]
dump_test_names = [
- 'dump_struct_sizes',
- 'dump_mempool',
- 'dump_malloc_stats',
- 'dump_devargs',
- 'dump_log_types',
- 'dump_ring',
- 'dump_physmem',
- 'dump_memzone',
]
+if not is_windows
+ test_deps += [
+ 'acl',
+ 'bpf',
+ 'cryptodev',
+ 'distributor',
+ 'eventdev',
+ 'fib',
+ 'flow_classify',
+ 'graph',
+ 'ipsec',
+ 'member',
+ 'node',
+ 'pipeline',
+ 'port',
+ 'rawdev',
+ 'reorder',
+ 'rib',
+ 'security',
+ ]
+
+ driver_test_names += [
+ 'cryptodev_aesni_mb_autotest',
+ 'cryptodev_aesni_gcm_autotest',
+ 'cryptodev_cn9k_autotest',
+ 'cryptodev_cn10k_autotest',
+ 'cryptodev_dpaa_sec_autotest',
+ 'cryptodev_dpaa2_sec_autotest',
+ 'cryptodev_null_autotest',
+ 'cryptodev_octeontx2_autotest',
+ 'cryptodev_openssl_autotest',
+ 'cryptodev_openssl_asym_autotest',
+ 'cryptodev_qat_autotest',
+ 'cryptodev_sw_armv8_autotest',
+ 'cryptodev_sw_kasumi_autotest',
+ 'cryptodev_sw_mvsam_autotest',
+ 'cryptodev_sw_snow3g_autotest',
+ 'cryptodev_sw_zuc_autotest',
+ 'eventdev_selftest_octeontx',
+ 'eventdev_selftest_sw',
+ 'rawdev_autotest',
+ ]
+
+ dump_test_names += [
+ 'dump_struct_sizes',
+ 'dump_mempool',
+ 'dump_malloc_stats',
+ 'dump_devargs',
+ 'dump_log_types',
+ 'dump_ring',
+ 'dump_physmem',
+ 'dump_memzone',
+ ]
+endif
+
# The following linkages are an exception to allow running the
# unit tests without requiring that the developer install the
# DPDK libraries. Explicit linkage of drivers (plugin libraries)
@@ -363,7 +368,7 @@ endif
if dpdk_conf.has('RTE_EVENT_SKELETON')
test_deps += 'event_skeleton'
endif
-if dpdk_conf.has('RTE_LIB_TELEMETRY')
+if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
endif
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 <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 /*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 8118a1849b..f00eb0f349 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -13,11 +13,22 @@
#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.
@@ -3232,4 +3243,6 @@ test_bpf(void)
return rc;
}
+#endif
+
REGISTER_TEST_COMMAND(bpf_autotest, test_bpf);
diff --git a/app/test/test_cksum.c b/app/test/test_cksum.c
index cd983d7c01..3c5bfc8671 100644
--- a/app/test/test_cksum.c
+++ b/app/test/test_cksum.c
@@ -13,6 +13,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_cksum(void)
+{
+ printf("cksum not supported, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MEMPOOL_CACHE_SIZE 0
#define MBUF_DATA_SIZE 256
#define NB_MBUF 128
@@ -268,4 +278,6 @@ test_cksum(void)
}
#undef GOTO_FAIL
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(cksum_autotest, test_cksum);
diff --git a/app/test/test_cmdline_ipaddr.c b/app/test/test_cmdline_ipaddr.c
index 2a1ee120fc..ff039a304f 100644
--- a/app/test/test_cmdline_ipaddr.c
+++ b/app/test/test_cmdline_ipaddr.c
@@ -2,9 +2,12 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
+
#include <netinet/in.h>
#include <sys/socket.h>
@@ -669,3 +672,5 @@ test_parse_ipaddr_invalid_param(void)
}
return 0;
}
+
+#endif /*ifndef RTE_EXEC_ENV_WINDOWS*/
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 65b64e1af0..10200751f8 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 <time.h>
#include <rte_common.h>
@@ -15462,3 +15464,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 9d19a6d6d9..680ced4dbe 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 <rte_bus_vdev.h>
#include <rte_common.h>
#include <rte_hexdump.h>
@@ -2429,3 +2431,5 @@ REGISTER_TEST_COMMAND(cryptodev_octeontx2_asym_autotest,
test_cryptodev_octeontx2_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 3cdb2c96e8..a4434c020f 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 <rte_common.h>
#include <rte_hexdump.h>
#include <rte_mbuf.h>
@@ -1218,3 +1220,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 bcd9746c98..d573b64265 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 <rte_common.h>
#include <rte_cryptodev.h>
#include <rte_esp.h>
@@ -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 <time.h>
#include <rte_common.h>
@@ -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 <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 /*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 <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 @@ 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 fdbeae6d2f..c4b4c7fd97 100644
--- a/app/test/test_distributor_perf.c
+++ b/app/test/test_distributor_perf.c
@@ -10,6 +10,17 @@
#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>
@@ -267,4 +278,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 1d18a0ba8f..91908e5065 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -9,6 +9,101 @@
#include <string.h>
#include <stdarg.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_eal_flags(void)
+{
+ printf("eal_flags not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+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 <libgen.h>
#include <stdlib.h>
#include <errno.h>
@@ -1579,6 +1674,8 @@ test_eal_flags(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(eal_flags_autotest, test_eal_flags);
/* subtests used in meson for CI */
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..8494c9df2a 100644
--- a/app/test/test_efd.c
+++ b/app/test/test_efd.c
@@ -12,6 +12,16 @@
#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
+
#define EFD_TEST_KEY_LEN 8
#define TABLE_SIZE (1 << 21)
#define ITERATIONS 3
@@ -462,4 +472,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..16fb5f7f2c 100644
--- a/app/test/test_efd_perf.c
+++ b/app/test/test_efd_perf.c
@@ -15,6 +15,16 @@
#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
+
#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 0c7ebe6981..feeb3b62c6 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 <string.h>
#include <rte_common.h>
#include <rte_mempool.h>
#include <rte_mbuf.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_cryptodev.h>
#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
@@ -1003,5 +1014,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 add4d8a678..19ad36413c 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 <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
@@ -786,6 +805,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 <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 /*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 121c2d93e8..c858e6233f 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 <math.h>
@@ -11,6 +12,17 @@
#include <rte_debug.h>
#include <rte_eal.h>
#include <rte_ethdev.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_event_timer_adapter_func(void)
+{
+ printf("event_timer_adapter not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <rte_eventdev.h>
#include <rte_event_timer_adapter.h>
#include <rte_mempool.h>
@@ -22,8 +34,6 @@
#include <rte_service.h>
#include <stdbool.h>
-#include "test.h"
-
/* 4K timers corresponds to sw evdev max inflight events */
#define MAX_TIMERS (4 * 1024)
#define BKT_TCK_NSEC
@@ -1953,4 +1963,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 843d9766b0..fee2ecaa22 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 <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
@@ -1048,7 +1058,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);
@@ -1058,3 +1072,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..a19864dec5 100644
--- a/app/test/test_external_mem.c
+++ b/app/test/test_external_mem.c
@@ -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 /*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 e46b9934fe..d991017d58 100644
--- a/app/test/test_fib.c
+++ b/app/test/test_fib.c
@@ -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);
@@ -410,5 +428,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 74abfc7a5d..7545a3496f 100644
--- a/app/test/test_fib6.c
+++ b/app/test/test_fib6.c
@@ -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);
@@ -419,5 +437,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 56c799b2e9..22e8adb738 100644
--- a/app/test/test_fib6_perf.c
+++ b/app/test/test_fib6_perf.c
@@ -10,9 +10,21 @@
#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 { \
@@ -154,4 +166,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 dd2e54db8b..c0c44c3fd5 100644
--- a/app/test/test_fib_perf.c
+++ b/app/test/test_fib_perf.c
@@ -12,11 +12,22 @@
#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__); \
@@ -408,4 +419,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 951606f248..a6b0eece3d 100644
--- a/app/test/test_flow_classify.c
+++ b/app/test/test_flow_classify.c
@@ -11,6 +11,17 @@
#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 /*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 838ab6f0f9..45f8484349 100644
--- a/app/test/test_func_reentrancy.c
+++ b/app/test/test_func_reentrancy.c
@@ -41,6 +41,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_func_reentrancy(void)
+{
+ printf("reentrancy not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
typedef int (*case_func_t)(void* arg);
typedef void (*case_clean_t)(unsigned lcore_id);
@@ -512,4 +522,6 @@ test_func_reentrancy(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(func_reentrancy_autotest, test_func_reentrancy);
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 <assert.h>
#include <inttypes.h>
#include <signal.h>
@@ -9,14 +11,23 @@
#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 +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 <inttypes.h>
#include <signal.h>
#include <stdio.h>
@@ -9,14 +11,22 @@
#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 +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 76cdac5d53..4229f85aa7 100644
--- a/app/test/test_hash_perf.c
+++ b/app/test/test_hash_perf.c
@@ -17,6 +17,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_hash_perf(void)
+{
+ printf("hash_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ENTRIES (1 << 19)
#define KEYS_TO_ADD (MAX_ENTRIES)
#define ADD_PERCENT 0.75 /* 75% table utilization */
@@ -749,4 +759,6 @@ test_hash_perf(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(hash_perf_autotest, test_hash_perf);
diff --git a/app/test/test_ipfrag.c b/app/test/test_ipfrag.c
index da8c212f92..926a621f72 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 <time.h>
@@ -8,13 +9,22 @@
#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
@@ -259,4 +269,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 c6d6b88d6d..73a433a5b6 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 <time.h>
@@ -13,15 +14,25 @@
#include <rte_bus_vdev.h>
#include <rte_ip.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_crypto.h>
#include <rte_cryptodev.h>
#include <rte_lcore.h>
+
#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 /*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 <stdio.h>
#include <rte_ip.h>
@@ -8,10 +9,20 @@
#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 +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 <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 +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 96733554b6..d0680886db 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 <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>
diff --git a/app/test/test_lcores.c b/app/test/test_lcores.c
index 19a7ab9fce..ab01197f40 100644
--- a/app/test/test_lcores.c
+++ b/app/test/test_lcores.c
@@ -11,6 +11,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_lcores(void)
+{
+ printf("lcore not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
struct thread_context {
enum { INIT, ERROR, DONE } state;
bool lcore_id_any;
@@ -370,4 +380,6 @@ test_lcores(void)
return TEST_SUCCESS;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(lcores_autotest, test_lcores);
diff --git a/app/test/test_lpm6.c b/app/test/test_lpm6.c
index 0d664546fa..cd9bc969b7 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 <stdio.h>
#include <stdint.h>
@@ -8,9 +9,18 @@
#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 +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..51e9020acd 100644
--- a/app/test/test_lpm6_perf.c
+++ b/app/test/test_lpm6_perf.c
@@ -13,6 +13,17 @@
#include <rte_lpm6.h>
#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 "test_lpm6_data.h"
#define TEST_LPM_ASSERT(cond) do { \
@@ -160,4 +171,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..24d4e673bf 100644
--- a/app/test/test_lpm_perf.c
+++ b/app/test/test_lpm_perf.c
@@ -18,6 +18,16 @@
#include "test.h"
#include "test_xmmt_ops.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_lpm_perf(void)
+{
+ printf("lpm6_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
struct rte_lpm *lpm;
static struct rte_rcu_qsbr *rv;
static volatile uint8_t writer_done;
@@ -763,4 +773,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 afff0de9f0..0c0a6cd954 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 <stdio.h>
#include <stdint.h>
@@ -8,6 +9,17 @@
#include <stdarg.h>
#include <errno.h>
#include <stdlib.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_malloc(void)
+{
+ printf("malloc not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <sys/mman.h>
#include <sys/queue.h>
#include <unistd.h>
@@ -23,11 +35,8 @@
#include <rte_random.h>
#include <rte_string_fns.h>
-#include "test.h"
-
#define N 10000
-
static int
is_mem_on_socket(int32_t socket);
@@ -1080,4 +1089,6 @@ test_malloc(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(malloc_autotest, test_malloc);
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 9a248dfaea..aeb7f4171e 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 <string.h>
#include <stdarg.h>
@@ -34,7 +35,15 @@
#include <rte_tcp.h>
#include <rte_mbuf_dyn.h>
-#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_mbuf(void)
+{
+ printf("mbuf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
#define MEMPOOL_CACHE_SIZE 32
#define MBUF_DATA_SIZE 2048
@@ -2883,4 +2892,6 @@ test_mbuf(void)
}
#undef GOTO_FAIL
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(mbuf_autotest, test_mbuf);
diff --git a/app/test/test_member.c b/app/test/test_member.c
index 40aa4c8627..85f3a126b9 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 <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 +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 <stdio.h>
#include <inttypes.h>
@@ -11,9 +12,18 @@
#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 +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 c711e36ba7..e9388fa7c4 100644
--- a/app/test/test_memcpy_perf.c
+++ b/app/test/test_memcpy_perf.c
@@ -2,21 +2,31 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#include "test.h"
+
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_memcpy_perf(void)
+{
+ printf("memcpy_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <sys/time.h>
#include <rte_common.h>
#include <rte_cycles.h>
#include <rte_random.h>
#include <rte_malloc.h>
-
#include <rte_memcpy.h>
-#include "test.h"
-
/*
* Set this to the maximum buffer size you want to test. If it is 0, then the
* values in the buf_sizes[] array below will be used.
@@ -347,4 +357,6 @@ test_memcpy_perf(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(memcpy_perf_autotest, test_memcpy_perf);
diff --git a/app/test/test_mempool_perf.c b/app/test/test_mempool_perf.c
index 8f629736e8..193327a546 100644
--- a/app/test/test_mempool_perf.c
+++ b/app/test/test_mempool_perf.c
@@ -28,6 +28,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_mempool_perf(void)
+{
+ printf("mempool_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
/*
* Mempool performance
* =======
@@ -393,4 +403,6 @@ test_mempool_perf(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(mempool_perf_autotest, test_mempool_perf);
diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c
index da035348bd..dcfcc8a32a 100644
--- a/app/test/test_mp_secondary.c
+++ b/app/test/test_mp_secondary.c
@@ -14,9 +14,18 @@
#include <errno.h>
#include <string.h>
#include <unistd.h>
-#ifndef RTE_EXEC_ENV_WINDOWS
+
+#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>
-#endif
#include <libgen.h>
#include <dirent.h>
#include <limits.h>
@@ -214,4 +223,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_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 <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 /*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..9209fb2658 100644
--- a/app/test/test_rcu_qsbr_perf.c
+++ b/app/test/test_rcu_qsbr_perf.c
@@ -15,6 +15,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_rcu_qsbr_main(void)
+{
+ printf("rcu_qsbr_main not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
/* Check condition and return an error if true. */
static uint16_t enabled_core_ids[RTE_MAX_LCORE];
static unsigned int num_cores;
@@ -687,4 +697,6 @@ test_rcu_qsbr_main(void)
return -1;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
diff --git a/app/test/test_reciprocal_division.c b/app/test/test_reciprocal_division.c
index 8ea9b1d24d..8777211cd7 100644
--- a/app/test/test_reciprocal_division.c
+++ b/app/test/test_reciprocal_division.c
@@ -13,6 +13,16 @@
#include <rte_random.h>
#include <rte_reciprocal.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_reciprocal(void)
+{
+ printf("reciprocal not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ITERATIONS (1ULL << 32)
#define DIVIDE_ITER (100)
@@ -164,4 +174,6 @@ test_reciprocal(void)
return result;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(reciprocal_division, test_reciprocal);
diff --git a/app/test/test_reciprocal_division_perf.c b/app/test/test_reciprocal_division_perf.c
index 4f625873e5..66b004fa1b 100644
--- a/app/test/test_reciprocal_division_perf.c
+++ b/app/test/test_reciprocal_division_perf.c
@@ -13,6 +13,16 @@
#include <rte_random.h>
#include <rte_reciprocal.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_reciprocal_division_perf(void)
+{
+ printf("reciprocal_division_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ITERATIONS (1ULL << 32)
#define DIVIDE_ITER (1ULL << 28)
@@ -205,4 +215,6 @@ test_reciprocal_division_perf(void)
return result;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(reciprocal_division_perf, test_reciprocal_division_perf);
diff --git a/app/test/test_red.c b/app/test/test_red.c
index e973f3131e..d0200c13aa 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 <stdlib.h>
#include <stdio.h>
@@ -8,12 +9,34 @@
#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 +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 <stdio.h>
#include <unistd.h>
@@ -9,12 +10,20 @@
#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 +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 <medvedkinv@gmail.com>
* 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 +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 <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,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 <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 +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 060cf1ffa8..c31273941c 100644
--- a/app/test/test_security.c
+++ b/app/test/test_security.c
@@ -1,12 +1,24 @@
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
*/
+#include "test.h"
#include <rte_errno.h>
#include <rte_log.h>
#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_ether.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_security(void)
+{
+ printf("security not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <rte_security.h>
#include <rte_security_driver.h>
@@ -20,7 +32,7 @@
#endif
#include <rte_test.h>
-#include "test.h"
+
/**
* Security
@@ -2639,4 +2651,6 @@ test_security(void)
return unit_test_suite_runner(&security_testsuite);
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(security_autotest, test_security);
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 <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 +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 <rte_ip.h>
#include <rte_string_fns.h>
#include <rte_hexdump.h>
@@ -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 <string.h>
#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 aabf4375db..45dc7682d8 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 <string.h>
#include <rte_pipeline.h>
#include <rte_log.h>
@@ -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 <string.h>
#include <rte_byteorder.h>
#include <rte_table_lpm_ipv6.h>
@@ -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 16a9f1878b..002a7b8ad6 100644
--- a/app/test/test_timer_secondary.c
+++ b/app/test/test_timer_secondary.c
@@ -16,6 +16,17 @@
#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 */
@@ -213,4 +224,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.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [dpdk-dev] [PATCH v6 01/12] lib: build libraries that some tests depend on
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 01/12] lib: build libraries that some tests depend on Jie Zhou
@ 2021-10-25 15:38 ` Thomas Monjalon
2021-10-26 0:47 ` Jie Zhou
0 siblings, 1 reply; 245+ messages in thread
From: Thomas Monjalon @ 2021-10-25 15:38 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, aconole
14/10/2021 18:21, Jie Zhou:
> Enable building subset of libraries that tests depend on for Windows
>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
> lib/meson.build | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/lib/meson.build b/lib/meson.build
> index b2ba7258d8..bd6c27deef 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -82,9 +82,11 @@ if is_windows
> 'bitratestats',
> 'cryptodev',
> 'cfgfile',
> + 'efd',
> 'gro',
> 'gso',
> 'latencystats',
> + 'lpm',
> 'pdump',
> 'stack',
> 'security',
>
It needs to be rebased after the recent changes to disable libs on Windows.
But instead of such patch, I would prefer one patch per lib,
with Tested-by tags showing that the lib is tested and working on Windows.
Also you need to Cc the maintainer of the lib being enabled.
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [dpdk-dev] [PATCH v6 01/12] lib: build libraries that some tests depend on
2021-10-25 15:38 ` Thomas Monjalon
@ 2021-10-26 0:47 ` Jie Zhou
2021-10-26 8:44 ` Thomas Monjalon
0 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 0:47 UTC (permalink / raw)
To: Thomas Monjalon
Cc: dev, dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, aconole
On Mon, Oct 25, 2021 at 05:38:42PM +0200, Thomas Monjalon wrote:
> 14/10/2021 18:21, Jie Zhou:
> > Enable building subset of libraries that tests depend on for Windows
> >
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > ---
> > lib/meson.build | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/lib/meson.build b/lib/meson.build
> > index b2ba7258d8..bd6c27deef 100644
> > --- a/lib/meson.build
> > +++ b/lib/meson.build
> > @@ -82,9 +82,11 @@ if is_windows
> > 'bitratestats',
> > 'cryptodev',
> > 'cfgfile',
> > + 'efd',
> > 'gro',
> > 'gso',
> > 'latencystats',
> > + 'lpm',
> > 'pdump',
> > 'stack',
> > 'security',
> >
>
> It needs to be rebased after the recent changes to disable libs on Windows.
> But instead of such patch, I would prefer one patch per lib,
> with Tested-by tags showing that the lib is tested and working on Windows.
> Also you need to Cc the maintainer of the lib being enabled.
>
Thanks Thomas. Will rebase in V7, and will separately enabling efd, lpm, and their corresponding unit tests in two patches after this one.
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v7 00/11] app/test: enable subset of tests on Windows
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 00/12] app/test: enable subset of " Jie Zhou
` (11 preceding siblings ...)
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 12/12] app/test: enable subset of unit tests on Windows Jie Zhou
@ 2021-10-26 2:26 ` Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
` (11 more replies)
12 siblings, 12 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:26 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
This patchset is to enable a subset of unit tests on windows. It mainly includes:
- Replace POSIX specific codes
- Fix some lib and tests per failures investigation
- Replace .sh script with .py script for meson.build
- Enable build and run subset of unit tests on Windows
Future work:
- Work with CI/CD lab to onboard unit tests on Windows to catch regression
- Onboard more tests when more libraries are enabled on Windows
---
V2 changes:
- Fix compilation error on FreeBSD
- Fix email mismatch issue
- Add a missing space around "*"
---
V3 changes:
- Fix a misc c coding style issue
- Revise some commit title and message body
- Fix violations of PEP8 in new added Python scripts
- Add error handling in get_coremask.py
- Fix has_hugepage.py to check system support of hugepages
instead of checking privileges
- Fix test meson.build to run Python scripts using py3
- Consolidate lists of source files, test dep, etc. across all
platforms, with conditional extending on some platform(s)
---
V4 changes:
- Remove building of ip_frag, rib, and reorder libraries on Windows.
These three libs usually can be built on Windows without change.
However, in between the time of V3 and V4, there is regression in
upstream caused build failures of these three libs. Will separately
investigate and enable these libraries.
- Remove previous patch#2 (Enable mempool/stack on Windows) from this
patchset as it was separated out and merged as patch-19314.
- Consolidate the source files, deps, tests lists across platforms as
much as possible.
---
V5 changes:
- Remove a space between function name and open parenthesis '('
- Add back a header mistakenly deleted
---
V6 changes:
- Fix inconsistent static vs. non-static declarations
---
V7 changes:
- Remove get_coremask.py as it is not needed any more in meson.build
- Remove enablement of efd and lpm and their corresponding unit tests.
The enablement of these two libs and their UTs will be in separate
patches after this patch set.
Jie Zhou (11):
eal/windows: return ENOTSUP for not supported API
app/test: remove unnecessary headers
app/test: replace POSIX specific code
app/test: exclude ENOTSUP as failure
app/test: skip interrupt tests on Windows
app/test: temporarily "skip" one cmdline test case
app/test: skip two logs_autotest cases on Windows
app/test: differentiate a strerror on different OS
app/test: remove two alarm_autotest cases
app/test: replace .sh scripts with .py scripts
app/test: enable subset of unit tests on Windows
app/test/commands.c | 2 -
app/test/has-hugepage.sh | 11 ---
app/test/has_hugepage.py | 25 +++++
app/test/meson.build | 116 ++++++++++++-----------
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +-
app/test/test.c | 5 +-
app/test/test_acl.c | 12 +++
app/test/test_alarm.c | 4 +
app/test/test_bpf.c | 15 ++-
app/test/test_byteorder.c | 2 +-
app/test/test_cksum.c | 12 +++
app/test/test_cmdline.c | 2 +
app/test/test_cmdline_ipaddr.c | 5 +
app/test/test_cmdline_lib.c | 5 +-
app/test/test_crc.c | 1 -
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_dmadev.c | 14 ++-
app/test/test_dmadev_api.c | 4 +
app/test/test_eal_flags.c | 97 +++++++++++++++++++
app/test/test_eal_fs.c | 12 +++
app/test/test_efd.c | 15 ++-
app/test/test_efd_perf.c | 16 +++-
app/test/test_errno.c | 12 ++-
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 | 12 +++
app/test/test_graph.c | 18 +++-
app/test/test_graph_perf.c | 16 +++-
app/test/test_hash_perf.c | 12 +++
app/test/test_interrupts.c | 10 ++
app/test/test_ipfrag.c | 16 +++-
app/test/test_ipsec.c | 15 ++-
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 | 12 +++
app/test/test_logs.c | 6 +-
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 | 17 +++-
app/test/test_mbuf.c | 13 ++-
app/test/test_member.c | 16 +++-
app/test/test_member_perf.c | 16 +++-
app/test/test_memcpy_perf.c | 18 +++-
app/test/test_memory.c | 3 +-
app/test/test_mempool_perf.c | 12 +++
app/test/test_mp_secondary.c | 13 +++
app/test/test_pmd_perf.c | 6 +-
app/test/test_rawdev.c | 17 +++-
app/test/test_rcu_qsbr_perf.c | 12 +++
app/test/test_reciprocal_division.c | 12 +++
app/test/test_reciprocal_division_perf.c | 12 +++
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_ring_stress.c | 3 +-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_sched.c | 14 ++-
app/test/test_security.c | 16 +++-
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_telemetry_data.c | 2 +
app/test/test_timer_secondary.c | 13 +++
app/test/test_trace.c | 32 ++++++-
lib/eal/common/eal_common_errno.c | 4 +
lib/eal/windows/eal_memalloc.c | 6 +-
91 files changed, 1105 insertions(+), 152 deletions(-)
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v7 01/11] eal/windows: return ENOTSUP for not supported API
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 00/11] app/test: enable subset of " Jie Zhou
@ 2021-10-26 2:26 ` Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 02/11] app/test: remove unnecessary headers Jie Zhou
` (10 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:26 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
UT memory_autotest on Windows has 2 failed cases on eal APIs
eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2
APIs are not supported on Windows yet. Should return ENOTSUP such that
in test_memory.c these 2 ENOTSUP cases will not be marked as failures,
same as other ENOTSUP cases.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
lib/eal/windows/eal_memalloc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/eal/windows/eal_memalloc.c b/lib/eal/windows/eal_memalloc.c
index 55d6dcc71c..aa7589b81d 100644
--- a/lib/eal/windows/eal_memalloc.c
+++ b/lib/eal/windows/eal_memalloc.c
@@ -17,7 +17,7 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
RTE_SET_USED(list_idx);
RTE_SET_USED(seg_idx);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
@@ -28,7 +28,7 @@ eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
RTE_SET_USED(seg_idx);
RTE_SET_USED(offset);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
static int
@@ -428,7 +428,7 @@ eal_memalloc_sync_with_primary(void)
{
/* No multi-process support. */
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v7 02/11] app/test: remove unnecessary headers
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 00/11] app/test: enable subset of " Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
@ 2021-10-26 2:26 ` Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 03/11] app/test: replace POSIX specific code Jie Zhou
` (9 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:26 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Remove unnecessary header inclusion
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/commands.c | 2 --
app/test/test.c | 1 -
app/test/test_cmdline_lib.c | 1 -
3 files changed, 4 deletions(-)
diff --git a/app/test/commands.c b/app/test/commands.c
index 76f6ee5d23..82bd8bf474 100644
--- a/app/test/commands.c
+++ b/app/test/commands.c
@@ -8,8 +8,6 @@
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
-#include <netinet/in.h>
-#include <termios.h>
#include <inttypes.h>
#include <errno.h>
#include <sys/queue.h>
diff --git a/app/test/test.c b/app/test/test.c
index 5194131026..8b698656bf 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index f238094b07..4715edc341 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v7 03/11] app/test: replace POSIX specific code
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 00/11] app/test: enable subset of " Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 02/11] app/test: remove unnecessary headers Jie Zhou
@ 2021-10-26 2:26 ` Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 04/11] app/test: exclude ENOTSUP as failure Jie Zhou
` (8 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:26 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Include rte_os_shim.h
- Replace sleep and usleep with rte_delay_us_sleep
- #ifndef RTE_EXEC_ENV_WINDOWS for POSIX code only
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +++-
app/test/test.c | 4 ++++
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline.c | 2 ++
app/test/test_crc.c | 1 -
app/test/test_mp_secondary.c | 2 ++
app/test/test_pmd_perf.c | 6 +++++-
app/test/test_ring_stress.c | 3 ++-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_telemetry_data.c | 2 ++
11 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index 8ac24577ba..6b42b9b83b 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -5,6 +5,7 @@
#include <rte_byteorder.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
+#include <rte_os_shim.h>
#include "packet_burst_generator.h"
diff --git a/app/test/process.h b/app/test/process.h
index 5b10cf64df..1f073b9c5c 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -7,12 +7,14 @@
#include <errno.h> /* errno */
#include <limits.h> /* PATH_MAX */
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <libgen.h> /* basename et al */
+#include <sys/wait.h>
+#endif
#include <stdlib.h> /* NULL */
#include <string.h> /* strerror */
#include <unistd.h> /* readlink */
#include <dirent.h>
-#include <sys/wait.h>
#include <rte_string_fns.h> /* strlcpy */
diff --git a/app/test/test.c b/app/test/test.c
index 8b698656bf..e69cae3eea 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -62,7 +62,9 @@ do_recursive_call(void)
const char *env_var;
int (*action_fn)(void);
} actions[] = {
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "run_secondary_instances", test_mp_secondary },
+#endif
#ifdef RTE_LIB_PDUMP
#ifdef RTE_NET_RING
{ "run_pdump_server_tests", test_pdump },
@@ -81,7 +83,9 @@ do_recursive_call(void)
{ "test_file_prefix", no_action },
{ "test_no_huge_flag", no_action },
#ifdef RTE_LIB_TIMER
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "timer_secondary_spawn_wait", test_timer_secondary },
+#endif
#endif
};
diff --git a/app/test/test_byteorder.c b/app/test/test_byteorder.c
index 03c08d9abf..de14ed539e 100644
--- a/app/test/test_byteorder.c
+++ b/app/test/test_byteorder.c
@@ -46,7 +46,7 @@ test_byteorder(void)
return -1;
res_u16 = rte_bswap16(0x1337);
- printf("const %"PRIx16" -> %"PRIx16"\n", 0x1337, res_u16);
+ printf("const %"PRIx16" -> %"PRIx16"\n", (uint16_t)0x1337, res_u16);
if (res_u16 != 0x3713)
return -1;
diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c
index 115bee966d..9a76bd299f 100644
--- a/app/test/test_cmdline.c
+++ b/app/test/test_cmdline.c
@@ -31,6 +31,7 @@ test_cmdline(void)
return -1;
if (test_parse_num_invalid_param() < 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
printf("Testing parsing IP addresses...\n");
if (test_parse_ipaddr_valid() < 0)
return -1;
@@ -38,6 +39,7 @@ test_cmdline(void)
return -1;
if (test_parse_ipaddr_invalid_param() < 0)
return -1;
+#endif
printf("Testing parsing strings...\n");
if (test_parse_string_valid() < 0)
return -1;
diff --git a/app/test/test_crc.c b/app/test/test_crc.c
index bf1d344359..0ed080e482 100644
--- a/app/test/test_crc.c
+++ b/app/test/test_crc.c
@@ -14,7 +14,6 @@
#define CRC32_VEC_LEN2 348
#define CRC16_VEC_LEN1 12
#define CRC16_VEC_LEN2 2
-#define LINE_LEN 75
/* CRC test vector */
static const uint8_t crc_vec[CRC_VEC_LEN] = {
diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c
index 5b6f05dbb1..da035348bd 100644
--- a/app/test/test_mp_secondary.c
+++ b/app/test/test_mp_secondary.c
@@ -14,7 +14,9 @@
#include <errno.h>
#include <string.h>
#include <unistd.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/wait.h>
+#endif
#include <libgen.h>
#include <dirent.h>
#include <limits.h>
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 1df86ce080..b5e5a93a52 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -297,6 +297,7 @@ reset_count(void)
idle = 0;
}
+#ifndef RTE_EXEC_ENV_WINDOWS
static void
stats_display(uint16_t port_id)
{
@@ -326,6 +327,7 @@ signal_handler(int signum)
if (signum == SIGUSR2)
stats_display(0);
}
+#endif
struct rte_mbuf **tx_burst;
@@ -637,7 +639,7 @@ exec_burst(uint32_t flags, int lcore)
i = (i >= conf->nb_ports - 1) ? 0 : (i + 1);
}
- sleep(5);
+ rte_delay_us(5 * US_PER_S);
/* only when polling second */
if (flags == SC_BURST_XMIT_FIRST)
@@ -668,8 +670,10 @@ test_pmd_perf(void)
printf("Start PMD RXTX cycles cost test.\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
signal(SIGUSR1, signal_handler);
signal(SIGUSR2, signal_handler);
+#endif
nb_ports = rte_eth_dev_count_avail();
if (nb_ports < NB_ETHPORTS_USED) {
diff --git a/app/test/test_ring_stress.c b/app/test/test_ring_stress.c
index 1af45e0fc8..ce3535c6b2 100644
--- a/app/test/test_ring_stress.c
+++ b/app/test/test_ring_stress.c
@@ -43,9 +43,10 @@ test_ring_stress(void)
n += test_ring_rts_stress.nb_case;
k += run_test(&test_ring_rts_stress);
+#ifndef RTE_EXEC_ENV_WINDOWS
n += test_ring_hts_stress.nb_case;
k += run_test(&test_ring_hts_stress);
-
+#endif
n += test_ring_mt_peek_stress.nb_case;
k += run_test(&test_ring_mt_peek_stress);
diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h
index 2825a9dce6..62f046a91a 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -360,7 +360,7 @@ test_mt1(int (*test)(void *))
/* signal worker to start test */
__atomic_store_n(&wrk_cmd, WRK_CMD_RUN, __ATOMIC_RELEASE);
- usleep(run_time * US_PER_S);
+ rte_delay_us(run_time * US_PER_S);
/* signal worker to start test */
__atomic_store_n(&wrk_cmd, WRK_CMD_STOP, __ATOMIC_RELEASE);
diff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c
index 18b93db8ef..73eee293a1 100644
--- a/app/test/test_telemetry_data.c
+++ b/app/test/test_telemetry_data.c
@@ -4,7 +4,9 @@
#include <string.h>
#include <sys/socket.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/un.h>
+#endif
#include <unistd.h>
#include <limits.h>
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v7 04/11] app/test: exclude ENOTSUP as failure
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 00/11] app/test: enable subset of " Jie Zhou
` (2 preceding siblings ...)
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 03/11] app/test: replace POSIX specific code Jie Zhou
@ 2021-10-26 2:26 ` Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 05/11] app/test: skip interrupt tests on Windows Jie Zhou
` (7 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:26 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Check rte_errno to exclude ENOTSUP as failures in test_memory.c
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_memory.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index dbf6871e71..379b0f99ca 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -10,6 +10,7 @@
#include <rte_memory.h>
#include <rte_common.h>
#include <rte_memzone.h>
+#include <rte_errno.h>
#include "test.h"
@@ -63,7 +64,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
/* we're able to get memseg fd - try getting its offset */
ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
if (ret < 0) {
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
return -1;
}
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v7 05/11] app/test: skip interrupt tests on Windows
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 00/11] app/test: enable subset of " Jie Zhou
` (3 preceding siblings ...)
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 04/11] app/test: exclude ENOTSUP as failure Jie Zhou
@ 2021-10-26 2:26 ` Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 06/11] app/test: temporarily "skip" one cmdline test case Jie Zhou
` (6 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:26 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Even though test_interrupts.c can compile on Windows, skip interrupt
tests for now since majority of eal_interrupt on Windows are stubs.
Will remove the skip after interrupt being fully enabled on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_interrupts.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
index 2a05399f96..eec9b2805b 100644
--- a/app/test/test_interrupts.c
+++ b/app/test/test_interrupts.c
@@ -12,6 +12,15 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_interrupt(void)
+{
+ printf("Interrupt on Windows is not fully supported yet, skipping test\n");
+ return TEST_SKIPPED;
+}
+#else
+
#define TEST_INTERRUPT_CHECK_INTERVAL 100 /* ms */
/* predefined interrupt handle types */
@@ -590,5 +599,6 @@ test_interrupt(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v7 06/11] app/test: temporarily "skip" one cmdline test case
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 00/11] app/test: enable subset of " Jie Zhou
` (4 preceding siblings ...)
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 05/11] app/test: skip interrupt tests on Windows Jie Zhou
@ 2021-10-26 2:26 ` Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 07/11] app/test: skip two logs_autotest cases on Windows Jie Zhou
` (5 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:26 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
cmdline tests pass except one failure at the test_cmdline_socket_fns
test case with error: failed to open /dev/null for reading!
Temporarily "skip" this case while enable all other passing cases.
Issue is tracked internally and will add the corresponding case on
Windows in future.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_cmdline_lib.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index 4715edc341..eb54ef06d7 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -146,6 +146,9 @@ test_cmdline_vt100_fns(void)
static int
test_cmdline_socket_fns(void)
{
+#ifdef RTE_EXEC_ENV_WINDOWS
+ return 0;
+#else
cmdline_parse_ctx_t ctx;
struct cmdline *cl;
@@ -184,6 +187,7 @@ test_cmdline_socket_fns(void)
printf("Error: function accepted null parameter!\n");
cmdline_free(cl);
return -1;
+#endif
}
static int
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v7 07/11] app/test: skip two logs_autotest cases on Windows
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 00/11] app/test: enable subset of " Jie Zhou
` (5 preceding siblings ...)
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 06/11] app/test: temporarily "skip" one cmdline test case Jie Zhou
@ 2021-10-26 2:26 ` Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 08/11] app/test: differentiate a strerror on different OS Jie Zhou
` (4 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:26 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
DPDK logs_autotest on Windows failed at "dynamic log types" tests.
The failures are on 2 test cases for rte_log_set_level_regexp API,
due to regular expression is not supported on Windows in DPDK yet
and regcomp/regexec are just stubs on Windows (in regex.h).
In app\test\test_logs.c, ifndef these two test cases, and for the
rte_log_set_level_pattern validation case following these two cases,
differentiate the expected log level passed into macro CHECK_LEVELS
Now logs_autotest completes for all dynamic log types and static log types.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_logs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/test/test_logs.c b/app/test/test_logs.c
index 7abb6eeca2..7c001c1ab3 100644
--- a/app/test/test_logs.c
+++ b/app/test/test_logs.c
@@ -113,6 +113,7 @@ test_logs(void)
rte_log_set_level(logtype1, RTE_LOG_ERR);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#ifndef RTE_EXEC_ENV_WINDOWS
rte_log_set_level_regexp("type$", RTE_LOG_EMERG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
@@ -121,7 +122,10 @@ test_logs(void)
rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_EMERG, RTE_LOG_EMERG);
-
+#else
+ ret = rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
+ CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#endif
/* set logtype level low to so we can test global level */
rte_log_set_level_pattern("logtype*", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_DEBUG, RTE_LOG_DEBUG, RTE_LOG_DEBUG);
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v7 08/11] app/test: differentiate a strerror on different OS
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 00/11] app/test: enable subset of " Jie Zhou
` (6 preceding siblings ...)
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 07/11] app/test: skip two logs_autotest cases on Windows Jie Zhou
@ 2021-10-26 2:26 ` Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 09/11] app/test: remove two alarm_autotest cases Jie Zhou
` (3 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:26 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
On Windows, strerror returns just "Unknown error" for errnum greater
than MAX_ERRNO, while linux and freebsd returns "Unknown error <num>",
which is the current expectation for errno_autotest. Differentiate
the error string on Windows to remove a "duplicate error code" failure.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_errno.c | 12 +++++++++++-
lib/eal/common/eal_common_errno.c | 4 ++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/app/test/test_errno.c b/app/test/test_errno.c
index 3ff0456a58..0db4fbc8b3 100644
--- a/app/test/test_errno.c
+++ b/app/test/test_errno.c
@@ -18,13 +18,19 @@ test_errno(void)
{
const char *rte_retval;
const char *libc_retval;
+
+#ifndef RTE_EXEC_ENV_WINDOWS
#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD has a colon in the string, unlike linux */
const char unknown_code_result[] = "Unknown error: %d";
#else
const char unknown_code_result[] = "Unknown error %d";
#endif
- char expected_libc_retval[sizeof(unknown_code_result)+3];
+ char expected_libc_retval[sizeof(unknown_code_result) + 3];
+#else
+ /* Windows doesn't return error number for error greater than MAX_errno*/
+ static const char expected_libc_retval[] = "Unknown error";
+#endif
/* use a small selection of standard errors for testing */
int std_errs[] = {EAGAIN, EBADF, EACCES, EINTR, EINVAL};
@@ -54,11 +60,13 @@ test_errno(void)
rte_retval, libc_retval);
if (strcmp(rte_retval, libc_retval) == 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
/* generate appropriate error string for unknown error number
* and then check that this is what we got back. If not, we have
* a duplicate error number that conflicts with errno.h */
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, rte_errs[i]);
+#endif
if ((strcmp(expected_libc_retval, libc_retval) != 0) &&
(strcmp("", libc_retval) != 0)){
printf("Error, duplicate error code %d\n", rte_errs[i]);
@@ -69,8 +77,10 @@ test_errno(void)
/* ensure that beyond RTE_MAX_ERRNO, we always get an unknown code */
rte_retval = rte_strerror(RTE_MAX_ERRNO + 1);
libc_retval = strerror(RTE_MAX_ERRNO + 1);
+#ifndef RTE_EXEC_ENV_WINDOWS
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, RTE_MAX_ERRNO + 1);
+#endif
printf("rte_strerror: '%s', strerror: '%s'\n",
rte_retval, libc_retval);
if ((strcmp(rte_retval, libc_retval) != 0) ||
diff --git a/lib/eal/common/eal_common_errno.c b/lib/eal/common/eal_common_errno.c
index f86802705a..4c4abb802e 100644
--- a/lib/eal/common/eal_common_errno.c
+++ b/lib/eal/common/eal_common_errno.c
@@ -37,7 +37,11 @@ rte_strerror(int errnum)
/* since some implementations of strerror_r throw an error
* themselves if errnum is too big, we handle that case here */
if (errnum >= RTE_MAX_ERRNO)
+#ifdef RTE_EXEC_ENV_WINDOWS
+ snprintf(ret, RETVAL_SZ, "Unknown error%s", sep);
+#else
snprintf(ret, RETVAL_SZ, "Unknown error%s %d", sep, errnum);
+#endif
else
switch (errnum){
case E_RTE_SECONDARY:
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v7 09/11] app/test: remove two alarm_autotest cases
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 00/11] app/test: enable subset of " Jie Zhou
` (7 preceding siblings ...)
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 08/11] app/test: differentiate a strerror on different OS Jie Zhou
@ 2021-10-26 2:26 ` Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 10/11] app/test: replace .sh scripts with .py scripts Jie Zhou
` (2 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:26 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Remove two alarm_autotest test cases which do bogus range check
on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_alarm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_alarm.c b/app/test/test_alarm.c
index b4034339b8..70e97a3109 100644
--- a/app/test/test_alarm.c
+++ b/app/test/test_alarm.c
@@ -10,6 +10,7 @@
#include "test.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
static volatile int flag;
static void
@@ -18,6 +19,7 @@ test_alarm_callback(void *cb_arg)
flag = 1;
printf("Callback setting flag - OK. [cb_arg = %p]\n", cb_arg);
}
+#endif
static int
test_alarm(void)
@@ -27,6 +29,7 @@ test_alarm(void)
return 0;
#endif
+#ifndef RTE_EXEC_ENV_WINDOWS
/* check if it will fail to set alarm with wrong us value */
printf("check if it will fail to set alarm with wrong ms values\n");
if (rte_eal_alarm_set(0, test_alarm_callback,
@@ -39,6 +42,7 @@ test_alarm(void)
printf("should not be successful with (UINT64_MAX-1) us value\n");
return -1;
}
+#endif
/* check if it will fail to set alarm with null callback parameter */
printf("check if it will fail to set alarm with null callback parameter\n");
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v7 10/11] app/test: replace .sh scripts with .py scripts
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 00/11] app/test: enable subset of " Jie Zhou
` (8 preceding siblings ...)
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 09/11] app/test: remove two alarm_autotest cases Jie Zhou
@ 2021-10-26 2:26 ` Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 11/11] app/test: enable subset of unit tests on Windows Jie Zhou
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 00/11] app/test: enable subset of " Jie Zhou
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:26 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Add python script to check if system supports hugepages
- Remove corresponding .sh scripts
- Replace calling of .sh with corresponding .py in meson.build
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/has-hugepage.sh | 11 -----------
app/test/has_hugepage.py | 25 +++++++++++++++++++++++++
app/test/meson.build | 2 +-
3 files changed, 26 insertions(+), 12 deletions(-)
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh
deleted file mode 100755
index d600fad319..0000000000
--- a/app/test/has-hugepage.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright 2020 Mellanox Technologies, Ltd
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /proc/sys/vm/nr_hugepages || echo 0
-elif [ "$(uname)" = "FreeBSD" ] ; then
- echo 1 # assume FreeBSD always has hugepages
-else
- echo 0
-fi
diff --git a/app/test/has_hugepage.py b/app/test/has_hugepage.py
new file mode 100644
index 0000000000..70107c61fd
--- /dev/null
+++ b/app/test/has_hugepage.py
@@ -0,0 +1,25 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2021 Microsoft Corporation
+"""This script checks if the system supports huge pages"""
+
+import platform
+import ctypes
+
+osName = platform.system()
+if osName == "Linux":
+ with open("/proc/sys/vm/nr_hugepages") as file_o:
+ content = file_o.read()
+ print(content)
+elif osName == "FreeBSD":
+ # Assume FreeBSD always has hugepages enabled
+ print("1")
+elif osName == "Windows":
+ # On Windows, determine if large page is supported based on the
+ # value returned by GetLargePageMinimum. If the return value is zero,
+ # the processor does not support large pages.
+ if ctypes.windll.kernel32.GetLargePageMinimum() > 0:
+ print("1")
+ else:
+ print("0")
+else:
+ print("0")
diff --git a/app/test/meson.build b/app/test/meson.build
index 20f36a1803..210ccd29b0 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -463,7 +463,7 @@ dpdk_test = executable('dpdk-test',
driver_install_path),
install: true)
-has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
+has_hugepage = run_command(py3, 'has_hugepage.py').stdout().strip() != '0'
message('hugepage availability: @0@'.format(has_hugepage))
# some perf tests (eg: memcpy perf autotest)take very long
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v7 11/11] app/test: enable subset of unit tests on Windows
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 00/11] app/test: enable subset of " Jie Zhou
` (9 preceding siblings ...)
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 10/11] app/test: replace .sh scripts with .py scripts Jie Zhou
@ 2021-10-26 2:26 ` Jie Zhou
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 00/11] app/test: enable subset of " Jie Zhou
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:26 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- For fast tests and perf tests, add test stubs to skip not supported
ones.
- For driver tests, for now skip on Windows totally to avoid
unnecessary amount of test stubs. For example, there are about 30
cryptodev related tests (even though in the meson for CI it only
listed about half) which will be enabled by "patch-18949: app/test:
enable crypto unit tests on Windows".
- For dump tests, currently the tests hang on Windows which require
further investigation. Keep the dump test list just for non-Windows
for easier tracking.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/meson.build | 114 ++++++++++++-----------
app/test/test_acl.c | 12 +++
app/test/test_bpf.c | 15 ++-
app/test/test_cksum.c | 12 +++
app/test/test_cmdline_ipaddr.c | 5 +
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_dmadev.c | 14 ++-
app/test/test_dmadev_api.c | 4 +
app/test/test_eal_flags.c | 97 +++++++++++++++++++
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 | 12 +++
app/test/test_graph.c | 18 +++-
app/test/test_graph_perf.c | 16 +++-
app/test/test_hash_perf.c | 12 +++
app/test/test_ipfrag.c | 16 +++-
app/test/test_ipsec.c | 15 ++-
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 | 12 +++
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 | 17 +++-
app/test/test_mbuf.c | 13 ++-
app/test/test_member.c | 16 +++-
app/test/test_member_perf.c | 16 +++-
app/test/test_memcpy_perf.c | 18 +++-
app/test/test_mempool_perf.c | 12 +++
app/test/test_mp_secondary.c | 15 ++-
app/test/test_rawdev.c | 17 +++-
app/test/test_rcu_qsbr_perf.c | 12 +++
app/test/test_reciprocal_division.c | 12 +++
app/test/test_reciprocal_division_perf.c | 12 +++
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 | 16 +++-
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 ++++++-
70 files changed, 1015 insertions(+), 126 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index 210ccd29b0..7161a83196 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,12 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if is_windows
- build = false
- reason = 'not supported on Windows'
- subdir_done()
-endif
-
if not get_option('tests')
subdir_done()
endif
@@ -157,37 +151,17 @@ test_sources = files(
)
test_deps = [
- 'acl',
'bus_pci',
'bus_vdev',
'bitratestats',
- 'bpf',
'cfgfile',
'cmdline',
- 'cryptodev',
- 'distributor',
- 'dmadev',
- 'efd',
'ethdev',
- 'eventdev',
- 'fib',
- 'flow_classify',
- 'graph',
'hash',
- 'ipsec',
'latencystats',
- 'lpm',
- 'member',
'metrics',
- 'node',
- 'pipeline',
- 'port',
- 'rawdev',
'rcu',
- 'reorder',
- 'rib',
'ring',
- 'security',
'stack',
'telemetry',
'timer',
@@ -325,39 +299,69 @@ perf_test_names = [
]
driver_test_names = [
- 'cryptodev_aesni_mb_autotest',
- 'cryptodev_aesni_gcm_autotest',
- 'cryptodev_cn9k_autotest',
- 'cryptodev_cn10k_autotest',
- 'cryptodev_dpaa_sec_autotest',
- 'cryptodev_dpaa2_sec_autotest',
- 'cryptodev_null_autotest',
- 'cryptodev_octeontx2_autotest',
- 'cryptodev_openssl_autotest',
- 'cryptodev_openssl_asym_autotest',
- 'cryptodev_qat_autotest',
- 'cryptodev_sw_armv8_autotest',
- 'cryptodev_sw_kasumi_autotest',
- 'cryptodev_sw_mvsam_autotest',
- 'cryptodev_sw_snow3g_autotest',
- 'cryptodev_sw_zuc_autotest',
- 'dmadev_autotest',
- 'eventdev_selftest_octeontx',
- 'eventdev_selftest_sw',
- 'rawdev_autotest',
]
dump_test_names = [
- 'dump_struct_sizes',
- 'dump_mempool',
- 'dump_malloc_stats',
- 'dump_devargs',
- 'dump_log_types',
- 'dump_ring',
- 'dump_physmem',
- 'dump_memzone',
]
+if not is_windows
+ test_deps += [
+ 'acl',
+ 'bpf',
+ 'cryptodev',
+ 'distributor',
+ 'dmadev',
+ 'efd',
+ 'eventdev',
+ 'fib',
+ 'flow_classify',
+ 'graph',
+ 'ipsec',
+ 'lpm',
+ 'member',
+ 'node',
+ 'pipeline',
+ 'port',
+ 'rawdev',
+ 'reorder',
+ 'rib',
+ 'security',
+ ]
+
+ driver_test_names += [
+ 'cryptodev_aesni_mb_autotest',
+ 'cryptodev_aesni_gcm_autotest',
+ 'cryptodev_cn9k_autotest',
+ 'cryptodev_cn10k_autotest',
+ 'cryptodev_dpaa_sec_autotest',
+ 'cryptodev_dpaa2_sec_autotest',
+ 'cryptodev_null_autotest',
+ 'cryptodev_octeontx2_autotest',
+ 'cryptodev_openssl_autotest',
+ 'cryptodev_openssl_asym_autotest',
+ 'cryptodev_qat_autotest',
+ 'cryptodev_sw_armv8_autotest',
+ 'cryptodev_sw_kasumi_autotest',
+ 'cryptodev_sw_mvsam_autotest',
+ 'cryptodev_sw_snow3g_autotest',
+ 'cryptodev_sw_zuc_autotest',
+ 'eventdev_selftest_octeontx',
+ 'eventdev_selftest_sw',
+ 'rawdev_autotest',
+ ]
+
+ dump_test_names += [
+ 'dump_struct_sizes',
+ 'dump_mempool',
+ 'dump_malloc_stats',
+ 'dump_devargs',
+ 'dump_log_types',
+ 'dump_ring',
+ 'dump_physmem',
+ 'dump_memzone',
+ ]
+endif
+
# The following linkages are an exception to allow running the
# unit tests without requiring that the developer install the
# DPDK libraries. Explicit linkage of drivers (plugin libraries)
@@ -371,7 +375,7 @@ endif
if dpdk_conf.has('RTE_EVENT_SKELETON')
test_deps += 'event_skeleton'
endif
-if dpdk_conf.has('RTE_LIB_TELEMETRY')
+if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
endif
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 <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 /*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 ef861d05e7..437d85ce7e 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -14,11 +14,22 @@
#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 +3259,8 @@ test_bpf(void)
return rc;
}
+#endif
+
REGISTER_TEST_COMMAND(bpf_autotest, test_bpf);
#ifdef RTE_PORT_PCAP
diff --git a/app/test/test_cksum.c b/app/test/test_cksum.c
index cd983d7c01..3c5bfc8671 100644
--- a/app/test/test_cksum.c
+++ b/app/test/test_cksum.c
@@ -13,6 +13,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_cksum(void)
+{
+ printf("cksum not supported, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MEMPOOL_CACHE_SIZE 0
#define MBUF_DATA_SIZE 256
#define NB_MBUF 128
@@ -268,4 +278,6 @@ test_cksum(void)
}
#undef GOTO_FAIL
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(cksum_autotest, test_cksum);
diff --git a/app/test/test_cmdline_ipaddr.c b/app/test/test_cmdline_ipaddr.c
index 2a1ee120fc..ff039a304f 100644
--- a/app/test/test_cmdline_ipaddr.c
+++ b/app/test/test_cmdline_ipaddr.c
@@ -2,9 +2,12 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
+
#include <netinet/in.h>
#include <sys/socket.h>
@@ -669,3 +672,5 @@ test_parse_ipaddr_invalid_param(void)
}
return 0;
}
+
+#endif /*ifndef RTE_EXEC_ENV_WINDOWS*/
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 814a0b401d..e877507778 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 <time.h>
#include <rte_common.h>
@@ -15715,3 +15717,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 9d19a6d6d9..680ced4dbe 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 <rte_bus_vdev.h>
#include <rte_common.h>
#include <rte_hexdump.h>
@@ -2429,3 +2431,5 @@ REGISTER_TEST_COMMAND(cryptodev_octeontx2_asym_autotest,
test_cryptodev_octeontx2_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 3cdb2c96e8..a4434c020f 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 <rte_common.h>
#include <rte_hexdump.h>
#include <rte_mbuf.h>
@@ -1218,3 +1220,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 <rte_common.h>
#include <rte_cryptodev.h>
#include <rte_esp.h>
@@ -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 <time.h>
#include <rte_common.h>
@@ -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 <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 /*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 <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 @@ 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 fdbeae6d2f..c4b4c7fd97 100644
--- a/app/test/test_distributor_perf.c
+++ b/app/test/test_distributor_perf.c
@@ -10,6 +10,17 @@
#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>
@@ -267,4 +278,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_dmadev.c b/app/test/test_dmadev.c
index b206db27ae..eeec84822d 100644
--- a/app/test/test_dmadev.c
+++ b/app/test/test_dmadev.c
@@ -2,6 +2,17 @@
* Copyright(c) 2021 HiSilicon Limited
* Copyright(c) 2021 Intel Corporation
*/
+#include "test.h"
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_dma(void)
+{
+ printf("dma not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
#include <inttypes.h>
@@ -13,7 +24,6 @@
#include <rte_bus_vdev.h>
#include <rte_dmadev_pmd.h>
-#include "test.h"
#include "test_dmadev_api.h"
#define ERR_RETURN(...) do { print_err(__func__, __LINE__, __VA_ARGS__); return -1; } while (0)
@@ -864,4 +874,6 @@ test_dma(void)
return 0;
}
+#endif //ifdef RTE_EXEC_ENV_WINDOWS
+
REGISTER_TEST_COMMAND(dmadev_autotest, test_dma);
diff --git a/app/test/test_dmadev_api.c b/app/test/test_dmadev_api.c
index 4a181af90a..0132b625a0 100644
--- a/app/test/test_dmadev_api.c
+++ b/app/test/test_dmadev_api.c
@@ -2,6 +2,8 @@
* Copyright(c) 2021 HiSilicon Limited
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <string.h>
#include <rte_cycles.h>
@@ -572,3 +574,5 @@ test_dma_api(uint16_t dev_id)
return 0;
};
+
+#endif //ifndef RTE_EXEC_ENV_WINDOWS
diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
index 1d18a0ba8f..91908e5065 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -9,6 +9,101 @@
#include <string.h>
#include <stdarg.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_eal_flags(void)
+{
+ printf("eal_flags not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+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 <libgen.h>
#include <stdlib.h>
#include <errno.h>
@@ -1579,6 +1674,8 @@ test_eal_flags(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(eal_flags_autotest, test_eal_flags);
/* subtests used in meson for CI */
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 <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 /*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 <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 /*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..8f5fd78723 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 <string.h>
#include <rte_common.h>
#include <rte_mempool.h>
#include <rte_mbuf.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_cryptodev.h>
#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 /*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 1419f6f64d..7d651a12f4 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 <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
@@ -967,6 +986,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 <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 /*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 12c00e678e..fb76744183 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 <math.h>
@@ -11,6 +12,17 @@
#include <rte_debug.h>
#include <rte_eal.h>
#include <rte_ethdev.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_event_timer_adapter_func(void)
+{
+ printf("event_timer_adapter not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <rte_eventdev.h>
#include <rte_event_timer_adapter.h>
#include <rte_mempool.h>
@@ -22,8 +34,6 @@
#include <rte_service.h>
#include <stdbool.h>
-#include "test.h"
-
/* 4K timers corresponds to sw evdev max inflight events */
#define MAX_TIMERS (4 * 1024)
#define BKT_TCK_NSEC
@@ -1951,4 +1961,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 843d9766b0..fee2ecaa22 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 <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
@@ -1048,7 +1058,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);
@@ -1058,3 +1072,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 <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 +33,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 +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 e46b9934fe..d991017d58 100644
--- a/app/test/test_fib.c
+++ b/app/test/test_fib.c
@@ -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);
@@ -410,5 +428,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 74abfc7a5d..7545a3496f 100644
--- a/app/test/test_fib6.c
+++ b/app/test/test_fib6.c
@@ -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);
@@ -419,5 +437,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 56c799b2e9..22e8adb738 100644
--- a/app/test/test_fib6_perf.c
+++ b/app/test/test_fib6_perf.c
@@ -10,9 +10,21 @@
#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 { \
@@ -154,4 +166,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 dd2e54db8b..c0c44c3fd5 100644
--- a/app/test/test_fib_perf.c
+++ b/app/test/test_fib_perf.c
@@ -12,11 +12,22 @@
#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__); \
@@ -408,4 +419,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 <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 /*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 838ab6f0f9..45f8484349 100644
--- a/app/test/test_func_reentrancy.c
+++ b/app/test/test_func_reentrancy.c
@@ -41,6 +41,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_func_reentrancy(void)
+{
+ printf("reentrancy not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
typedef int (*case_func_t)(void* arg);
typedef void (*case_clean_t)(unsigned lcore_id);
@@ -512,4 +522,6 @@ test_func_reentrancy(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(func_reentrancy_autotest, test_func_reentrancy);
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 <assert.h>
#include <inttypes.h>
#include <signal.h>
@@ -9,14 +11,23 @@
#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 +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 <inttypes.h>
#include <signal.h>
#include <stdio.h>
@@ -9,14 +11,22 @@
#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 +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 76cdac5d53..4229f85aa7 100644
--- a/app/test/test_hash_perf.c
+++ b/app/test/test_hash_perf.c
@@ -17,6 +17,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_hash_perf(void)
+{
+ printf("hash_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ENTRIES (1 << 19)
#define KEYS_TO_ADD (MAX_ENTRIES)
#define ADD_PERCENT 0.75 /* 75% table utilization */
@@ -749,4 +759,6 @@ test_hash_perf(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(hash_perf_autotest, test_hash_perf);
diff --git a/app/test/test_ipfrag.c b/app/test/test_ipfrag.c
index da8c212f92..926a621f72 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 <time.h>
@@ -8,13 +9,22 @@
#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
@@ -259,4 +269,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 1bec63b0e8..293ee9bc95 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 <time.h>
@@ -13,15 +14,25 @@
#include <rte_bus_vdev.h>
#include <rte_ip.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_crypto.h>
#include <rte_cryptodev.h>
#include <rte_lcore.h>
+
#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 /*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 <stdio.h>
#include <rte_ip.h>
@@ -8,10 +9,20 @@
#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 +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 <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 +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 40ab0d5c4c..8f4e92f6ca 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 <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>
diff --git a/app/test/test_lcores.c b/app/test/test_lcores.c
index 35c47d5372..2277ae597f 100644
--- a/app/test/test_lcores.c
+++ b/app/test/test_lcores.c
@@ -11,6 +11,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_lcores(void)
+{
+ printf("lcore not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
struct thread_context {
enum { INIT, ERROR, DONE } state;
bool lcore_id_any;
@@ -411,4 +421,6 @@ test_lcores(void)
return TEST_SUCCESS;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(lcores_autotest, test_lcores);
diff --git a/app/test/test_lpm.c b/app/test/test_lpm.c
index 556f5a67ba..137aa27f78 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 <stdio.h>
#include <stdint.h>
@@ -10,7 +21,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 +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 0d664546fa..cd9bc969b7 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 <stdio.h>
#include <stdint.h>
@@ -8,9 +9,18 @@
#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 +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 <stdio.h>
#include <stdint.h>
@@ -12,7 +23,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 +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 <stdio.h>
#include <stdint.h>
#include <stdlib.h>
@@ -15,7 +25,6 @@
#include <rte_ip.h>
#include <rte_lpm.h>
-#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 afff0de9f0..0c0a6cd954 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 <stdio.h>
#include <stdint.h>
@@ -8,6 +9,17 @@
#include <stdarg.h>
#include <errno.h>
#include <stdlib.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_malloc(void)
+{
+ printf("malloc not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <sys/mman.h>
#include <sys/queue.h>
#include <unistd.h>
@@ -23,11 +35,8 @@
#include <rte_random.h>
#include <rte_string_fns.h>
-#include "test.h"
-
#define N 10000
-
static int
is_mem_on_socket(int32_t socket);
@@ -1080,4 +1089,6 @@ test_malloc(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(malloc_autotest, test_malloc);
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 94d1cdde37..8a1db80a1f 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 <string.h>
#include <stdarg.h>
@@ -34,7 +35,15 @@
#include <rte_tcp.h>
#include <rte_mbuf_dyn.h>
-#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_mbuf(void)
+{
+ printf("mbuf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
#define MEMPOOL_CACHE_SIZE 32
#define MBUF_DATA_SIZE 2048
@@ -2972,4 +2981,6 @@ test_mbuf(void)
}
#undef GOTO_FAIL
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(mbuf_autotest, test_mbuf);
diff --git a/app/test/test_member.c b/app/test/test_member.c
index 40aa4c8627..85f3a126b9 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 <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 +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 <stdio.h>
#include <inttypes.h>
@@ -11,9 +12,18 @@
#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 +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 c711e36ba7..e9388fa7c4 100644
--- a/app/test/test_memcpy_perf.c
+++ b/app/test/test_memcpy_perf.c
@@ -2,21 +2,31 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#include "test.h"
+
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_memcpy_perf(void)
+{
+ printf("memcpy_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <sys/time.h>
#include <rte_common.h>
#include <rte_cycles.h>
#include <rte_random.h>
#include <rte_malloc.h>
-
#include <rte_memcpy.h>
-#include "test.h"
-
/*
* Set this to the maximum buffer size you want to test. If it is 0, then the
* values in the buf_sizes[] array below will be used.
@@ -347,4 +357,6 @@ test_memcpy_perf(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(memcpy_perf_autotest, test_memcpy_perf);
diff --git a/app/test/test_mempool_perf.c b/app/test/test_mempool_perf.c
index 8f629736e8..193327a546 100644
--- a/app/test/test_mempool_perf.c
+++ b/app/test/test_mempool_perf.c
@@ -28,6 +28,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_mempool_perf(void)
+{
+ printf("mempool_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
/*
* Mempool performance
* =======
@@ -393,4 +403,6 @@ test_mempool_perf(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(mempool_perf_autotest, test_mempool_perf);
diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c
index da035348bd..dcfcc8a32a 100644
--- a/app/test/test_mp_secondary.c
+++ b/app/test/test_mp_secondary.c
@@ -14,9 +14,18 @@
#include <errno.h>
#include <string.h>
#include <unistd.h>
-#ifndef RTE_EXEC_ENV_WINDOWS
+
+#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>
-#endif
#include <libgen.h>
#include <dirent.h>
#include <limits.h>
@@ -214,4 +223,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_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 <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 /*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..9209fb2658 100644
--- a/app/test/test_rcu_qsbr_perf.c
+++ b/app/test/test_rcu_qsbr_perf.c
@@ -15,6 +15,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_rcu_qsbr_main(void)
+{
+ printf("rcu_qsbr_main not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
/* Check condition and return an error if true. */
static uint16_t enabled_core_ids[RTE_MAX_LCORE];
static unsigned int num_cores;
@@ -687,4 +697,6 @@ test_rcu_qsbr_main(void)
return -1;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
diff --git a/app/test/test_reciprocal_division.c b/app/test/test_reciprocal_division.c
index 8ea9b1d24d..8777211cd7 100644
--- a/app/test/test_reciprocal_division.c
+++ b/app/test/test_reciprocal_division.c
@@ -13,6 +13,16 @@
#include <rte_random.h>
#include <rte_reciprocal.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_reciprocal(void)
+{
+ printf("reciprocal not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ITERATIONS (1ULL << 32)
#define DIVIDE_ITER (100)
@@ -164,4 +174,6 @@ test_reciprocal(void)
return result;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(reciprocal_division, test_reciprocal);
diff --git a/app/test/test_reciprocal_division_perf.c b/app/test/test_reciprocal_division_perf.c
index 4f625873e5..66b004fa1b 100644
--- a/app/test/test_reciprocal_division_perf.c
+++ b/app/test/test_reciprocal_division_perf.c
@@ -13,6 +13,16 @@
#include <rte_random.h>
#include <rte_reciprocal.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_reciprocal_division_perf(void)
+{
+ printf("reciprocal_division_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ITERATIONS (1ULL << 32)
#define DIVIDE_ITER (1ULL << 28)
@@ -205,4 +215,6 @@ test_reciprocal_division_perf(void)
return result;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(reciprocal_division_perf, test_reciprocal_division_perf);
diff --git a/app/test/test_red.c b/app/test/test_red.c
index e973f3131e..d0200c13aa 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 <stdlib.h>
#include <stdio.h>
@@ -8,12 +9,34 @@
#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 +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 <stdio.h>
#include <unistd.h>
@@ -9,12 +10,20 @@
#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 +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 <medvedkinv@gmail.com>
* 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 +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 <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,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 <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 +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 060cf1ffa8..c31273941c 100644
--- a/app/test/test_security.c
+++ b/app/test/test_security.c
@@ -1,12 +1,24 @@
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
*/
+#include "test.h"
#include <rte_errno.h>
#include <rte_log.h>
#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_ether.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_security(void)
+{
+ printf("security not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <rte_security.h>
#include <rte_security_driver.h>
@@ -20,7 +32,7 @@
#endif
#include <rte_test.h>
-#include "test.h"
+
/**
* Security
@@ -2639,4 +2651,6 @@ test_security(void)
return unit_test_suite_runner(&security_testsuite);
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(security_autotest, test_security);
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 <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 +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 <rte_ip.h>
#include <rte_string_fns.h>
#include <rte_hexdump.h>
@@ -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 <string.h>
#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 aabf4375db..45dc7682d8 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 <string.h>
#include <rte_pipeline.h>
#include <rte_log.h>
@@ -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 <string.h>
#include <rte_byteorder.h>
#include <rte_table_lpm_ipv6.h>
@@ -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 16a9f1878b..002a7b8ad6 100644
--- a/app/test/test_timer_secondary.c
+++ b/app/test/test_timer_secondary.c
@@ -16,6 +16,17 @@
#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 */
@@ -213,4 +224,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.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v8 00/11] app/test: enable subset of tests on Windows
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 00/11] app/test: enable subset of " Jie Zhou
` (10 preceding siblings ...)
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 11/11] app/test: enable subset of unit tests on Windows Jie Zhou
@ 2021-10-26 2:45 ` Jie Zhou
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
` (11 more replies)
11 siblings, 12 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:45 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
This patchset is to enable a subset of unit tests on windows. It mainly includes:
- Replace POSIX specific codes
- Fix some lib and tests per failures investigation
- Replace .sh script with .py script for meson.build
- Enable build and run subset of unit tests on Windows
Future work:
- Work with CI/CD lab to onboard unit tests on Windows to catch regression
- Onboard more tests when more libraries are enabled on Windows
---
V2 changes:
- Fix compilation error on FreeBSD
- Fix email mismatch issue
- Add a missing space around "*"
---
V3 changes:
- Fix a misc c coding style issue
- Revise some commit title and message body
- Fix violations of PEP8 in new added Python scripts
- Add error handling in get_coremask.py
- Fix has_hugepage.py to check system support of hugepages
instead of checking privileges
- Fix test meson.build to run Python scripts using py3
- Consolidate lists of source files, test dep, etc. across all
platforms, with conditional extending on some platform(s)
---
V4 changes:
- Remove building of ip_frag, rib, and reorder libraries on Windows.
These three libs usually can be built on Windows without change.
However, in between the time of V3 and V4, there is regression in
upstream caused build failures of these three libs. Will separately
investigate and enable these libraries.
- Remove previous patch#2 (Enable mempool/stack on Windows) from this
patchset as it was separated out and merged as patch-19314.
- Consolidate the source files, deps, tests lists across platforms as
much as possible.
---
V5 changes:
- Remove a space between function name and open parenthesis '('
- Add back a header mistakenly deleted
---
V6 changes:
- Fix inconsistent static vs. non-static declarations
---
V7 changes:
- Remove get_coremask.py as it is not needed any more in meson.build
- Remove enablement of efd and lpm and their corresponding unit tests.
The enablement of these two libs and their UTs will be in separate
patches after this patch set.
V8 changes:
- Fix coding style issue of using C99 // comments
Jie Zhou (11):
eal/windows: return ENOTSUP for not supported API
app/test: remove unnecessary headers
app/test: replace POSIX specific code
app/test: exclude ENOTSUP as failure
app/test: skip interrupt tests on Windows
app/test: temporarily "skip" one cmdline test case
app/test: skip two logs_autotest cases on Windows
app/test: differentiate a strerror on different OS
app/test: remove two alarm_autotest cases
app/test: replace .sh scripts with .py scripts
app/test: enable subset of unit tests on Windows
app/test/commands.c | 2 -
app/test/has-hugepage.sh | 11 ---
app/test/has_hugepage.py | 25 +++++
app/test/meson.build | 116 ++++++++++++-----------
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +-
app/test/test.c | 5 +-
app/test/test_acl.c | 12 +++
app/test/test_alarm.c | 4 +
app/test/test_bpf.c | 15 ++-
app/test/test_byteorder.c | 2 +-
app/test/test_cksum.c | 12 +++
app/test/test_cmdline.c | 2 +
app/test/test_cmdline_ipaddr.c | 5 +
app/test/test_cmdline_lib.c | 5 +-
app/test/test_crc.c | 1 -
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_dmadev.c | 14 ++-
app/test/test_dmadev_api.c | 4 +
app/test/test_eal_flags.c | 97 +++++++++++++++++++
app/test/test_eal_fs.c | 12 +++
app/test/test_efd.c | 15 ++-
app/test/test_efd_perf.c | 16 +++-
app/test/test_errno.c | 12 ++-
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 | 12 +++
app/test/test_graph.c | 18 +++-
app/test/test_graph_perf.c | 16 +++-
app/test/test_hash_perf.c | 12 +++
app/test/test_interrupts.c | 10 ++
app/test/test_ipfrag.c | 16 +++-
app/test/test_ipsec.c | 15 ++-
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 | 12 +++
app/test/test_logs.c | 6 +-
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 | 17 +++-
app/test/test_mbuf.c | 13 ++-
app/test/test_member.c | 16 +++-
app/test/test_member_perf.c | 16 +++-
app/test/test_memcpy_perf.c | 18 +++-
app/test/test_memory.c | 3 +-
app/test/test_mempool_perf.c | 12 +++
app/test/test_mp_secondary.c | 13 +++
app/test/test_pmd_perf.c | 6 +-
app/test/test_rawdev.c | 17 +++-
app/test/test_rcu_qsbr_perf.c | 12 +++
app/test/test_reciprocal_division.c | 12 +++
app/test/test_reciprocal_division_perf.c | 12 +++
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_ring_stress.c | 3 +-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_sched.c | 14 ++-
app/test/test_security.c | 16 +++-
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_telemetry_data.c | 2 +
app/test/test_timer_secondary.c | 13 +++
app/test/test_trace.c | 32 ++++++-
lib/eal/common/eal_common_errno.c | 4 +
lib/eal/windows/eal_memalloc.c | 6 +-
91 files changed, 1105 insertions(+), 152 deletions(-)
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v8 01/11] eal/windows: return ENOTSUP for not supported API
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 00/11] app/test: enable subset of " Jie Zhou
@ 2021-10-26 2:45 ` Jie Zhou
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 02/11] app/test: remove unnecessary headers Jie Zhou
` (10 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:45 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
UT memory_autotest on Windows has 2 failed cases on eal APIs
eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2
APIs are not supported on Windows yet. Should return ENOTSUP such that
in test_memory.c these 2 ENOTSUP cases will not be marked as failures,
same as other ENOTSUP cases.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
lib/eal/windows/eal_memalloc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/eal/windows/eal_memalloc.c b/lib/eal/windows/eal_memalloc.c
index 55d6dcc71c..aa7589b81d 100644
--- a/lib/eal/windows/eal_memalloc.c
+++ b/lib/eal/windows/eal_memalloc.c
@@ -17,7 +17,7 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
RTE_SET_USED(list_idx);
RTE_SET_USED(seg_idx);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
@@ -28,7 +28,7 @@ eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
RTE_SET_USED(seg_idx);
RTE_SET_USED(offset);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
static int
@@ -428,7 +428,7 @@ eal_memalloc_sync_with_primary(void)
{
/* No multi-process support. */
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v8 02/11] app/test: remove unnecessary headers
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 00/11] app/test: enable subset of " Jie Zhou
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
@ 2021-10-26 2:45 ` Jie Zhou
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 03/11] app/test: replace POSIX specific code Jie Zhou
` (9 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:45 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Remove unnecessary header inclusion
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/commands.c | 2 --
app/test/test.c | 1 -
app/test/test_cmdline_lib.c | 1 -
3 files changed, 4 deletions(-)
diff --git a/app/test/commands.c b/app/test/commands.c
index 76f6ee5d23..82bd8bf474 100644
--- a/app/test/commands.c
+++ b/app/test/commands.c
@@ -8,8 +8,6 @@
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
-#include <netinet/in.h>
-#include <termios.h>
#include <inttypes.h>
#include <errno.h>
#include <sys/queue.h>
diff --git a/app/test/test.c b/app/test/test.c
index 5194131026..8b698656bf 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index f238094b07..4715edc341 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v8 03/11] app/test: replace POSIX specific code
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 00/11] app/test: enable subset of " Jie Zhou
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 02/11] app/test: remove unnecessary headers Jie Zhou
@ 2021-10-26 2:45 ` Jie Zhou
2021-11-23 22:02 ` Dmitry Kozlyuk
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 04/11] app/test: exclude ENOTSUP as failure Jie Zhou
` (8 subsequent siblings)
11 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:45 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Include rte_os_shim.h
- Replace sleep and usleep with rte_delay_us_sleep
- #ifndef RTE_EXEC_ENV_WINDOWS for POSIX code only
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +++-
app/test/test.c | 4 ++++
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline.c | 2 ++
app/test/test_crc.c | 1 -
app/test/test_mp_secondary.c | 2 ++
app/test/test_pmd_perf.c | 6 +++++-
app/test/test_ring_stress.c | 3 ++-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_telemetry_data.c | 2 ++
11 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index 8ac24577ba..6b42b9b83b 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -5,6 +5,7 @@
#include <rte_byteorder.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
+#include <rte_os_shim.h>
#include "packet_burst_generator.h"
diff --git a/app/test/process.h b/app/test/process.h
index 5b10cf64df..1f073b9c5c 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -7,12 +7,14 @@
#include <errno.h> /* errno */
#include <limits.h> /* PATH_MAX */
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <libgen.h> /* basename et al */
+#include <sys/wait.h>
+#endif
#include <stdlib.h> /* NULL */
#include <string.h> /* strerror */
#include <unistd.h> /* readlink */
#include <dirent.h>
-#include <sys/wait.h>
#include <rte_string_fns.h> /* strlcpy */
diff --git a/app/test/test.c b/app/test/test.c
index 8b698656bf..e69cae3eea 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -62,7 +62,9 @@ do_recursive_call(void)
const char *env_var;
int (*action_fn)(void);
} actions[] = {
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "run_secondary_instances", test_mp_secondary },
+#endif
#ifdef RTE_LIB_PDUMP
#ifdef RTE_NET_RING
{ "run_pdump_server_tests", test_pdump },
@@ -81,7 +83,9 @@ do_recursive_call(void)
{ "test_file_prefix", no_action },
{ "test_no_huge_flag", no_action },
#ifdef RTE_LIB_TIMER
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "timer_secondary_spawn_wait", test_timer_secondary },
+#endif
#endif
};
diff --git a/app/test/test_byteorder.c b/app/test/test_byteorder.c
index 03c08d9abf..de14ed539e 100644
--- a/app/test/test_byteorder.c
+++ b/app/test/test_byteorder.c
@@ -46,7 +46,7 @@ test_byteorder(void)
return -1;
res_u16 = rte_bswap16(0x1337);
- printf("const %"PRIx16" -> %"PRIx16"\n", 0x1337, res_u16);
+ printf("const %"PRIx16" -> %"PRIx16"\n", (uint16_t)0x1337, res_u16);
if (res_u16 != 0x3713)
return -1;
diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c
index 115bee966d..9a76bd299f 100644
--- a/app/test/test_cmdline.c
+++ b/app/test/test_cmdline.c
@@ -31,6 +31,7 @@ test_cmdline(void)
return -1;
if (test_parse_num_invalid_param() < 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
printf("Testing parsing IP addresses...\n");
if (test_parse_ipaddr_valid() < 0)
return -1;
@@ -38,6 +39,7 @@ test_cmdline(void)
return -1;
if (test_parse_ipaddr_invalid_param() < 0)
return -1;
+#endif
printf("Testing parsing strings...\n");
if (test_parse_string_valid() < 0)
return -1;
diff --git a/app/test/test_crc.c b/app/test/test_crc.c
index bf1d344359..0ed080e482 100644
--- a/app/test/test_crc.c
+++ b/app/test/test_crc.c
@@ -14,7 +14,6 @@
#define CRC32_VEC_LEN2 348
#define CRC16_VEC_LEN1 12
#define CRC16_VEC_LEN2 2
-#define LINE_LEN 75
/* CRC test vector */
static const uint8_t crc_vec[CRC_VEC_LEN] = {
diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c
index 5b6f05dbb1..da035348bd 100644
--- a/app/test/test_mp_secondary.c
+++ b/app/test/test_mp_secondary.c
@@ -14,7 +14,9 @@
#include <errno.h>
#include <string.h>
#include <unistd.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/wait.h>
+#endif
#include <libgen.h>
#include <dirent.h>
#include <limits.h>
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 1df86ce080..b5e5a93a52 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -297,6 +297,7 @@ reset_count(void)
idle = 0;
}
+#ifndef RTE_EXEC_ENV_WINDOWS
static void
stats_display(uint16_t port_id)
{
@@ -326,6 +327,7 @@ signal_handler(int signum)
if (signum == SIGUSR2)
stats_display(0);
}
+#endif
struct rte_mbuf **tx_burst;
@@ -637,7 +639,7 @@ exec_burst(uint32_t flags, int lcore)
i = (i >= conf->nb_ports - 1) ? 0 : (i + 1);
}
- sleep(5);
+ rte_delay_us(5 * US_PER_S);
/* only when polling second */
if (flags == SC_BURST_XMIT_FIRST)
@@ -668,8 +670,10 @@ test_pmd_perf(void)
printf("Start PMD RXTX cycles cost test.\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
signal(SIGUSR1, signal_handler);
signal(SIGUSR2, signal_handler);
+#endif
nb_ports = rte_eth_dev_count_avail();
if (nb_ports < NB_ETHPORTS_USED) {
diff --git a/app/test/test_ring_stress.c b/app/test/test_ring_stress.c
index 1af45e0fc8..ce3535c6b2 100644
--- a/app/test/test_ring_stress.c
+++ b/app/test/test_ring_stress.c
@@ -43,9 +43,10 @@ test_ring_stress(void)
n += test_ring_rts_stress.nb_case;
k += run_test(&test_ring_rts_stress);
+#ifndef RTE_EXEC_ENV_WINDOWS
n += test_ring_hts_stress.nb_case;
k += run_test(&test_ring_hts_stress);
-
+#endif
n += test_ring_mt_peek_stress.nb_case;
k += run_test(&test_ring_mt_peek_stress);
diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h
index 2825a9dce6..62f046a91a 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -360,7 +360,7 @@ test_mt1(int (*test)(void *))
/* signal worker to start test */
__atomic_store_n(&wrk_cmd, WRK_CMD_RUN, __ATOMIC_RELEASE);
- usleep(run_time * US_PER_S);
+ rte_delay_us(run_time * US_PER_S);
/* signal worker to start test */
__atomic_store_n(&wrk_cmd, WRK_CMD_STOP, __ATOMIC_RELEASE);
diff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c
index 18b93db8ef..73eee293a1 100644
--- a/app/test/test_telemetry_data.c
+++ b/app/test/test_telemetry_data.c
@@ -4,7 +4,9 @@
#include <string.h>
#include <sys/socket.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/un.h>
+#endif
#include <unistd.h>
#include <limits.h>
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v8 04/11] app/test: exclude ENOTSUP as failure
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 00/11] app/test: enable subset of " Jie Zhou
` (2 preceding siblings ...)
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 03/11] app/test: replace POSIX specific code Jie Zhou
@ 2021-10-26 2:45 ` Jie Zhou
2021-11-23 22:02 ` Dmitry Kozlyuk
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 05/11] app/test: skip interrupt tests on Windows Jie Zhou
` (7 subsequent siblings)
11 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:45 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Check rte_errno to exclude ENOTSUP as failures in test_memory.c
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_memory.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index dbf6871e71..379b0f99ca 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -10,6 +10,7 @@
#include <rte_memory.h>
#include <rte_common.h>
#include <rte_memzone.h>
+#include <rte_errno.h>
#include "test.h"
@@ -63,7 +64,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
/* we're able to get memseg fd - try getting its offset */
ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
if (ret < 0) {
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
return -1;
}
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v8 05/11] app/test: skip interrupt tests on Windows
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 00/11] app/test: enable subset of " Jie Zhou
` (3 preceding siblings ...)
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 04/11] app/test: exclude ENOTSUP as failure Jie Zhou
@ 2021-10-26 2:45 ` Jie Zhou
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 06/11] app/test: temporarily "skip" one cmdline test case Jie Zhou
` (6 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:45 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Even though test_interrupts.c can compile on Windows, skip interrupt
tests for now since majority of eal_interrupt on Windows are stubs.
Will remove the skip after interrupt being fully enabled on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_interrupts.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
index 2a05399f96..eec9b2805b 100644
--- a/app/test/test_interrupts.c
+++ b/app/test/test_interrupts.c
@@ -12,6 +12,15 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_interrupt(void)
+{
+ printf("Interrupt on Windows is not fully supported yet, skipping test\n");
+ return TEST_SKIPPED;
+}
+#else
+
#define TEST_INTERRUPT_CHECK_INTERVAL 100 /* ms */
/* predefined interrupt handle types */
@@ -590,5 +599,6 @@ test_interrupt(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v8 06/11] app/test: temporarily "skip" one cmdline test case
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 00/11] app/test: enable subset of " Jie Zhou
` (4 preceding siblings ...)
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 05/11] app/test: skip interrupt tests on Windows Jie Zhou
@ 2021-10-26 2:45 ` Jie Zhou
2021-11-23 22:02 ` Dmitry Kozlyuk
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 07/11] app/test: skip two logs_autotest cases on Windows Jie Zhou
` (5 subsequent siblings)
11 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:45 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
cmdline tests pass except one failure at the test_cmdline_socket_fns
test case with error: failed to open /dev/null for reading!
Temporarily "skip" this case while enable all other passing cases.
Issue is tracked internally and will add the corresponding case on
Windows in future.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_cmdline_lib.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index 4715edc341..eb54ef06d7 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -146,6 +146,9 @@ test_cmdline_vt100_fns(void)
static int
test_cmdline_socket_fns(void)
{
+#ifdef RTE_EXEC_ENV_WINDOWS
+ return 0;
+#else
cmdline_parse_ctx_t ctx;
struct cmdline *cl;
@@ -184,6 +187,7 @@ test_cmdline_socket_fns(void)
printf("Error: function accepted null parameter!\n");
cmdline_free(cl);
return -1;
+#endif
}
static int
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v8 07/11] app/test: skip two logs_autotest cases on Windows
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 00/11] app/test: enable subset of " Jie Zhou
` (5 preceding siblings ...)
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 06/11] app/test: temporarily "skip" one cmdline test case Jie Zhou
@ 2021-10-26 2:45 ` Jie Zhou
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 08/11] app/test: differentiate a strerror on different OS Jie Zhou
` (4 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:45 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
DPDK logs_autotest on Windows failed at "dynamic log types" tests.
The failures are on 2 test cases for rte_log_set_level_regexp API,
due to regular expression is not supported on Windows in DPDK yet
and regcomp/regexec are just stubs on Windows (in regex.h).
In app\test\test_logs.c, ifndef these two test cases, and for the
rte_log_set_level_pattern validation case following these two cases,
differentiate the expected log level passed into macro CHECK_LEVELS
Now logs_autotest completes for all dynamic log types and static log types.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_logs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/test/test_logs.c b/app/test/test_logs.c
index 7abb6eeca2..7c001c1ab3 100644
--- a/app/test/test_logs.c
+++ b/app/test/test_logs.c
@@ -113,6 +113,7 @@ test_logs(void)
rte_log_set_level(logtype1, RTE_LOG_ERR);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#ifndef RTE_EXEC_ENV_WINDOWS
rte_log_set_level_regexp("type$", RTE_LOG_EMERG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
@@ -121,7 +122,10 @@ test_logs(void)
rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_EMERG, RTE_LOG_EMERG);
-
+#else
+ ret = rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
+ CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#endif
/* set logtype level low to so we can test global level */
rte_log_set_level_pattern("logtype*", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_DEBUG, RTE_LOG_DEBUG, RTE_LOG_DEBUG);
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v8 08/11] app/test: differentiate a strerror on different OS
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 00/11] app/test: enable subset of " Jie Zhou
` (6 preceding siblings ...)
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 07/11] app/test: skip two logs_autotest cases on Windows Jie Zhou
@ 2021-10-26 2:45 ` Jie Zhou
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 09/11] app/test: remove two alarm_autotest cases Jie Zhou
` (3 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:45 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
On Windows, strerror returns just "Unknown error" for errnum greater
than MAX_ERRNO, while linux and freebsd returns "Unknown error <num>",
which is the current expectation for errno_autotest. Differentiate
the error string on Windows to remove a "duplicate error code" failure.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_errno.c | 12 +++++++++++-
lib/eal/common/eal_common_errno.c | 4 ++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/app/test/test_errno.c b/app/test/test_errno.c
index 3ff0456a58..0db4fbc8b3 100644
--- a/app/test/test_errno.c
+++ b/app/test/test_errno.c
@@ -18,13 +18,19 @@ test_errno(void)
{
const char *rte_retval;
const char *libc_retval;
+
+#ifndef RTE_EXEC_ENV_WINDOWS
#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD has a colon in the string, unlike linux */
const char unknown_code_result[] = "Unknown error: %d";
#else
const char unknown_code_result[] = "Unknown error %d";
#endif
- char expected_libc_retval[sizeof(unknown_code_result)+3];
+ char expected_libc_retval[sizeof(unknown_code_result) + 3];
+#else
+ /* Windows doesn't return error number for error greater than MAX_errno*/
+ static const char expected_libc_retval[] = "Unknown error";
+#endif
/* use a small selection of standard errors for testing */
int std_errs[] = {EAGAIN, EBADF, EACCES, EINTR, EINVAL};
@@ -54,11 +60,13 @@ test_errno(void)
rte_retval, libc_retval);
if (strcmp(rte_retval, libc_retval) == 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
/* generate appropriate error string for unknown error number
* and then check that this is what we got back. If not, we have
* a duplicate error number that conflicts with errno.h */
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, rte_errs[i]);
+#endif
if ((strcmp(expected_libc_retval, libc_retval) != 0) &&
(strcmp("", libc_retval) != 0)){
printf("Error, duplicate error code %d\n", rte_errs[i]);
@@ -69,8 +77,10 @@ test_errno(void)
/* ensure that beyond RTE_MAX_ERRNO, we always get an unknown code */
rte_retval = rte_strerror(RTE_MAX_ERRNO + 1);
libc_retval = strerror(RTE_MAX_ERRNO + 1);
+#ifndef RTE_EXEC_ENV_WINDOWS
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, RTE_MAX_ERRNO + 1);
+#endif
printf("rte_strerror: '%s', strerror: '%s'\n",
rte_retval, libc_retval);
if ((strcmp(rte_retval, libc_retval) != 0) ||
diff --git a/lib/eal/common/eal_common_errno.c b/lib/eal/common/eal_common_errno.c
index f86802705a..4c4abb802e 100644
--- a/lib/eal/common/eal_common_errno.c
+++ b/lib/eal/common/eal_common_errno.c
@@ -37,7 +37,11 @@ rte_strerror(int errnum)
/* since some implementations of strerror_r throw an error
* themselves if errnum is too big, we handle that case here */
if (errnum >= RTE_MAX_ERRNO)
+#ifdef RTE_EXEC_ENV_WINDOWS
+ snprintf(ret, RETVAL_SZ, "Unknown error%s", sep);
+#else
snprintf(ret, RETVAL_SZ, "Unknown error%s %d", sep, errnum);
+#endif
else
switch (errnum){
case E_RTE_SECONDARY:
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v8 09/11] app/test: remove two alarm_autotest cases
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 00/11] app/test: enable subset of " Jie Zhou
` (7 preceding siblings ...)
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 08/11] app/test: differentiate a strerror on different OS Jie Zhou
@ 2021-10-26 2:45 ` Jie Zhou
2021-10-26 2:46 ` [dpdk-dev] [PATCH v8 10/11] app/test: replace .sh scripts with .py scripts Jie Zhou
` (2 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:45 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Remove two alarm_autotest test cases which do bogus range check
on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_alarm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_alarm.c b/app/test/test_alarm.c
index b4034339b8..70e97a3109 100644
--- a/app/test/test_alarm.c
+++ b/app/test/test_alarm.c
@@ -10,6 +10,7 @@
#include "test.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
static volatile int flag;
static void
@@ -18,6 +19,7 @@ test_alarm_callback(void *cb_arg)
flag = 1;
printf("Callback setting flag - OK. [cb_arg = %p]\n", cb_arg);
}
+#endif
static int
test_alarm(void)
@@ -27,6 +29,7 @@ test_alarm(void)
return 0;
#endif
+#ifndef RTE_EXEC_ENV_WINDOWS
/* check if it will fail to set alarm with wrong us value */
printf("check if it will fail to set alarm with wrong ms values\n");
if (rte_eal_alarm_set(0, test_alarm_callback,
@@ -39,6 +42,7 @@ test_alarm(void)
printf("should not be successful with (UINT64_MAX-1) us value\n");
return -1;
}
+#endif
/* check if it will fail to set alarm with null callback parameter */
printf("check if it will fail to set alarm with null callback parameter\n");
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v8 10/11] app/test: replace .sh scripts with .py scripts
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 00/11] app/test: enable subset of " Jie Zhou
` (8 preceding siblings ...)
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 09/11] app/test: remove two alarm_autotest cases Jie Zhou
@ 2021-10-26 2:46 ` Jie Zhou
2021-11-23 22:15 ` Dmitry Kozlyuk
2021-10-26 2:46 ` [dpdk-dev] [PATCH v8 11/11] app/test: enable subset of unit tests on Windows Jie Zhou
2021-12-01 18:05 ` [PATCH v9 0/9] app/test: enable subset of " Jie Zhou
11 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:46 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Add python script to check if system supports hugepages
- Remove corresponding .sh scripts
- Replace calling of .sh with corresponding .py in meson.build
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/has-hugepage.sh | 11 -----------
app/test/has_hugepage.py | 25 +++++++++++++++++++++++++
app/test/meson.build | 2 +-
3 files changed, 26 insertions(+), 12 deletions(-)
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh
deleted file mode 100755
index d600fad319..0000000000
--- a/app/test/has-hugepage.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright 2020 Mellanox Technologies, Ltd
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /proc/sys/vm/nr_hugepages || echo 0
-elif [ "$(uname)" = "FreeBSD" ] ; then
- echo 1 # assume FreeBSD always has hugepages
-else
- echo 0
-fi
diff --git a/app/test/has_hugepage.py b/app/test/has_hugepage.py
new file mode 100644
index 0000000000..70107c61fd
--- /dev/null
+++ b/app/test/has_hugepage.py
@@ -0,0 +1,25 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2021 Microsoft Corporation
+"""This script checks if the system supports huge pages"""
+
+import platform
+import ctypes
+
+osName = platform.system()
+if osName == "Linux":
+ with open("/proc/sys/vm/nr_hugepages") as file_o:
+ content = file_o.read()
+ print(content)
+elif osName == "FreeBSD":
+ # Assume FreeBSD always has hugepages enabled
+ print("1")
+elif osName == "Windows":
+ # On Windows, determine if large page is supported based on the
+ # value returned by GetLargePageMinimum. If the return value is zero,
+ # the processor does not support large pages.
+ if ctypes.windll.kernel32.GetLargePageMinimum() > 0:
+ print("1")
+ else:
+ print("0")
+else:
+ print("0")
diff --git a/app/test/meson.build b/app/test/meson.build
index 20f36a1803..210ccd29b0 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -463,7 +463,7 @@ dpdk_test = executable('dpdk-test',
driver_install_path),
install: true)
-has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
+has_hugepage = run_command(py3, 'has_hugepage.py').stdout().strip() != '0'
message('hugepage availability: @0@'.format(has_hugepage))
# some perf tests (eg: memcpy perf autotest)take very long
--
2.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* [dpdk-dev] [PATCH v8 11/11] app/test: enable subset of unit tests on Windows
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 00/11] app/test: enable subset of " Jie Zhou
` (9 preceding siblings ...)
2021-10-26 2:46 ` [dpdk-dev] [PATCH v8 10/11] app/test: replace .sh scripts with .py scripts Jie Zhou
@ 2021-10-26 2:46 ` Jie Zhou
2021-12-01 18:05 ` [PATCH v9 0/9] app/test: enable subset of " Jie Zhou
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-10-26 2:46 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- For fast tests and perf tests, add test stubs to skip not supported
ones.
- For driver tests, for now skip on Windows totally to avoid
unnecessary amount of test stubs. For example, there are about 30
cryptodev related tests (even though in the meson for CI it only
listed about half) which will be enabled by "patch-18949: app/test:
enable crypto unit tests on Windows".
- For dump tests, currently the tests hang on Windows which require
further investigation. Keep the dump test list just for non-Windows
for easier tracking.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/meson.build | 114 ++++++++++++-----------
app/test/test_acl.c | 12 +++
app/test/test_bpf.c | 15 ++-
app/test/test_cksum.c | 12 +++
app/test/test_cmdline_ipaddr.c | 5 +
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_dmadev.c | 14 ++-
app/test/test_dmadev_api.c | 4 +
app/test/test_eal_flags.c | 97 +++++++++++++++++++
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 | 12 +++
app/test/test_graph.c | 18 +++-
app/test/test_graph_perf.c | 16 +++-
app/test/test_hash_perf.c | 12 +++
app/test/test_ipfrag.c | 16 +++-
app/test/test_ipsec.c | 15 ++-
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 | 12 +++
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 | 17 +++-
app/test/test_mbuf.c | 13 ++-
app/test/test_member.c | 16 +++-
app/test/test_member_perf.c | 16 +++-
app/test/test_memcpy_perf.c | 18 +++-
app/test/test_mempool_perf.c | 12 +++
app/test/test_mp_secondary.c | 15 ++-
app/test/test_rawdev.c | 17 +++-
app/test/test_rcu_qsbr_perf.c | 12 +++
app/test/test_reciprocal_division.c | 12 +++
app/test/test_reciprocal_division_perf.c | 12 +++
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 | 16 +++-
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 ++++++-
70 files changed, 1015 insertions(+), 126 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index 210ccd29b0..7161a83196 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,12 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if is_windows
- build = false
- reason = 'not supported on Windows'
- subdir_done()
-endif
-
if not get_option('tests')
subdir_done()
endif
@@ -157,37 +151,17 @@ test_sources = files(
)
test_deps = [
- 'acl',
'bus_pci',
'bus_vdev',
'bitratestats',
- 'bpf',
'cfgfile',
'cmdline',
- 'cryptodev',
- 'distributor',
- 'dmadev',
- 'efd',
'ethdev',
- 'eventdev',
- 'fib',
- 'flow_classify',
- 'graph',
'hash',
- 'ipsec',
'latencystats',
- 'lpm',
- 'member',
'metrics',
- 'node',
- 'pipeline',
- 'port',
- 'rawdev',
'rcu',
- 'reorder',
- 'rib',
'ring',
- 'security',
'stack',
'telemetry',
'timer',
@@ -325,39 +299,69 @@ perf_test_names = [
]
driver_test_names = [
- 'cryptodev_aesni_mb_autotest',
- 'cryptodev_aesni_gcm_autotest',
- 'cryptodev_cn9k_autotest',
- 'cryptodev_cn10k_autotest',
- 'cryptodev_dpaa_sec_autotest',
- 'cryptodev_dpaa2_sec_autotest',
- 'cryptodev_null_autotest',
- 'cryptodev_octeontx2_autotest',
- 'cryptodev_openssl_autotest',
- 'cryptodev_openssl_asym_autotest',
- 'cryptodev_qat_autotest',
- 'cryptodev_sw_armv8_autotest',
- 'cryptodev_sw_kasumi_autotest',
- 'cryptodev_sw_mvsam_autotest',
- 'cryptodev_sw_snow3g_autotest',
- 'cryptodev_sw_zuc_autotest',
- 'dmadev_autotest',
- 'eventdev_selftest_octeontx',
- 'eventdev_selftest_sw',
- 'rawdev_autotest',
]
dump_test_names = [
- 'dump_struct_sizes',
- 'dump_mempool',
- 'dump_malloc_stats',
- 'dump_devargs',
- 'dump_log_types',
- 'dump_ring',
- 'dump_physmem',
- 'dump_memzone',
]
+if not is_windows
+ test_deps += [
+ 'acl',
+ 'bpf',
+ 'cryptodev',
+ 'distributor',
+ 'dmadev',
+ 'efd',
+ 'eventdev',
+ 'fib',
+ 'flow_classify',
+ 'graph',
+ 'ipsec',
+ 'lpm',
+ 'member',
+ 'node',
+ 'pipeline',
+ 'port',
+ 'rawdev',
+ 'reorder',
+ 'rib',
+ 'security',
+ ]
+
+ driver_test_names += [
+ 'cryptodev_aesni_mb_autotest',
+ 'cryptodev_aesni_gcm_autotest',
+ 'cryptodev_cn9k_autotest',
+ 'cryptodev_cn10k_autotest',
+ 'cryptodev_dpaa_sec_autotest',
+ 'cryptodev_dpaa2_sec_autotest',
+ 'cryptodev_null_autotest',
+ 'cryptodev_octeontx2_autotest',
+ 'cryptodev_openssl_autotest',
+ 'cryptodev_openssl_asym_autotest',
+ 'cryptodev_qat_autotest',
+ 'cryptodev_sw_armv8_autotest',
+ 'cryptodev_sw_kasumi_autotest',
+ 'cryptodev_sw_mvsam_autotest',
+ 'cryptodev_sw_snow3g_autotest',
+ 'cryptodev_sw_zuc_autotest',
+ 'eventdev_selftest_octeontx',
+ 'eventdev_selftest_sw',
+ 'rawdev_autotest',
+ ]
+
+ dump_test_names += [
+ 'dump_struct_sizes',
+ 'dump_mempool',
+ 'dump_malloc_stats',
+ 'dump_devargs',
+ 'dump_log_types',
+ 'dump_ring',
+ 'dump_physmem',
+ 'dump_memzone',
+ ]
+endif
+
# The following linkages are an exception to allow running the
# unit tests without requiring that the developer install the
# DPDK libraries. Explicit linkage of drivers (plugin libraries)
@@ -371,7 +375,7 @@ endif
if dpdk_conf.has('RTE_EVENT_SKELETON')
test_deps += 'event_skeleton'
endif
-if dpdk_conf.has('RTE_LIB_TELEMETRY')
+if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
endif
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 <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 /*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 ef861d05e7..437d85ce7e 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -14,11 +14,22 @@
#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 +3259,8 @@ test_bpf(void)
return rc;
}
+#endif
+
REGISTER_TEST_COMMAND(bpf_autotest, test_bpf);
#ifdef RTE_PORT_PCAP
diff --git a/app/test/test_cksum.c b/app/test/test_cksum.c
index cd983d7c01..3c5bfc8671 100644
--- a/app/test/test_cksum.c
+++ b/app/test/test_cksum.c
@@ -13,6 +13,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_cksum(void)
+{
+ printf("cksum not supported, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MEMPOOL_CACHE_SIZE 0
#define MBUF_DATA_SIZE 256
#define NB_MBUF 128
@@ -268,4 +278,6 @@ test_cksum(void)
}
#undef GOTO_FAIL
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(cksum_autotest, test_cksum);
diff --git a/app/test/test_cmdline_ipaddr.c b/app/test/test_cmdline_ipaddr.c
index 2a1ee120fc..ff039a304f 100644
--- a/app/test/test_cmdline_ipaddr.c
+++ b/app/test/test_cmdline_ipaddr.c
@@ -2,9 +2,12 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
+
#include <netinet/in.h>
#include <sys/socket.h>
@@ -669,3 +672,5 @@ test_parse_ipaddr_invalid_param(void)
}
return 0;
}
+
+#endif /*ifndef RTE_EXEC_ENV_WINDOWS*/
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 814a0b401d..e877507778 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 <time.h>
#include <rte_common.h>
@@ -15715,3 +15717,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 9d19a6d6d9..680ced4dbe 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 <rte_bus_vdev.h>
#include <rte_common.h>
#include <rte_hexdump.h>
@@ -2429,3 +2431,5 @@ REGISTER_TEST_COMMAND(cryptodev_octeontx2_asym_autotest,
test_cryptodev_octeontx2_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 3cdb2c96e8..a4434c020f 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 <rte_common.h>
#include <rte_hexdump.h>
#include <rte_mbuf.h>
@@ -1218,3 +1220,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 <rte_common.h>
#include <rte_cryptodev.h>
#include <rte_esp.h>
@@ -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 <time.h>
#include <rte_common.h>
@@ -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 <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 /*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 <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 @@ 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 fdbeae6d2f..c4b4c7fd97 100644
--- a/app/test/test_distributor_perf.c
+++ b/app/test/test_distributor_perf.c
@@ -10,6 +10,17 @@
#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>
@@ -267,4 +278,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_dmadev.c b/app/test/test_dmadev.c
index b206db27ae..c2ea9090cf 100644
--- a/app/test/test_dmadev.c
+++ b/app/test/test_dmadev.c
@@ -2,6 +2,17 @@
* Copyright(c) 2021 HiSilicon Limited
* Copyright(c) 2021 Intel Corporation
*/
+#include "test.h"
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_dma(void)
+{
+ printf("dma not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
#include <inttypes.h>
@@ -13,7 +24,6 @@
#include <rte_bus_vdev.h>
#include <rte_dmadev_pmd.h>
-#include "test.h"
#include "test_dmadev_api.h"
#define ERR_RETURN(...) do { print_err(__func__, __LINE__, __VA_ARGS__); return -1; } while (0)
@@ -864,4 +874,6 @@ test_dma(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(dmadev_autotest, test_dma);
diff --git a/app/test/test_dmadev_api.c b/app/test/test_dmadev_api.c
index 4a181af90a..7b38f66dc0 100644
--- a/app/test/test_dmadev_api.c
+++ b/app/test/test_dmadev_api.c
@@ -2,6 +2,8 @@
* Copyright(c) 2021 HiSilicon Limited
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <string.h>
#include <rte_cycles.h>
@@ -572,3 +574,5 @@ test_dma_api(uint16_t dev_id)
return 0;
};
+
+#endif /*ifndef RTE_EXEC_ENV_WINDOWS*/
diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
index 1d18a0ba8f..91908e5065 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -9,6 +9,101 @@
#include <string.h>
#include <stdarg.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_eal_flags(void)
+{
+ printf("eal_flags not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+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 <libgen.h>
#include <stdlib.h>
#include <errno.h>
@@ -1579,6 +1674,8 @@ test_eal_flags(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(eal_flags_autotest, test_eal_flags);
/* subtests used in meson for CI */
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 <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 /*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 <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 /*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..8f5fd78723 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 <string.h>
#include <rte_common.h>
#include <rte_mempool.h>
#include <rte_mbuf.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_cryptodev.h>
#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 /*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 1419f6f64d..7d651a12f4 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 <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
@@ -967,6 +986,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 <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 /*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 12c00e678e..fb76744183 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 <math.h>
@@ -11,6 +12,17 @@
#include <rte_debug.h>
#include <rte_eal.h>
#include <rte_ethdev.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_event_timer_adapter_func(void)
+{
+ printf("event_timer_adapter not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <rte_eventdev.h>
#include <rte_event_timer_adapter.h>
#include <rte_mempool.h>
@@ -22,8 +34,6 @@
#include <rte_service.h>
#include <stdbool.h>
-#include "test.h"
-
/* 4K timers corresponds to sw evdev max inflight events */
#define MAX_TIMERS (4 * 1024)
#define BKT_TCK_NSEC
@@ -1951,4 +1961,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 843d9766b0..fee2ecaa22 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 <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
@@ -1048,7 +1058,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);
@@ -1058,3 +1072,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 <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 +33,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 +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 e46b9934fe..d991017d58 100644
--- a/app/test/test_fib.c
+++ b/app/test/test_fib.c
@@ -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);
@@ -410,5 +428,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 74abfc7a5d..7545a3496f 100644
--- a/app/test/test_fib6.c
+++ b/app/test/test_fib6.c
@@ -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);
@@ -419,5 +437,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 56c799b2e9..22e8adb738 100644
--- a/app/test/test_fib6_perf.c
+++ b/app/test/test_fib6_perf.c
@@ -10,9 +10,21 @@
#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 { \
@@ -154,4 +166,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 dd2e54db8b..c0c44c3fd5 100644
--- a/app/test/test_fib_perf.c
+++ b/app/test/test_fib_perf.c
@@ -12,11 +12,22 @@
#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__); \
@@ -408,4 +419,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 <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 /*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 838ab6f0f9..45f8484349 100644
--- a/app/test/test_func_reentrancy.c
+++ b/app/test/test_func_reentrancy.c
@@ -41,6 +41,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_func_reentrancy(void)
+{
+ printf("reentrancy not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
typedef int (*case_func_t)(void* arg);
typedef void (*case_clean_t)(unsigned lcore_id);
@@ -512,4 +522,6 @@ test_func_reentrancy(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(func_reentrancy_autotest, test_func_reentrancy);
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 <assert.h>
#include <inttypes.h>
#include <signal.h>
@@ -9,14 +11,23 @@
#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 +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 <inttypes.h>
#include <signal.h>
#include <stdio.h>
@@ -9,14 +11,22 @@
#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 +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 76cdac5d53..4229f85aa7 100644
--- a/app/test/test_hash_perf.c
+++ b/app/test/test_hash_perf.c
@@ -17,6 +17,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_hash_perf(void)
+{
+ printf("hash_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ENTRIES (1 << 19)
#define KEYS_TO_ADD (MAX_ENTRIES)
#define ADD_PERCENT 0.75 /* 75% table utilization */
@@ -749,4 +759,6 @@ test_hash_perf(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(hash_perf_autotest, test_hash_perf);
diff --git a/app/test/test_ipfrag.c b/app/test/test_ipfrag.c
index da8c212f92..926a621f72 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 <time.h>
@@ -8,13 +9,22 @@
#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
@@ -259,4 +269,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 1bec63b0e8..293ee9bc95 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 <time.h>
@@ -13,15 +14,25 @@
#include <rte_bus_vdev.h>
#include <rte_ip.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_crypto.h>
#include <rte_cryptodev.h>
#include <rte_lcore.h>
+
#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 /*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 <stdio.h>
#include <rte_ip.h>
@@ -8,10 +9,20 @@
#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 +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 <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 +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 40ab0d5c4c..8f4e92f6ca 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 <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>
diff --git a/app/test/test_lcores.c b/app/test/test_lcores.c
index 35c47d5372..2277ae597f 100644
--- a/app/test/test_lcores.c
+++ b/app/test/test_lcores.c
@@ -11,6 +11,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_lcores(void)
+{
+ printf("lcore not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
struct thread_context {
enum { INIT, ERROR, DONE } state;
bool lcore_id_any;
@@ -411,4 +421,6 @@ test_lcores(void)
return TEST_SUCCESS;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(lcores_autotest, test_lcores);
diff --git a/app/test/test_lpm.c b/app/test/test_lpm.c
index 556f5a67ba..31f7d53748 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 <stdio.h>
#include <stdint.h>
@@ -10,7 +21,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 +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 0d664546fa..cd9bc969b7 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 <stdio.h>
#include <stdint.h>
@@ -8,9 +9,18 @@
#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 +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 <stdio.h>
#include <stdint.h>
@@ -12,7 +23,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 +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 <stdio.h>
#include <stdint.h>
#include <stdlib.h>
@@ -15,7 +25,6 @@
#include <rte_ip.h>
#include <rte_lpm.h>
-#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 afff0de9f0..0c0a6cd954 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 <stdio.h>
#include <stdint.h>
@@ -8,6 +9,17 @@
#include <stdarg.h>
#include <errno.h>
#include <stdlib.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_malloc(void)
+{
+ printf("malloc not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <sys/mman.h>
#include <sys/queue.h>
#include <unistd.h>
@@ -23,11 +35,8 @@
#include <rte_random.h>
#include <rte_string_fns.h>
-#include "test.h"
-
#define N 10000
-
static int
is_mem_on_socket(int32_t socket);
@@ -1080,4 +1089,6 @@ test_malloc(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(malloc_autotest, test_malloc);
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 94d1cdde37..8a1db80a1f 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 <string.h>
#include <stdarg.h>
@@ -34,7 +35,15 @@
#include <rte_tcp.h>
#include <rte_mbuf_dyn.h>
-#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_mbuf(void)
+{
+ printf("mbuf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
#define MEMPOOL_CACHE_SIZE 32
#define MBUF_DATA_SIZE 2048
@@ -2972,4 +2981,6 @@ test_mbuf(void)
}
#undef GOTO_FAIL
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(mbuf_autotest, test_mbuf);
diff --git a/app/test/test_member.c b/app/test/test_member.c
index 40aa4c8627..85f3a126b9 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 <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 +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 <stdio.h>
#include <inttypes.h>
@@ -11,9 +12,18 @@
#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 +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 c711e36ba7..e9388fa7c4 100644
--- a/app/test/test_memcpy_perf.c
+++ b/app/test/test_memcpy_perf.c
@@ -2,21 +2,31 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#include "test.h"
+
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_memcpy_perf(void)
+{
+ printf("memcpy_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <sys/time.h>
#include <rte_common.h>
#include <rte_cycles.h>
#include <rte_random.h>
#include <rte_malloc.h>
-
#include <rte_memcpy.h>
-#include "test.h"
-
/*
* Set this to the maximum buffer size you want to test. If it is 0, then the
* values in the buf_sizes[] array below will be used.
@@ -347,4 +357,6 @@ test_memcpy_perf(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(memcpy_perf_autotest, test_memcpy_perf);
diff --git a/app/test/test_mempool_perf.c b/app/test/test_mempool_perf.c
index 8f629736e8..193327a546 100644
--- a/app/test/test_mempool_perf.c
+++ b/app/test/test_mempool_perf.c
@@ -28,6 +28,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_mempool_perf(void)
+{
+ printf("mempool_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
/*
* Mempool performance
* =======
@@ -393,4 +403,6 @@ test_mempool_perf(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(mempool_perf_autotest, test_mempool_perf);
diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c
index da035348bd..dcfcc8a32a 100644
--- a/app/test/test_mp_secondary.c
+++ b/app/test/test_mp_secondary.c
@@ -14,9 +14,18 @@
#include <errno.h>
#include <string.h>
#include <unistd.h>
-#ifndef RTE_EXEC_ENV_WINDOWS
+
+#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>
-#endif
#include <libgen.h>
#include <dirent.h>
#include <limits.h>
@@ -214,4 +223,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_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 <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 /*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..9209fb2658 100644
--- a/app/test/test_rcu_qsbr_perf.c
+++ b/app/test/test_rcu_qsbr_perf.c
@@ -15,6 +15,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_rcu_qsbr_main(void)
+{
+ printf("rcu_qsbr_main not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
/* Check condition and return an error if true. */
static uint16_t enabled_core_ids[RTE_MAX_LCORE];
static unsigned int num_cores;
@@ -687,4 +697,6 @@ test_rcu_qsbr_main(void)
return -1;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
diff --git a/app/test/test_reciprocal_division.c b/app/test/test_reciprocal_division.c
index 8ea9b1d24d..8777211cd7 100644
--- a/app/test/test_reciprocal_division.c
+++ b/app/test/test_reciprocal_division.c
@@ -13,6 +13,16 @@
#include <rte_random.h>
#include <rte_reciprocal.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_reciprocal(void)
+{
+ printf("reciprocal not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ITERATIONS (1ULL << 32)
#define DIVIDE_ITER (100)
@@ -164,4 +174,6 @@ test_reciprocal(void)
return result;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(reciprocal_division, test_reciprocal);
diff --git a/app/test/test_reciprocal_division_perf.c b/app/test/test_reciprocal_division_perf.c
index 4f625873e5..66b004fa1b 100644
--- a/app/test/test_reciprocal_division_perf.c
+++ b/app/test/test_reciprocal_division_perf.c
@@ -13,6 +13,16 @@
#include <rte_random.h>
#include <rte_reciprocal.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_reciprocal_division_perf(void)
+{
+ printf("reciprocal_division_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ITERATIONS (1ULL << 32)
#define DIVIDE_ITER (1ULL << 28)
@@ -205,4 +215,6 @@ test_reciprocal_division_perf(void)
return result;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(reciprocal_division_perf, test_reciprocal_division_perf);
diff --git a/app/test/test_red.c b/app/test/test_red.c
index e973f3131e..d0200c13aa 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 <stdlib.h>
#include <stdio.h>
@@ -8,12 +9,34 @@
#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 +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 <stdio.h>
#include <unistd.h>
@@ -9,12 +10,20 @@
#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 +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 <medvedkinv@gmail.com>
* 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 +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 <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,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 <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 +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 060cf1ffa8..c31273941c 100644
--- a/app/test/test_security.c
+++ b/app/test/test_security.c
@@ -1,12 +1,24 @@
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
*/
+#include "test.h"
#include <rte_errno.h>
#include <rte_log.h>
#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_ether.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_security(void)
+{
+ printf("security not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <rte_security.h>
#include <rte_security_driver.h>
@@ -20,7 +32,7 @@
#endif
#include <rte_test.h>
-#include "test.h"
+
/**
* Security
@@ -2639,4 +2651,6 @@ test_security(void)
return unit_test_suite_runner(&security_testsuite);
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(security_autotest, test_security);
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 <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 +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 <rte_ip.h>
#include <rte_string_fns.h>
#include <rte_hexdump.h>
@@ -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 <string.h>
#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 aabf4375db..45dc7682d8 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 <string.h>
#include <rte_pipeline.h>
#include <rte_log.h>
@@ -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 <string.h>
#include <rte_byteorder.h>
#include <rte_table_lpm_ipv6.h>
@@ -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 16a9f1878b..002a7b8ad6 100644
--- a/app/test/test_timer_secondary.c
+++ b/app/test/test_timer_secondary.c
@@ -16,6 +16,17 @@
#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 */
@@ -213,4 +224,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.32.0.windows.2
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [dpdk-dev] [PATCH v6 01/12] lib: build libraries that some tests depend on
2021-10-26 0:47 ` Jie Zhou
@ 2021-10-26 8:44 ` Thomas Monjalon
0 siblings, 0 replies; 245+ messages in thread
From: Thomas Monjalon @ 2021-10-26 8:44 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, aconole
26/10/2021 02:47, Jie Zhou:
> On Mon, Oct 25, 2021 at 05:38:42PM +0200, Thomas Monjalon wrote:
> > 14/10/2021 18:21, Jie Zhou:
> > > Enable building subset of libraries that tests depend on for Windows
> > >
> > > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > > ---
> > > lib/meson.build | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/lib/meson.build b/lib/meson.build
> > > index b2ba7258d8..bd6c27deef 100644
> > > --- a/lib/meson.build
> > > +++ b/lib/meson.build
> > > @@ -82,9 +82,11 @@ if is_windows
> > > 'bitratestats',
> > > 'cryptodev',
> > > 'cfgfile',
> > > + 'efd',
> > > 'gro',
> > > 'gso',
> > > 'latencystats',
> > > + 'lpm',
> > > 'pdump',
> > > 'stack',
> > > 'security',
> > >
> >
> > It needs to be rebased after the recent changes to disable libs on Windows.
> > But instead of such patch, I would prefer one patch per lib,
> > with Tested-by tags showing that the lib is tested and working on Windows.
> > Also you need to Cc the maintainer of the lib being enabled.
> >
> Thanks Thomas. Will rebase in V7, and will separately enabling efd, lpm, and their corresponding unit tests in two patches after this one.
I think it enabling can be done in separate patches out of the series.
There is a chance to merge such patch before the big series.
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v8 03/11] app/test: replace POSIX specific code
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 03/11] app/test: replace POSIX specific code Jie Zhou
@ 2021-11-23 22:02 ` Dmitry Kozlyuk
2021-12-01 1:05 ` Jie Zhou
0 siblings, 1 reply; 245+ messages in thread
From: Dmitry Kozlyuk @ 2021-11-23 22:02 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
2021-10-25 19:45 (UTC-0700), Jie Zhou:
> - Include rte_os_shim.h
> - Replace sleep and usleep with rte_delay_us_sleep
> - #ifndef RTE_EXEC_ENV_WINDOWS for POSIX code only
>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
This patch can be combined with the previous one:
they serve the same purpose---to remove Unix-specific code.
Please try to summarize in the commit message
which parts of the tests suites are excluded, e.g. multi-process.
It is more useful then stating what was changed in the code.
[...]
> diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c
> index 115bee966d..9a76bd299f 100644
> --- a/app/test/test_cmdline.c
> +++ b/app/test/test_cmdline.c
> @@ -31,6 +31,7 @@ test_cmdline(void)
> return -1;
> if (test_parse_num_invalid_param() < 0)
> return -1;
> +#ifndef RTE_EXEC_ENV_WINDOWS
> printf("Testing parsing IP addresses...\n");
> if (test_parse_ipaddr_valid() < 0)
> return -1;
> @@ -38,6 +39,7 @@ test_cmdline(void)
> return -1;
> if (test_parse_ipaddr_invalid_param() < 0)
> return -1;
> +#endif
> printf("Testing parsing strings...\n");
> if (test_parse_string_valid() < 0)
> return -1;
What's wrong with parsing IP addresses on Windows?
[...]
> diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c
> index 5b6f05dbb1..da035348bd 100644
> --- a/app/test/test_mp_secondary.c
> +++ b/app/test/test_mp_secondary.c
> @@ -14,7 +14,9 @@
> #include <errno.h>
> #include <string.h>
> #include <unistd.h>
> +#ifndef RTE_EXEC_ENV_WINDOWS
> #include <sys/wait.h>
> +#endif
> #include <libgen.h>
> #include <dirent.h>
> #include <limits.h>
<libgen.h> is absent on Windows for sure, but you don't exclude it.
Does this file even need modification?
It's not going to be compiled for Windows.
[...]
> diff --git a/app/test/test_ring_stress.c b/app/test/test_ring_stress.c
> index 1af45e0fc8..ce3535c6b2 100644
> --- a/app/test/test_ring_stress.c
> +++ b/app/test/test_ring_stress.c
> @@ -43,9 +43,10 @@ test_ring_stress(void)
> n += test_ring_rts_stress.nb_case;
> k += run_test(&test_ring_rts_stress);
>
> +#ifndef RTE_EXEC_ENV_WINDOWS
> n += test_ring_hts_stress.nb_case;
> k += run_test(&test_ring_hts_stress);
> -
> +#endif
Can you please elaborate what is the issue with this case?
It is also one of the details you usually want to put
into the commit message.
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v8 04/11] app/test: exclude ENOTSUP as failure
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 04/11] app/test: exclude ENOTSUP as failure Jie Zhou
@ 2021-11-23 22:02 ` Dmitry Kozlyuk
2021-12-01 0:31 ` Jie Zhou
0 siblings, 1 reply; 245+ messages in thread
From: Dmitry Kozlyuk @ 2021-11-23 22:02 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
2021-10-25 19:45 (UTC-0700), Jie Zhou:
> Check rte_errno to exclude ENOTSUP as failures in test_memory.c
>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
> app/test/test_memory.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/app/test/test_memory.c b/app/test/test_memory.c
> index dbf6871e71..379b0f99ca 100644
> --- a/app/test/test_memory.c
> +++ b/app/test/test_memory.c
> @@ -10,6 +10,7 @@
> #include <rte_memory.h>
> #include <rte_common.h>
> #include <rte_memzone.h>
> +#include <rte_errno.h>
>
> #include "test.h"
>
> @@ -63,7 +64,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
> /* we're able to get memseg fd - try getting its offset */
> ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
> if (ret < 0) {
> - if (errno == ENOTSUP)
> + if (rte_errno == ENOTSUP)
> return 1;
> return -1;
> }
The commit title and message contradict what is inside.
ENOTSUP was excluded previously, but errno was checked instead of rte_errno.
It should be stated what was wrong and how it is fixed (with a Fixes tag).
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v8 06/11] app/test: temporarily "skip" one cmdline test case
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 06/11] app/test: temporarily "skip" one cmdline test case Jie Zhou
@ 2021-11-23 22:02 ` Dmitry Kozlyuk
2021-12-01 0:30 ` Jie Zhou
0 siblings, 1 reply; 245+ messages in thread
From: Dmitry Kozlyuk @ 2021-11-23 22:02 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
2021-10-25 19:45 (UTC-0700), Jie Zhou:
> cmdline tests pass except one failure at the test_cmdline_socket_fns
> test case with error: failed to open /dev/null for reading!
Can't it be something like this?
#ifndef RTE_EXEC_ENV_WINDOWS
#define NULL_INPUT "/dev/null"
#else
#define NULL_INPUT "NUL"
#endif
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v8 10/11] app/test: replace .sh scripts with .py scripts
2021-10-26 2:46 ` [dpdk-dev] [PATCH v8 10/11] app/test: replace .sh scripts with .py scripts Jie Zhou
@ 2021-11-23 22:15 ` Dmitry Kozlyuk
2021-12-01 0:29 ` Jie Zhou
0 siblings, 1 reply; 245+ messages in thread
From: Dmitry Kozlyuk @ 2021-11-23 22:15 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
2021-10-25 19:46 (UTC-0700), Jie Zhou:
> - Add python script to check if system supports hugepages
> - Remove corresponding .sh scripts
> - Replace calling of .sh with corresponding .py in meson.build
>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
> app/test/has-hugepage.sh | 11 -----------
> app/test/has_hugepage.py | 25 +++++++++++++++++++++++++
> app/test/meson.build | 2 +-
> 3 files changed, 26 insertions(+), 12 deletions(-)
> delete mode 100755 app/test/has-hugepage.sh
> create mode 100644 app/test/has_hugepage.py
>
> diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh
> deleted file mode 100755
> index d600fad319..0000000000
> --- a/app/test/has-hugepage.sh
> +++ /dev/null
> @@ -1,11 +0,0 @@
> -#! /bin/sh
> -# SPDX-License-Identifier: BSD-3-Clause
> -# Copyright 2020 Mellanox Technologies, Ltd
> -
> -if [ "$(uname)" = "Linux" ] ; then
> - cat /proc/sys/vm/nr_hugepages || echo 0
> -elif [ "$(uname)" = "FreeBSD" ] ; then
> - echo 1 # assume FreeBSD always has hugepages
> -else
> - echo 0
> -fi
> diff --git a/app/test/has_hugepage.py b/app/test/has_hugepage.py
> new file mode 100644
> index 0000000000..70107c61fd
> --- /dev/null
> +++ b/app/test/has_hugepage.py
> @@ -0,0 +1,25 @@
> +# SPDX-License-Identifier: BSD-3-Clause
> +# Copyright (c) 2021 Microsoft Corporation
> +"""This script checks if the system supports huge pages"""
> +
> +import platform
> +import ctypes
> +
> +osName = platform.system()
Please follow Python's preferred naming style, "os_name".
> +if osName == "Linux":
> + with open("/proc/sys/vm/nr_hugepages") as file_o:
> + content = file_o.read()
> + print(content)
Compared to shell version, lost is the logic to print 0 in case of a failure.
> +elif osName == "FreeBSD":
> + # Assume FreeBSD always has hugepages enabled
> + print("1")
> +elif osName == "Windows":
> + # On Windows, determine if large page is supported based on the
> + # value returned by GetLargePageMinimum. If the return value is zero,
> + # the processor does not support large pages.
I honestly don't see what this comment adds to the code below :)
> + if ctypes.windll.kernel32.GetLargePageMinimum() > 0:
> + print("1")
> + else:
> + print("0")
> +else:
> + print("0")
[...]
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v8 10/11] app/test: replace .sh scripts with .py scripts
2021-11-23 22:15 ` Dmitry Kozlyuk
@ 2021-12-01 0:29 ` Jie Zhou
0 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 0:29 UTC (permalink / raw)
To: Dmitry Kozlyuk
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
On Wed, Nov 24, 2021 at 01:15:33AM +0300, Dmitry Kozlyuk wrote:
> 2021-10-25 19:46 (UTC-0700), Jie Zhou:
> > - Add python script to check if system supports hugepages
> > - Remove corresponding .sh scripts
> > - Replace calling of .sh with corresponding .py in meson.build
> >
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > ---
> > app/test/has-hugepage.sh | 11 -----------
> > app/test/has_hugepage.py | 25 +++++++++++++++++++++++++
> > app/test/meson.build | 2 +-
> > 3 files changed, 26 insertions(+), 12 deletions(-)
> > delete mode 100755 app/test/has-hugepage.sh
> > create mode 100644 app/test/has_hugepage.py
> >
> > diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh
> > deleted file mode 100755
> > index d600fad319..0000000000
> > --- a/app/test/has-hugepage.sh
> > +++ /dev/null
> > @@ -1,11 +0,0 @@
> > -#! /bin/sh
> > -# SPDX-License-Identifier: BSD-3-Clause
> > -# Copyright 2020 Mellanox Technologies, Ltd
> > -
> > -if [ "$(uname)" = "Linux" ] ; then
> > - cat /proc/sys/vm/nr_hugepages || echo 0
> > -elif [ "$(uname)" = "FreeBSD" ] ; then
> > - echo 1 # assume FreeBSD always has hugepages
> > -else
> > - echo 0
> > -fi
> > diff --git a/app/test/has_hugepage.py b/app/test/has_hugepage.py
> > new file mode 100644
> > index 0000000000..70107c61fd
> > --- /dev/null
> > +++ b/app/test/has_hugepage.py
> > @@ -0,0 +1,25 @@
> > +# SPDX-License-Identifier: BSD-3-Clause
> > +# Copyright (c) 2021 Microsoft Corporation
> > +"""This script checks if the system supports huge pages"""
> > +
> > +import platform
> > +import ctypes
> > +
> > +osName = platform.system()
>
> Please follow Python's preferred naming style, "os_name".
>
> > +if osName == "Linux":
> > + with open("/proc/sys/vm/nr_hugepages") as file_o:
> > + content = file_o.read()
> > + print(content)
>
> Compared to shell version, lost is the logic to print 0 in case of a failure.
>
> > +elif osName == "FreeBSD":
> > + # Assume FreeBSD always has hugepages enabled
> > + print("1")
> > +elif osName == "Windows":
> > + # On Windows, determine if large page is supported based on the
> > + # value returned by GetLargePageMinimum. If the return value is zero,
> > + # the processor does not support large pages.
>
> I honestly don't see what this comment adds to the code below :)
>
> > + if ctypes.windll.kernel32.GetLargePageMinimum() > 0:
> > + print("1")
> > + else:
> > + print("0")
> > +else:
> > + print("0")
> [...]
Thanks Dmitry. Addressed all in V9.
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v8 06/11] app/test: temporarily "skip" one cmdline test case
2021-11-23 22:02 ` Dmitry Kozlyuk
@ 2021-12-01 0:30 ` Jie Zhou
0 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 0:30 UTC (permalink / raw)
To: Dmitry Kozlyuk
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
On Wed, Nov 24, 2021 at 01:02:13AM +0300, Dmitry Kozlyuk wrote:
> 2021-10-25 19:45 (UTC-0700), Jie Zhou:
> > cmdline tests pass except one failure at the test_cmdline_socket_fns
> > test case with error: failed to open /dev/null for reading!
>
> Can't it be something like this?
>
> #ifndef RTE_EXEC_ENV_WINDOWS
> #define NULL_INPUT "/dev/null"
> #else
> #define NULL_INPUT "NUL"
> #endif
Yes, it works. Thanks!
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v8 04/11] app/test: exclude ENOTSUP as failure
2021-11-23 22:02 ` Dmitry Kozlyuk
@ 2021-12-01 0:31 ` Jie Zhou
0 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 0:31 UTC (permalink / raw)
To: Dmitry Kozlyuk
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
On Wed, Nov 24, 2021 at 01:02:10AM +0300, Dmitry Kozlyuk wrote:
> 2021-10-25 19:45 (UTC-0700), Jie Zhou:
> > Check rte_errno to exclude ENOTSUP as failures in test_memory.c
> >
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > ---
> > app/test/test_memory.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/app/test/test_memory.c b/app/test/test_memory.c
> > index dbf6871e71..379b0f99ca 100644
> > --- a/app/test/test_memory.c
> > +++ b/app/test/test_memory.c
> > @@ -10,6 +10,7 @@
> > #include <rte_memory.h>
> > #include <rte_common.h>
> > #include <rte_memzone.h>
> > +#include <rte_errno.h>
> >
> > #include "test.h"
> >
> > @@ -63,7 +64,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
> > /* we're able to get memseg fd - try getting its offset */
> > ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
> > if (ret < 0) {
> > - if (errno == ENOTSUP)
> > + if (rte_errno == ENOTSUP)
> > return 1;
> > return -1;
> > }
>
> The commit title and message contradict what is inside.
> ENOTSUP was excluded previously, but errno was checked instead of rte_errno.
> It should be stated what was wrong and how it is fixed (with a Fixes tag).
Will add the Fixes info and revise the title and message.
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v8 03/11] app/test: replace POSIX specific code
2021-11-23 22:02 ` Dmitry Kozlyuk
@ 2021-12-01 1:05 ` Jie Zhou
2021-12-01 7:19 ` Dmitry Kozlyuk
0 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 1:05 UTC (permalink / raw)
To: Dmitry Kozlyuk
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
On Wed, Nov 24, 2021 at 01:02:06AM +0300, Dmitry Kozlyuk wrote:
> 2021-10-25 19:45 (UTC-0700), Jie Zhou:
> > - Include rte_os_shim.h
> > - Replace sleep and usleep with rte_delay_us_sleep
> > - #ifndef RTE_EXEC_ENV_WINDOWS for POSIX code only
> >
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > ---
>
> This patch can be combined with the previous one:
> they serve the same purpose---to remove Unix-specific code.
>
> Please try to summarize in the commit message
> which parts of the tests suites are excluded, e.g. multi-process.
> It is more useful then stating what was changed in the code.
>
Will combine and revise the message.
> [...]
> > diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c
> > index 115bee966d..9a76bd299f 100644
> > --- a/app/test/test_cmdline.c
> > +++ b/app/test/test_cmdline.c
> > @@ -31,6 +31,7 @@ test_cmdline(void)
> > return -1;
> > if (test_parse_num_invalid_param() < 0)
> > return -1;
> > +#ifndef RTE_EXEC_ENV_WINDOWS
> > printf("Testing parsing IP addresses...\n");
> > if (test_parse_ipaddr_valid() < 0)
> > return -1;
> > @@ -38,6 +39,7 @@ test_cmdline(void)
> > return -1;
> > if (test_parse_ipaddr_invalid_param() < 0)
> > return -1;
> > +#endif
> > printf("Testing parsing strings...\n");
> > if (test_parse_string_valid() < 0)
> > return -1;
>
> What's wrong with parsing IP addresses on Windows?
>
test_cmdline_ipaddr.c uses linux netinet/in.h specific u6_addr. Skip these 3 cases for now and prefer a separate patch to make it work on Windows. Or maybe there is already DPDK support on this which I am not aware of? Thanks.
> [...]
> > diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c
> > index 5b6f05dbb1..da035348bd 100644
> > --- a/app/test/test_mp_secondary.c
> > +++ b/app/test/test_mp_secondary.c
> > @@ -14,7 +14,9 @@
> > #include <errno.h>
> > #include <string.h>
> > #include <unistd.h>
> > +#ifndef RTE_EXEC_ENV_WINDOWS
> > #include <sys/wait.h>
> > +#endif
> > #include <libgen.h>
> > #include <dirent.h>
> > #include <limits.h>
>
> <libgen.h> is absent on Windows for sure, but you don't exclude it.
> Does this file even need modification?
> It's not going to be compiled for Windows.
>
This is replaced with the test stub in the patch#11 (of V8) to make it compile on Windows. Sorry for the confusion. Will make sure remove this unnecessary part from V9.
> [...]
> > diff --git a/app/test/test_ring_stress.c b/app/test/test_ring_stress.c
> > index 1af45e0fc8..ce3535c6b2 100644
> > --- a/app/test/test_ring_stress.c
> > +++ b/app/test/test_ring_stress.c
> > @@ -43,9 +43,10 @@ test_ring_stress(void)
> > n += test_ring_rts_stress.nb_case;
> > k += run_test(&test_ring_rts_stress);
> >
> > +#ifndef RTE_EXEC_ENV_WINDOWS
> > n += test_ring_hts_stress.nb_case;
> > k += run_test(&test_ring_hts_stress);
> > -
> > +#endif
>
> Can you please elaborate what is the issue with this case?
> It is also one of the details you usually want to put
> into the commit message.
Cannot remember what caused this case being skipped in the first place, but it can work now. So removed the ifndef. Thanks.
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v8 03/11] app/test: replace POSIX specific code
2021-12-01 1:05 ` Jie Zhou
@ 2021-12-01 7:19 ` Dmitry Kozlyuk
0 siblings, 0 replies; 245+ messages in thread
From: Dmitry Kozlyuk @ 2021-12-01 7:19 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
2021-11-30 17:05 (UTC-0800), Jie Zhou:
> On Wed, Nov 24, 2021 at 01:02:06AM +0300, Dmitry Kozlyuk wrote:
[...]
> > [...]
> > > diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c
> > > index 115bee966d..9a76bd299f 100644
> > > --- a/app/test/test_cmdline.c
> > > +++ b/app/test/test_cmdline.c
> > > @@ -31,6 +31,7 @@ test_cmdline(void)
> > > return -1;
> > > if (test_parse_num_invalid_param() < 0)
> > > return -1;
> > > +#ifndef RTE_EXEC_ENV_WINDOWS
> > > printf("Testing parsing IP addresses...\n");
> > > if (test_parse_ipaddr_valid() < 0)
> > > return -1;
> > > @@ -38,6 +39,7 @@ test_cmdline(void)
> > > return -1;
> > > if (test_parse_ipaddr_invalid_param() < 0)
> > > return -1;
> > > +#endif
> > > printf("Testing parsing strings...\n");
> > > if (test_parse_string_valid() < 0)
> > > return -1;
> >
> > What's wrong with parsing IP addresses on Windows?
> >
> test_cmdline_ipaddr.c uses linux netinet/in.h specific u6_addr. Skip these
> 3 cases for now and prefer a separate patch to make it work on Windows. Or
> maybe there is already DPDK support on this which I am not aware of? Thanks.
Understood, only please explain this in the commit log.
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v9 0/9] app/test: enable subset of tests on Windows
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 00/11] app/test: enable subset of " Jie Zhou
` (10 preceding siblings ...)
2021-10-26 2:46 ` [dpdk-dev] [PATCH v8 11/11] app/test: enable subset of unit tests on Windows Jie Zhou
@ 2021-12-01 18:05 ` Jie Zhou
2021-12-01 18:05 ` [PATCH v9 1/9] eal/windows: return ENOTSUP for not supported API Jie Zhou
` (9 more replies)
11 siblings, 10 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 18:05 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
From: Jie Zhou <jizh@microsoft.com>
This patchset is to enable a subset of unit tests on windows. It mainly includes:
- Replace POSIX specific codes
- Add test stubs for not supported ones on Windows
- Fix some lib and tests per failures investigation
- Replace .sh script with .py script for meson.build
- Enable build and run subset of unit tests on Windows
Future work:
- Work with CI/CD lab to onboard unit tests on Windows to catch regression
- Enable more tests
---
V2 changes:
- Fix compilation error on FreeBSD
- Fix email mismatch issue
- Add a missing space around "*"
---
V3 changes:
- Fix a misc c coding style issue
- Revise some commit title and message body
- Fix violations of PEP8 in new added Python scripts
- Add error handling in get_coremask.py
- Fix has_hugepage.py to check system support of hugepages
instead of checking privileges
- Fix test meson.build to run Python scripts using py3
- Consolidate lists of source files, test dep, etc. across all
platforms, with conditional extending on some platform(s)
---
V4 changes:
- Remove building of ip_frag, rib, and reorder libraries on Windows.
These three libs usually can be built on Windows without change.
However, in between the time of V3 and V4, there is regression in
upstream caused build failures of these three libs. Will separately
investigate and enable these libraries.
- Remove previous patch#2 (Enable mempool/stack on Windows) from this
patchset as it was separated out and merged as patch-19314.
- Consolidate the source files, deps, tests lists across platforms as
much as possible.
---
V5 changes:
- Remove a space between function name and open parenthesis '('
- Add back a header mistakenly deleted
---
V6 changes:
- Fix inconsistent static vs. non-static declarations
---
V7 changes:
- Remove get_coremask.py as it is not needed any more in meson.build
- Remove enablement of efd and lpm and their corresponding unit tests.
The enablement of these two libs and their UTs will be in separate
patches after this patch set.
V8 changes:
- Fix coding style issue of using C99 // comments
V9 changes:
- Fix has_hugepage.py with adding failure handling on Linux, using
proper variable name to follow Python convention, and removing
unnecessary comment.
- Enable previously skipped test_cmdline_socket_fns test cases
- Revise title and message, and add Fixes info for current Patch#3
- Combine 2 patches (previous #2 and #3 in V8) into one and with
more detailed message
Jie Zhou (9):
eal/windows: return ENOTSUP for not supported API
app/test: remove POSIX-specific code
app/test: fix incorrect errno variable
app/test: skip interrupt tests on Windows
app/test: skip two logs_autotest cases on Windows
app/test: differentiate a strerror on different OS
app/test: remove two alarm_autotest cases
app/test: replace .sh script with .py script
app/test: enable subset of unit tests on Windows
app/test/commands.c | 2 -
app/test/has-hugepage.sh | 11 ---
app/test/has_hugepage.py | 26 +++++
app/test/meson.build | 119 ++++++++++++-----------
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +-
app/test/test.c | 5 +-
app/test/test_acl.c | 12 +++
app/test/test_alarm.c | 4 +
app/test/test_bpf.c | 15 ++-
app/test/test_byteorder.c | 2 +-
app/test/test_cksum.c | 12 +++
app/test/test_cmdline.c | 2 +
app/test/test_cmdline_ipaddr.c | 5 +
app/test/test_cmdline_lib.c | 13 ++-
app/test/test_crc.c | 1 -
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_dmadev.c | 14 ++-
app/test/test_dmadev_api.c | 4 +
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_errno.c | 12 ++-
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 | 12 +++
app/test/test_graph.c | 18 +++-
app/test/test_graph_perf.c | 16 ++-
app/test/test_hash_perf.c | 12 +++
app/test/test_interrupts.c | 10 ++
app/test/test_ipfrag.c | 16 ++-
app/test/test_ipsec.c | 15 ++-
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 | 12 +++
app/test/test_logs.c | 6 +-
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 | 17 +++-
app/test/test_mbuf.c | 13 ++-
app/test/test_member.c | 16 ++-
app/test/test_member_perf.c | 16 ++-
app/test/test_memcpy_perf.c | 18 +++-
app/test/test_memory.c | 2 +-
app/test/test_mempool_perf.c | 12 +++
app/test/test_mp_secondary.c | 12 +++
app/test/test_pie.c | 30 +++++-
app/test/test_pmd_perf.c | 6 +-
app/test/test_rawdev.c | 17 +++-
app/test/test_rcu_qsbr_perf.c | 12 +++
app/test/test_reciprocal_division.c | 12 +++
app/test/test_reciprocal_division_perf.c | 12 +++
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_ring_stress_impl.h | 2 +-
app/test/test_sched.c | 14 ++-
app/test/test_security.c | 16 ++-
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_telemetry_data.c | 2 +
app/test/test_timer_secondary.c | 13 +++
app/test/test_trace.c | 32 +++++-
lib/eal/common/eal_common_errno.c | 4 +
lib/eal/windows/eal_memalloc.c | 6 +-
91 files changed, 1131 insertions(+), 156 deletions(-)
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v9 1/9] eal/windows: return ENOTSUP for not supported API
2021-12-01 18:05 ` [PATCH v9 0/9] app/test: enable subset of " Jie Zhou
@ 2021-12-01 18:05 ` Jie Zhou
2021-12-01 18:05 ` [PATCH v9 2/9] app/test: remove POSIX-specific code Jie Zhou
` (8 subsequent siblings)
9 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 18:05 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
UT memory_autotest on Windows has 2 failed cases on eal APIs
eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2
APIs are not supported on Windows yet. Should return ENOTSUP such that
in test_memory.c these 2 ENOTSUP cases will not be marked as failures,
same as other ENOTSUP cases.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
lib/eal/windows/eal_memalloc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/eal/windows/eal_memalloc.c b/lib/eal/windows/eal_memalloc.c
index 55d6dcc71c..aa7589b81d 100644
--- a/lib/eal/windows/eal_memalloc.c
+++ b/lib/eal/windows/eal_memalloc.c
@@ -17,7 +17,7 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
RTE_SET_USED(list_idx);
RTE_SET_USED(seg_idx);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
@@ -28,7 +28,7 @@ eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
RTE_SET_USED(seg_idx);
RTE_SET_USED(offset);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
static int
@@ -428,7 +428,7 @@ eal_memalloc_sync_with_primary(void)
{
/* No multi-process support. */
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v9 2/9] app/test: remove POSIX-specific code
2021-12-01 18:05 ` [PATCH v9 0/9] app/test: enable subset of " Jie Zhou
2021-12-01 18:05 ` [PATCH v9 1/9] eal/windows: return ENOTSUP for not supported API Jie Zhou
@ 2021-12-01 18:05 ` Jie Zhou
2021-12-01 18:05 ` [PATCH v9 3/9] app/test: fix incorrect errno variable Jie Zhou
` (7 subsequent siblings)
9 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 18:05 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Remove header inclusion of netinet/in.h and terminos.h
- Include rte_os_shim.h
- Replace sleep and usleep with rte_delay_us_sleep
- Use NUL on Windows as /dev/null for Linux
- Exclude tests not yet supported on Windows, e.g. multi-process, and
IP address parsing (the test cases use linux netinet/in.h u6_addr
and better have a separate patch to add such tests on Windows)
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/commands.c | 2 --
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +++-
app/test/test.c | 5 ++++-
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline.c | 2 ++
app/test/test_cmdline_lib.c | 13 +++++++++----
app/test/test_crc.c | 1 -
app/test/test_pmd_perf.c | 6 +++++-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_telemetry_data.c | 2 ++
11 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/app/test/commands.c b/app/test/commands.c
index 2dced3bc44..887cabad64 100644
--- a/app/test/commands.c
+++ b/app/test/commands.c
@@ -8,8 +8,6 @@
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
-#include <netinet/in.h>
-#include <termios.h>
#include <inttypes.h>
#include <errno.h>
#include <sys/queue.h>
diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index 8ac24577ba..6b42b9b83b 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -5,6 +5,7 @@
#include <rte_byteorder.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
+#include <rte_os_shim.h>
#include "packet_burst_generator.h"
diff --git a/app/test/process.h b/app/test/process.h
index 5b10cf64df..1f073b9c5c 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -7,12 +7,14 @@
#include <errno.h> /* errno */
#include <limits.h> /* PATH_MAX */
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <libgen.h> /* basename et al */
+#include <sys/wait.h>
+#endif
#include <stdlib.h> /* NULL */
#include <string.h> /* strerror */
#include <unistd.h> /* readlink */
#include <dirent.h>
-#include <sys/wait.h>
#include <rte_string_fns.h> /* strlcpy */
diff --git a/app/test/test.c b/app/test/test.c
index 5194131026..e69cae3eea 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
@@ -63,7 +62,9 @@ do_recursive_call(void)
const char *env_var;
int (*action_fn)(void);
} actions[] = {
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "run_secondary_instances", test_mp_secondary },
+#endif
#ifdef RTE_LIB_PDUMP
#ifdef RTE_NET_RING
{ "run_pdump_server_tests", test_pdump },
@@ -82,7 +83,9 @@ do_recursive_call(void)
{ "test_file_prefix", no_action },
{ "test_no_huge_flag", no_action },
#ifdef RTE_LIB_TIMER
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "timer_secondary_spawn_wait", test_timer_secondary },
+#endif
#endif
};
diff --git a/app/test/test_byteorder.c b/app/test/test_byteorder.c
index 03c08d9abf..de14ed539e 100644
--- a/app/test/test_byteorder.c
+++ b/app/test/test_byteorder.c
@@ -46,7 +46,7 @@ test_byteorder(void)
return -1;
res_u16 = rte_bswap16(0x1337);
- printf("const %"PRIx16" -> %"PRIx16"\n", 0x1337, res_u16);
+ printf("const %"PRIx16" -> %"PRIx16"\n", (uint16_t)0x1337, res_u16);
if (res_u16 != 0x3713)
return -1;
diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c
index 115bee966d..9a76bd299f 100644
--- a/app/test/test_cmdline.c
+++ b/app/test/test_cmdline.c
@@ -31,6 +31,7 @@ test_cmdline(void)
return -1;
if (test_parse_num_invalid_param() < 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
printf("Testing parsing IP addresses...\n");
if (test_parse_ipaddr_valid() < 0)
return -1;
@@ -38,6 +39,7 @@ test_cmdline(void)
return -1;
if (test_parse_ipaddr_invalid_param() < 0)
return -1;
+#endif
printf("Testing parsing strings...\n");
if (test_parse_string_valid() < 0)
return -1;
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index f50ccdb599..fcd58cb76a 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
@@ -22,6 +21,12 @@
#include "test_cmdline.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
+#define NULL_INPUT "/dev/null"
+#else
+#define NULL_INPUT "NUL"
+#endif
+
/****************************************************************/
/* static functions required for some tests */
static void
@@ -156,10 +161,10 @@ test_cmdline_socket_fns(void)
cl = cmdline_stdin_new(&ctx, NULL);
if (cl != NULL)
goto error;
- cl = cmdline_file_new(NULL, "prompt", "/dev/null");
+ cl = cmdline_file_new(NULL, "prompt", NULL_INPUT);
if (cl != NULL)
goto error;
- cl = cmdline_file_new(&ctx, NULL, "/dev/null");
+ cl = cmdline_file_new(&ctx, NULL, NULL_INPUT);
if (cl != NULL)
goto error;
cl = cmdline_file_new(&ctx, "prompt", NULL);
@@ -171,7 +176,7 @@ test_cmdline_socket_fns(void)
cmdline_free(cl);
return -1;
}
- cl = cmdline_file_new(&ctx, "prompt", "/dev/null");
+ cl = cmdline_file_new(&ctx, "prompt", NULL_INPUT);
if (cl == NULL) {
printf("Error: failed to open /dev/null for reading!");
return -1;
diff --git a/app/test/test_crc.c b/app/test/test_crc.c
index bf1d344359..0ed080e482 100644
--- a/app/test/test_crc.c
+++ b/app/test/test_crc.c
@@ -14,7 +14,6 @@
#define CRC32_VEC_LEN2 348
#define CRC16_VEC_LEN1 12
#define CRC16_VEC_LEN2 2
-#define LINE_LEN 75
/* CRC test vector */
static const uint8_t crc_vec[CRC_VEC_LEN] = {
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 0aa9dc1b1c..25611bfe9b 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -296,6 +296,7 @@ reset_count(void)
idle = 0;
}
+#ifndef RTE_EXEC_ENV_WINDOWS
static void
stats_display(uint16_t port_id)
{
@@ -325,6 +326,7 @@ signal_handler(int signum)
if (signum == SIGUSR2)
stats_display(0);
}
+#endif
struct rte_mbuf **tx_burst;
@@ -638,7 +640,7 @@ exec_burst(uint32_t flags, int lcore)
i = (i >= conf->nb_ports - 1) ? 0 : (i + 1);
}
- sleep(5);
+ rte_delay_us(5 * US_PER_S);
/* only when polling second */
if (flags == SC_BURST_XMIT_FIRST)
@@ -669,8 +671,10 @@ test_pmd_perf(void)
printf("Start PMD RXTX cycles cost test.\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
signal(SIGUSR1, signal_handler);
signal(SIGUSR2, signal_handler);
+#endif
nb_ports = rte_eth_dev_count_avail();
if (nb_ports < NB_ETHPORTS_USED) {
diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h
index 2825a9dce6..62f046a91a 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -360,7 +360,7 @@ test_mt1(int (*test)(void *))
/* signal worker to start test */
__atomic_store_n(&wrk_cmd, WRK_CMD_RUN, __ATOMIC_RELEASE);
- usleep(run_time * US_PER_S);
+ rte_delay_us(run_time * US_PER_S);
/* signal worker to start test */
__atomic_store_n(&wrk_cmd, WRK_CMD_STOP, __ATOMIC_RELEASE);
diff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c
index 18b93db8ef..73eee293a1 100644
--- a/app/test/test_telemetry_data.c
+++ b/app/test/test_telemetry_data.c
@@ -4,7 +4,9 @@
#include <string.h>
#include <sys/socket.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/un.h>
+#endif
#include <unistd.h>
#include <limits.h>
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v9 3/9] app/test: fix incorrect errno variable
2021-12-01 18:05 ` [PATCH v9 0/9] app/test: enable subset of " Jie Zhou
2021-12-01 18:05 ` [PATCH v9 1/9] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-12-01 18:05 ` [PATCH v9 2/9] app/test: remove POSIX-specific code Jie Zhou
@ 2021-12-01 18:05 ` Jie Zhou
2021-12-01 18:05 ` [PATCH v9 4/9] app/test: skip interrupt tests on Windows Jie Zhou
` (6 subsequent siblings)
9 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 18:05 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Fix incorrect errno variable used in memory autotest.
Use rte_errno instead.
Fixes: 086d426406bd ("app/test: fix memory autotests on FreeBSD")
Cc: bruce.richardson@intel.com
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index dbf6871e71..140ac3f3cf 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -63,7 +63,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
/* we're able to get memseg fd - try getting its offset */
ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
if (ret < 0) {
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
return -1;
}
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v9 4/9] app/test: skip interrupt tests on Windows
2021-12-01 18:05 ` [PATCH v9 0/9] app/test: enable subset of " Jie Zhou
` (2 preceding siblings ...)
2021-12-01 18:05 ` [PATCH v9 3/9] app/test: fix incorrect errno variable Jie Zhou
@ 2021-12-01 18:05 ` Jie Zhou
2021-12-01 18:05 ` [PATCH v9 5/9] app/test: skip two logs_autotest cases " Jie Zhou
` (5 subsequent siblings)
9 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 18:05 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Even though test_interrupts.c can compile on Windows, skip interrupt
tests for now since majority of eal_interrupt on Windows are stubs.
Will remove the skip after interrupt being fully enabled on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_interrupts.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
index 2a05399f96..eec9b2805b 100644
--- a/app/test/test_interrupts.c
+++ b/app/test/test_interrupts.c
@@ -12,6 +12,15 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_interrupt(void)
+{
+ printf("Interrupt on Windows is not fully supported yet, skipping test\n");
+ return TEST_SKIPPED;
+}
+#else
+
#define TEST_INTERRUPT_CHECK_INTERVAL 100 /* ms */
/* predefined interrupt handle types */
@@ -590,5 +599,6 @@ test_interrupt(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v9 5/9] app/test: skip two logs_autotest cases on Windows
2021-12-01 18:05 ` [PATCH v9 0/9] app/test: enable subset of " Jie Zhou
` (3 preceding siblings ...)
2021-12-01 18:05 ` [PATCH v9 4/9] app/test: skip interrupt tests on Windows Jie Zhou
@ 2021-12-01 18:05 ` Jie Zhou
2021-12-01 18:05 ` [PATCH v9 6/9] app/test: differentiate a strerror on different OS Jie Zhou
` (4 subsequent siblings)
9 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 18:05 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
DPDK logs_autotest on Windows failed at "dynamic log types" tests.
The failures are on 2 test cases for rte_log_set_level_regexp API,
due to regular expression is not supported on Windows in DPDK yet
and regcomp/regexec are just stubs on Windows (in regex.h).
In app\test\test_logs.c, ifndef these two test cases, and for the
rte_log_set_level_pattern validation case following these two cases,
differentiate the expected log level passed into macro CHECK_LEVELS
Now logs_autotest completes for all dynamic log types and static log types.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_logs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/test/test_logs.c b/app/test/test_logs.c
index 7abb6eeca2..7c001c1ab3 100644
--- a/app/test/test_logs.c
+++ b/app/test/test_logs.c
@@ -113,6 +113,7 @@ test_logs(void)
rte_log_set_level(logtype1, RTE_LOG_ERR);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#ifndef RTE_EXEC_ENV_WINDOWS
rte_log_set_level_regexp("type$", RTE_LOG_EMERG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
@@ -121,7 +122,10 @@ test_logs(void)
rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_EMERG, RTE_LOG_EMERG);
-
+#else
+ ret = rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
+ CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#endif
/* set logtype level low to so we can test global level */
rte_log_set_level_pattern("logtype*", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_DEBUG, RTE_LOG_DEBUG, RTE_LOG_DEBUG);
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v9 6/9] app/test: differentiate a strerror on different OS
2021-12-01 18:05 ` [PATCH v9 0/9] app/test: enable subset of " Jie Zhou
` (4 preceding siblings ...)
2021-12-01 18:05 ` [PATCH v9 5/9] app/test: skip two logs_autotest cases " Jie Zhou
@ 2021-12-01 18:05 ` Jie Zhou
2021-12-01 18:05 ` [PATCH v9 7/9] app/test: remove two alarm_autotest cases Jie Zhou
` (3 subsequent siblings)
9 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 18:05 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
On Windows, strerror returns just "Unknown error" for errnum greater
than MAX_ERRNO, while linux and freebsd returns "Unknown error <num>",
which is the current expectation for errno_autotest. Differentiate
the error string on Windows to remove a "duplicate error code" failure.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_errno.c | 12 +++++++++++-
lib/eal/common/eal_common_errno.c | 4 ++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/app/test/test_errno.c b/app/test/test_errno.c
index 3ff0456a58..0db4fbc8b3 100644
--- a/app/test/test_errno.c
+++ b/app/test/test_errno.c
@@ -18,13 +18,19 @@ test_errno(void)
{
const char *rte_retval;
const char *libc_retval;
+
+#ifndef RTE_EXEC_ENV_WINDOWS
#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD has a colon in the string, unlike linux */
const char unknown_code_result[] = "Unknown error: %d";
#else
const char unknown_code_result[] = "Unknown error %d";
#endif
- char expected_libc_retval[sizeof(unknown_code_result)+3];
+ char expected_libc_retval[sizeof(unknown_code_result) + 3];
+#else
+ /* Windows doesn't return error number for error greater than MAX_errno*/
+ static const char expected_libc_retval[] = "Unknown error";
+#endif
/* use a small selection of standard errors for testing */
int std_errs[] = {EAGAIN, EBADF, EACCES, EINTR, EINVAL};
@@ -54,11 +60,13 @@ test_errno(void)
rte_retval, libc_retval);
if (strcmp(rte_retval, libc_retval) == 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
/* generate appropriate error string for unknown error number
* and then check that this is what we got back. If not, we have
* a duplicate error number that conflicts with errno.h */
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, rte_errs[i]);
+#endif
if ((strcmp(expected_libc_retval, libc_retval) != 0) &&
(strcmp("", libc_retval) != 0)){
printf("Error, duplicate error code %d\n", rte_errs[i]);
@@ -69,8 +77,10 @@ test_errno(void)
/* ensure that beyond RTE_MAX_ERRNO, we always get an unknown code */
rte_retval = rte_strerror(RTE_MAX_ERRNO + 1);
libc_retval = strerror(RTE_MAX_ERRNO + 1);
+#ifndef RTE_EXEC_ENV_WINDOWS
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, RTE_MAX_ERRNO + 1);
+#endif
printf("rte_strerror: '%s', strerror: '%s'\n",
rte_retval, libc_retval);
if ((strcmp(rte_retval, libc_retval) != 0) ||
diff --git a/lib/eal/common/eal_common_errno.c b/lib/eal/common/eal_common_errno.c
index f86802705a..4c4abb802e 100644
--- a/lib/eal/common/eal_common_errno.c
+++ b/lib/eal/common/eal_common_errno.c
@@ -37,7 +37,11 @@ rte_strerror(int errnum)
/* since some implementations of strerror_r throw an error
* themselves if errnum is too big, we handle that case here */
if (errnum >= RTE_MAX_ERRNO)
+#ifdef RTE_EXEC_ENV_WINDOWS
+ snprintf(ret, RETVAL_SZ, "Unknown error%s", sep);
+#else
snprintf(ret, RETVAL_SZ, "Unknown error%s %d", sep, errnum);
+#endif
else
switch (errnum){
case E_RTE_SECONDARY:
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v9 7/9] app/test: remove two alarm_autotest cases
2021-12-01 18:05 ` [PATCH v9 0/9] app/test: enable subset of " Jie Zhou
` (5 preceding siblings ...)
2021-12-01 18:05 ` [PATCH v9 6/9] app/test: differentiate a strerror on different OS Jie Zhou
@ 2021-12-01 18:05 ` Jie Zhou
2021-12-01 18:05 ` [PATCH v9 8/9] app/test: replace .sh script with .py script Jie Zhou
` (2 subsequent siblings)
9 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 18:05 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Remove two alarm_autotest test cases which do bogus range check
on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_alarm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_alarm.c b/app/test/test_alarm.c
index b4034339b8..70e97a3109 100644
--- a/app/test/test_alarm.c
+++ b/app/test/test_alarm.c
@@ -10,6 +10,7 @@
#include "test.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
static volatile int flag;
static void
@@ -18,6 +19,7 @@ test_alarm_callback(void *cb_arg)
flag = 1;
printf("Callback setting flag - OK. [cb_arg = %p]\n", cb_arg);
}
+#endif
static int
test_alarm(void)
@@ -27,6 +29,7 @@ test_alarm(void)
return 0;
#endif
+#ifndef RTE_EXEC_ENV_WINDOWS
/* check if it will fail to set alarm with wrong us value */
printf("check if it will fail to set alarm with wrong ms values\n");
if (rte_eal_alarm_set(0, test_alarm_callback,
@@ -39,6 +42,7 @@ test_alarm(void)
printf("should not be successful with (UINT64_MAX-1) us value\n");
return -1;
}
+#endif
/* check if it will fail to set alarm with null callback parameter */
printf("check if it will fail to set alarm with null callback parameter\n");
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v9 8/9] app/test: replace .sh script with .py script
2021-12-01 18:05 ` [PATCH v9 0/9] app/test: enable subset of " Jie Zhou
` (6 preceding siblings ...)
2021-12-01 18:05 ` [PATCH v9 7/9] app/test: remove two alarm_autotest cases Jie Zhou
@ 2021-12-01 18:05 ` Jie Zhou
2021-12-01 18:05 ` [PATCH v9 9/9] app/test: enable subset of unit tests on Windows Jie Zhou
2021-12-01 18:43 ` [PATCH v10 0/9] app/test: enable subset of " Jie Zhou
9 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 18:05 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Add python script to check if system supports hugepages
- Remove corresponding .sh script
- Replace calling of .sh with corresponding .py in meson.build
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/has-hugepage.sh | 11 -----------
app/test/has_hugepage.py | 26 ++++++++++++++++++++++++++
app/test/meson.build | 2 +-
3 files changed, 27 insertions(+), 12 deletions(-)
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh
deleted file mode 100755
index d600fad319..0000000000
--- a/app/test/has-hugepage.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright 2020 Mellanox Technologies, Ltd
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /proc/sys/vm/nr_hugepages || echo 0
-elif [ "$(uname)" = "FreeBSD" ] ; then
- echo 1 # assume FreeBSD always has hugepages
-else
- echo 0
-fi
diff --git a/app/test/has_hugepage.py b/app/test/has_hugepage.py
new file mode 100644
index 0000000000..f8e7087d1c
--- /dev/null
+++ b/app/test/has_hugepage.py
@@ -0,0 +1,26 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2021 Microsoft Corporation
+"""This script checks if the system supports huge pages"""
+
+import platform
+import ctypes
+
+os_name = platform.system()
+if os_name == "Linux":
+ try:
+ with open("/proc/sys/vm/nr_hugepages") as file_o:
+ content = file_o.read()
+ print(content)
+ except:
+ print("0")
+
+elif os_name == "FreeBSD":
+ # Assume FreeBSD always has hugepages enabled
+ print("1")
+elif os_name == "Windows":
+ if ctypes.windll.kernel32.GetLargePageMinimum() > 0:
+ print("1")
+ else:
+ print("0")
+else:
+ print("0")
diff --git a/app/test/meson.build b/app/test/meson.build
index 2b480adfba..97ee83029e 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -492,7 +492,7 @@ dpdk_test = executable('dpdk-test',
driver_install_path),
install: true)
-has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
+has_hugepage = run_command(py3, 'has_hugepage.py').stdout().strip() != '0'
message('hugepage availability: @0@'.format(has_hugepage))
# some perf tests (eg: memcpy perf autotest)take very long
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v9 9/9] app/test: enable subset of unit tests on Windows
2021-12-01 18:05 ` [PATCH v9 0/9] app/test: enable subset of " Jie Zhou
` (7 preceding siblings ...)
2021-12-01 18:05 ` [PATCH v9 8/9] app/test: replace .sh script with .py script Jie Zhou
@ 2021-12-01 18:05 ` Jie Zhou
2021-12-01 18:45 ` Stephen Hemminger
2021-12-01 18:43 ` [PATCH v10 0/9] app/test: enable subset of " Jie Zhou
9 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 18:05 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- For fast tests and perf tests, add test stubs to skip not supported
ones.
- For driver tests, for now skip on Windows totally to avoid
unnecessary amount of test stubs. For example, there are about 30
cryptodev related tests (even though in the meson for CI it only
listed about half) which will be enabled by "patch-18949: app/test:
enable crypto unit tests on Windows".
- For dump tests, currently the tests hang on Windows which require
further investigation. Keep the dump test list just for non-Windows
for easier tracking.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/meson.build | 117 ++++++++++++-----------
app/test/test_acl.c | 12 +++
app/test/test_bpf.c | 15 ++-
app/test/test_cksum.c | 12 +++
app/test/test_cmdline_ipaddr.c | 5 +
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_dmadev.c | 14 ++-
app/test/test_dmadev_api.c | 4 +
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 | 12 +++
app/test/test_graph.c | 18 +++-
app/test/test_graph_perf.c | 16 +++-
app/test/test_hash_perf.c | 12 +++
app/test/test_ipfrag.c | 16 +++-
app/test/test_ipsec.c | 15 ++-
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 | 12 +++
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 | 17 +++-
app/test/test_mbuf.c | 13 ++-
app/test/test_member.c | 16 +++-
app/test/test_member_perf.c | 16 +++-
app/test/test_memcpy_perf.c | 18 +++-
app/test/test_mempool_perf.c | 12 +++
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 | 12 +++
app/test/test_reciprocal_division.c | 12 +++
app/test/test_reciprocal_division_perf.c | 12 +++
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 | 16 +++-
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 ++++++-
71 files changed, 1038 insertions(+), 126 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index 97ee83029e..52eddab36d 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,12 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if is_windows
- build = false
- reason = 'not supported on Windows'
- subdir_done()
-endif
-
if not get_option('tests')
subdir_done()
endif
@@ -158,34 +152,17 @@ test_sources = files(
)
test_deps = [
- 'acl',
'bus_pci',
'bus_vdev',
- 'bpf',
+ 'bitratestats',
'cfgfile',
'cmdline',
- 'cryptodev',
- 'distributor',
- 'dmadev',
- 'efd',
'ethdev',
- 'eventdev',
- 'fib',
- 'flow_classify',
- 'graph',
'hash',
- 'ipsec',
- 'lpm',
- 'member',
- 'node',
- 'pipeline',
- 'port',
- 'rawdev',
+ 'latencystats',
+ 'metrics',
'rcu',
- 'reorder',
- 'rib',
'ring',
- 'security',
'stack',
'telemetry',
'timer',
@@ -334,39 +311,69 @@ perf_test_names = [
]
driver_test_names = [
- 'cryptodev_aesni_mb_autotest',
- 'cryptodev_aesni_gcm_autotest',
- 'cryptodev_cn9k_autotest',
- 'cryptodev_cn10k_autotest',
- 'cryptodev_dpaa_sec_autotest',
- 'cryptodev_dpaa2_sec_autotest',
- 'cryptodev_null_autotest',
- 'cryptodev_octeontx2_autotest',
- 'cryptodev_openssl_autotest',
- 'cryptodev_openssl_asym_autotest',
- 'cryptodev_qat_autotest',
- 'cryptodev_sw_armv8_autotest',
- 'cryptodev_sw_kasumi_autotest',
- 'cryptodev_sw_mvsam_autotest',
- 'cryptodev_sw_snow3g_autotest',
- 'cryptodev_sw_zuc_autotest',
- 'dmadev_autotest',
- 'eventdev_selftest_octeontx',
- 'eventdev_selftest_sw',
- 'rawdev_autotest',
]
dump_test_names = [
- 'dump_struct_sizes',
- 'dump_mempool',
- 'dump_malloc_stats',
- 'dump_devargs',
- 'dump_log_types',
- 'dump_ring',
- 'dump_physmem',
- 'dump_memzone',
]
+if not is_windows
+ test_deps += [
+ 'acl',
+ 'bpf',
+ 'cryptodev',
+ 'distributor',
+ 'dmadev',
+ 'efd',
+ 'eventdev',
+ 'fib',
+ 'flow_classify',
+ 'graph',
+ 'ipsec',
+ 'lpm',
+ 'member',
+ 'node',
+ 'pipeline',
+ 'port',
+ 'rawdev',
+ 'reorder',
+ 'rib',
+ 'security',
+ ]
+
+ driver_test_names += [
+ 'cryptodev_aesni_mb_autotest',
+ 'cryptodev_aesni_gcm_autotest',
+ 'cryptodev_cn9k_autotest',
+ 'cryptodev_cn10k_autotest',
+ 'cryptodev_dpaa_sec_autotest',
+ 'cryptodev_dpaa2_sec_autotest',
+ 'cryptodev_null_autotest',
+ 'cryptodev_octeontx2_autotest',
+ 'cryptodev_openssl_autotest',
+ 'cryptodev_openssl_asym_autotest',
+ 'cryptodev_qat_autotest',
+ 'cryptodev_sw_armv8_autotest',
+ 'cryptodev_sw_kasumi_autotest',
+ 'cryptodev_sw_mvsam_autotest',
+ 'cryptodev_sw_snow3g_autotest',
+ 'cryptodev_sw_zuc_autotest',
+ 'eventdev_selftest_octeontx',
+ 'eventdev_selftest_sw',
+ 'rawdev_autotest',
+ ]
+
+ dump_test_names += [
+ 'dump_struct_sizes',
+ 'dump_mempool',
+ 'dump_malloc_stats',
+ 'dump_devargs',
+ 'dump_log_types',
+ 'dump_ring',
+ 'dump_physmem',
+ 'dump_memzone',
+ ]
+endif
+
# The following linkages are an exception to allow running the
# unit tests without requiring that the developer install the
# DPDK libraries. Explicit linkage of drivers (plugin libraries)
@@ -385,7 +392,7 @@ if dpdk_conf.has('RTE_LIB_METRICS')
test_sources += ['test_metrics.c']
fast_tests += [['metrics_autotest', true]]
endif
-if dpdk_conf.has('RTE_LIB_TELEMETRY')
+if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
endif
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 <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 /*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 46bcb51f86..055df252ba 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -14,11 +14,22 @@
#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 +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_cksum.c b/app/test/test_cksum.c
index cd983d7c01..3c5bfc8671 100644
--- a/app/test/test_cksum.c
+++ b/app/test/test_cksum.c
@@ -13,6 +13,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_cksum(void)
+{
+ printf("cksum not supported, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MEMPOOL_CACHE_SIZE 0
#define MBUF_DATA_SIZE 256
#define NB_MBUF 128
@@ -268,4 +278,6 @@ test_cksum(void)
}
#undef GOTO_FAIL
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(cksum_autotest, test_cksum);
diff --git a/app/test/test_cmdline_ipaddr.c b/app/test/test_cmdline_ipaddr.c
index 2a1ee120fc..ff039a304f 100644
--- a/app/test/test_cmdline_ipaddr.c
+++ b/app/test/test_cmdline_ipaddr.c
@@ -2,9 +2,12 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
+
#include <netinet/in.h>
#include <sys/socket.h>
@@ -669,3 +672,5 @@ test_parse_ipaddr_invalid_param(void)
}
return 0;
}
+
+#endif /*ifndef RTE_EXEC_ENV_WINDOWS*/
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 10b48cdadb..f83c844e42 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 <time.h>
#include <rte_common.h>
@@ -15739,3 +15741,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 9d19a6d6d9..680ced4dbe 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 <rte_bus_vdev.h>
#include <rte_common.h>
#include <rte_hexdump.h>
@@ -2429,3 +2431,5 @@ REGISTER_TEST_COMMAND(cryptodev_octeontx2_asym_autotest,
test_cryptodev_octeontx2_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 <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 /*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 <rte_common.h>
#include <rte_cryptodev.h>
#include <rte_esp.h>
@@ -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 <time.h>
#include <rte_common.h>
@@ -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 <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 /*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 <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 @@ 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 <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 /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(distributor_perf_autotest, test_distributor_perf);
diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c
index b206db27ae..c2ea9090cf 100644
--- a/app/test/test_dmadev.c
+++ b/app/test/test_dmadev.c
@@ -2,6 +2,17 @@
* Copyright(c) 2021 HiSilicon Limited
* Copyright(c) 2021 Intel Corporation
*/
+#include "test.h"
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_dma(void)
+{
+ printf("dma not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
#include <inttypes.h>
@@ -13,7 +24,6 @@
#include <rte_bus_vdev.h>
#include <rte_dmadev_pmd.h>
-#include "test.h"
#include "test_dmadev_api.h"
#define ERR_RETURN(...) do { print_err(__func__, __LINE__, __VA_ARGS__); return -1; } while (0)
@@ -864,4 +874,6 @@ test_dma(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(dmadev_autotest, test_dma);
diff --git a/app/test/test_dmadev_api.c b/app/test/test_dmadev_api.c
index 4a181af90a..7b38f66dc0 100644
--- a/app/test/test_dmadev_api.c
+++ b/app/test/test_dmadev_api.c
@@ -2,6 +2,8 @@
* Copyright(c) 2021 HiSilicon Limited
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <string.h>
#include <rte_cycles.h>
@@ -572,3 +574,5 @@ test_dma_api(uint16_t dev_id)
return 0;
};
+
+#endif /*ifndef RTE_EXEC_ENV_WINDOWS*/
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 <string.h>
#include <stdarg.h>
+
+#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 <libgen.h>
#include <stdlib.h>
#include <errno.h>
@@ -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 <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 /*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 <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 /*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..8f5fd78723 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 <string.h>
#include <rte_common.h>
#include <rte_mempool.h>
#include <rte_mbuf.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_cryptodev.h>
#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 /*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 <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 /*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 <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 /*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 <math.h>
@@ -10,6 +11,17 @@
#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 +33,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 +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 843d9766b0..fee2ecaa22 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 <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
@@ -1048,7 +1058,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);
@@ -1058,3 +1072,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 <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 +33,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 +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 <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 /*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 <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 /*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 <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);
diff --git a/app/test/test_fib_perf.c b/app/test/test_fib_perf.c
index 86b2f832b8..ec7f20e102 100644
--- a/app/test/test_fib_perf.c
+++ b/app/test/test_fib_perf.c
@@ -12,11 +12,22 @@
#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 /*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 <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 /*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..2924308dda 100644
--- a/app/test/test_func_reentrancy.c
+++ b/app/test/test_func_reentrancy.c
@@ -40,6 +40,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_func_reentrancy(void)
+{
+ printf("reentrancy not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
typedef int (*case_func_t)(void* arg);
typedef void (*case_clean_t)(unsigned lcore_id);
@@ -511,4 +521,6 @@ test_func_reentrancy(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(func_reentrancy_autotest, test_func_reentrancy);
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 <assert.h>
#include <inttypes.h>
#include <signal.h>
@@ -9,14 +11,23 @@
#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 +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 <inttypes.h>
#include <signal.h>
#include <stdio.h>
@@ -9,14 +11,22 @@
#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 +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 76cdac5d53..4229f85aa7 100644
--- a/app/test/test_hash_perf.c
+++ b/app/test/test_hash_perf.c
@@ -17,6 +17,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_hash_perf(void)
+{
+ printf("hash_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ENTRIES (1 << 19)
#define KEYS_TO_ADD (MAX_ENTRIES)
#define ADD_PERCENT 0.75 /* 75% table utilization */
@@ -749,4 +759,6 @@ test_hash_perf(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(hash_perf_autotest, test_hash_perf);
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 <time.h>
@@ -8,13 +9,22 @@
#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 +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..ed4d166f0d 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 <time.h>
@@ -13,15 +14,25 @@
#include <rte_bus_vdev.h>
#include <rte_ip.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_crypto.h>
#include <rte_cryptodev.h>
#include <rte_lcore.h>
+
#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 /*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 <stdio.h>
#include <rte_ip.h>
@@ -8,10 +9,20 @@
#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 +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 <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 +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 40ab0d5c4c..8f4e92f6ca 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 <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>
diff --git a/app/test/test_lcores.c b/app/test/test_lcores.c
index 35c47d5372..2277ae597f 100644
--- a/app/test/test_lcores.c
+++ b/app/test/test_lcores.c
@@ -11,6 +11,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_lcores(void)
+{
+ printf("lcore not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
struct thread_context {
enum { INIT, ERROR, DONE } state;
bool lcore_id_any;
@@ -411,4 +421,6 @@ test_lcores(void)
return TEST_SUCCESS;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(lcores_autotest, test_lcores);
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 <stdio.h>
#include <stdint.h>
@@ -10,7 +21,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 +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 <stdio.h>
#include <stdint.h>
@@ -8,9 +9,18 @@
#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 +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 <stdio.h>
#include <stdint.h>
@@ -12,7 +23,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 +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 <stdio.h>
#include <stdint.h>
#include <stdlib.h>
@@ -15,7 +25,6 @@
#include <rte_ip.h>
#include <rte_lpm.h>
-#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..c5224bdafe 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 <stdio.h>
#include <stdint.h>
@@ -8,6 +9,17 @@
#include <stdarg.h>
#include <errno.h>
#include <stdlib.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_malloc(void)
+{
+ printf("malloc not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <sys/mman.h>
#include <sys/queue.h>
#include <unistd.h>
@@ -23,11 +35,8 @@
#include <rte_random.h>
#include <rte_string_fns.h>
-#include "test.h"
-
#define N 10000
-
static int
is_mem_on_socket(int32_t socket);
@@ -1080,4 +1089,6 @@ test_malloc(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(malloc_autotest, test_malloc);
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index f54d1d7c00..1bc19bc71c 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 <string.h>
#include <stdarg.h>
@@ -33,7 +34,15 @@
#include <rte_tcp.h>
#include <rte_mbuf_dyn.h>
-#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_mbuf(void)
+{
+ printf("mbuf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
#define MEMPOOL_CACHE_SIZE 32
#define MBUF_DATA_SIZE 2048
@@ -2981,4 +2990,6 @@ test_mbuf(void)
}
#undef GOTO_FAIL
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(mbuf_autotest, test_mbuf);
diff --git a/app/test/test_member.c b/app/test/test_member.c
index 40aa4c8627..85f3a126b9 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 <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 +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 <stdio.h>
#include <inttypes.h>
@@ -11,9 +12,18 @@
#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 +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 c711e36ba7..e9388fa7c4 100644
--- a/app/test/test_memcpy_perf.c
+++ b/app/test/test_memcpy_perf.c
@@ -2,21 +2,31 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#include "test.h"
+
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_memcpy_perf(void)
+{
+ printf("memcpy_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <sys/time.h>
#include <rte_common.h>
#include <rte_cycles.h>
#include <rte_random.h>
#include <rte_malloc.h>
-
#include <rte_memcpy.h>
-#include "test.h"
-
/*
* Set this to the maximum buffer size you want to test. If it is 0, then the
* values in the buf_sizes[] array below will be used.
@@ -347,4 +357,6 @@ test_memcpy_perf(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(memcpy_perf_autotest, test_memcpy_perf);
diff --git a/app/test/test_mempool_perf.c b/app/test/test_mempool_perf.c
index 87ad251367..60058ab9ab 100644
--- a/app/test/test_mempool_perf.c
+++ b/app/test/test_mempool_perf.c
@@ -28,6 +28,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_mempool_perf(void)
+{
+ printf("mempool_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
/*
* Mempool performance
* =======
@@ -393,4 +403,6 @@ test_mempool_perf(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(mempool_perf_autotest, test_mempool_perf);
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 <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 /*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..a558d6df9e 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 <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -12,8 +38,6 @@
#include <time.h>
#include <math.h>
-#include "test.h"
-
#include <rte_pie.h>
#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 <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 /*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..9209fb2658 100644
--- a/app/test/test_rcu_qsbr_perf.c
+++ b/app/test/test_rcu_qsbr_perf.c
@@ -15,6 +15,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_rcu_qsbr_main(void)
+{
+ printf("rcu_qsbr_main not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
/* Check condition and return an error if true. */
static uint16_t enabled_core_ids[RTE_MAX_LCORE];
static unsigned int num_cores;
@@ -687,4 +697,6 @@ test_rcu_qsbr_main(void)
return -1;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
diff --git a/app/test/test_reciprocal_division.c b/app/test/test_reciprocal_division.c
index 8ea9b1d24d..8777211cd7 100644
--- a/app/test/test_reciprocal_division.c
+++ b/app/test/test_reciprocal_division.c
@@ -13,6 +13,16 @@
#include <rte_random.h>
#include <rte_reciprocal.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_reciprocal(void)
+{
+ printf("reciprocal not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ITERATIONS (1ULL << 32)
#define DIVIDE_ITER (100)
@@ -164,4 +174,6 @@ test_reciprocal(void)
return result;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(reciprocal_division, test_reciprocal);
diff --git a/app/test/test_reciprocal_division_perf.c b/app/test/test_reciprocal_division_perf.c
index 4f625873e5..66b004fa1b 100644
--- a/app/test/test_reciprocal_division_perf.c
+++ b/app/test/test_reciprocal_division_perf.c
@@ -13,6 +13,16 @@
#include <rte_random.h>
#include <rte_reciprocal.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_reciprocal_division_perf(void)
+{
+ printf("reciprocal_division_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ITERATIONS (1ULL << 32)
#define DIVIDE_ITER (1ULL << 28)
@@ -205,4 +215,6 @@ test_reciprocal_division_perf(void)
return result;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(reciprocal_division_perf, test_reciprocal_division_perf);
diff --git a/app/test/test_red.c b/app/test/test_red.c
index 05936cfee8..524f9c9b6d 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 <stdlib.h>
#include <stdio.h>
@@ -8,12 +9,34 @@
#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 +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 <stdio.h>
#include <unistd.h>
@@ -9,12 +10,20 @@
#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 +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 <medvedkinv@gmail.com>
* 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 +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 <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,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 <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 +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 060cf1ffa8..c31273941c 100644
--- a/app/test/test_security.c
+++ b/app/test/test_security.c
@@ -1,12 +1,24 @@
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
*/
+#include "test.h"
#include <rte_errno.h>
#include <rte_log.h>
#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_ether.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_security(void)
+{
+ printf("security not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <rte_security.h>
#include <rte_security_driver.h>
@@ -20,7 +32,7 @@
#endif
#include <rte_test.h>
-#include "test.h"
+
/**
* Security
@@ -2639,4 +2651,6 @@ test_security(void)
return unit_test_suite_runner(&security_testsuite);
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(security_autotest, test_security);
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 <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 +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 <rte_ip.h>
#include <rte_string_fns.h>
#include <rte_hexdump.h>
@@ -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 <string.h>
#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 aabf4375db..45dc7682d8 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 <string.h>
#include <rte_pipeline.h>
#include <rte_log.h>
@@ -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 <string.h>
#include <rte_byteorder.h>
#include <rte_table_lpm_ipv6.h>
@@ -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 <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 +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.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v10 0/9] app/test: enable subset of tests on Windows
2021-12-01 18:05 ` [PATCH v9 0/9] app/test: enable subset of " Jie Zhou
` (8 preceding siblings ...)
2021-12-01 18:05 ` [PATCH v9 9/9] app/test: enable subset of unit tests on Windows Jie Zhou
@ 2021-12-01 18:43 ` Jie Zhou
2021-12-01 18:43 ` [PATCH v10 1/9] eal/windows: return ENOTSUP for not supported API Jie Zhou
` (9 more replies)
9 siblings, 10 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 18:43 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
This patchset is to enable a subset of unit tests on windows. It mainly includes:
- Replace POSIX specific codes
- Add test stubs for not supported ones on Windows
- Fix some lib and tests per failures investigation
- Replace .sh script with .py script for meson.build
- Enable build and run subset of unit tests on Windows
Future work:
- Work with CI/CD lab to onboard unit tests on Windows to catch regression
- Enable more tests
---
V2 changes:
- Fix compilation error on FreeBSD
- Fix email mismatch issue
- Add a missing space around "*"
---
V3 changes:
- Fix a misc c coding style issue
- Revise some commit title and message body
- Fix violations of PEP8 in new added Python scripts
- Add error handling in get_coremask.py
- Fix has_hugepage.py to check system support of hugepages
instead of checking privileges
- Fix test meson.build to run Python scripts using py3
- Consolidate lists of source files, test dep, etc. across all
platforms, with conditional extending on some platform(s)
---
V4 changes:
- Remove building of ip_frag, rib, and reorder libraries on Windows.
These three libs usually can be built on Windows without change.
However, in between the time of V3 and V4, there is regression in
upstream caused build failures of these three libs. Will separately
investigate and enable these libraries.
- Remove previous patch#2 (Enable mempool/stack on Windows) from this
patchset as it was separated out and merged as patch-19314.
- Consolidate the source files, deps, tests lists across platforms as
much as possible.
---
V5 changes:
- Remove a space between function name and open parenthesis '('
- Add back a header mistakenly deleted
---
V6 changes:
- Fix inconsistent static vs. non-static declarations
---
V7 changes:
- Remove get_coremask.py as it is not needed any more in meson.build
- Remove enablement of efd and lpm and their corresponding unit tests.
The enablement of these two libs and their UTs will be in separate
patches after this patch set.
V8 changes:
- Fix coding style issue of using C99 // comments
V9 changes:
- Fix has_hugepage.py with adding failure handling on Linux, using
proper variable name to follow Python convention, and removing
unnecessary comment.
- Enable previously skipped test_cmdline_socket_fns test cases
- Revise title and message, and add Fixes info for current Patch#3
- Combine 2 patches (previous #2 and #3 in V8) into one and with
more detailed message
V10 changes:
- Fix indentation
Jie Zhou (9):
eal/windows: return ENOTSUP for not supported API
app/test: remove POSIX-specific code
app/test: fix incorrect errno variable
app/test: skip interrupt tests on Windows
app/test: skip two logs_autotest cases on Windows
app/test: differentiate a strerror on different OS
app/test: remove two alarm_autotest cases
app/test: replace .sh script with .py script
app/test: enable subset of unit tests on Windows
app/test/commands.c | 2 -
app/test/has-hugepage.sh | 11 ---
app/test/has_hugepage.py | 26 +++++
app/test/meson.build | 119 ++++++++++++-----------
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +-
app/test/test.c | 5 +-
app/test/test_acl.c | 12 +++
app/test/test_alarm.c | 4 +
app/test/test_bpf.c | 15 ++-
app/test/test_byteorder.c | 2 +-
app/test/test_cksum.c | 12 +++
app/test/test_cmdline.c | 2 +
app/test/test_cmdline_ipaddr.c | 5 +
app/test/test_cmdline_lib.c | 13 ++-
app/test/test_crc.c | 1 -
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_dmadev.c | 14 ++-
app/test/test_dmadev_api.c | 4 +
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_errno.c | 12 ++-
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 | 12 +++
app/test/test_graph.c | 18 +++-
app/test/test_graph_perf.c | 16 ++-
app/test/test_hash_perf.c | 12 +++
app/test/test_interrupts.c | 10 ++
app/test/test_ipfrag.c | 16 ++-
app/test/test_ipsec.c | 15 ++-
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 | 12 +++
app/test/test_logs.c | 6 +-
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 | 17 +++-
app/test/test_mbuf.c | 13 ++-
app/test/test_member.c | 16 ++-
app/test/test_member_perf.c | 16 ++-
app/test/test_memcpy_perf.c | 18 +++-
app/test/test_memory.c | 2 +-
app/test/test_mempool_perf.c | 12 +++
app/test/test_mp_secondary.c | 12 +++
app/test/test_pie.c | 30 +++++-
app/test/test_pmd_perf.c | 6 +-
app/test/test_rawdev.c | 17 +++-
app/test/test_rcu_qsbr_perf.c | 12 +++
app/test/test_reciprocal_division.c | 12 +++
app/test/test_reciprocal_division_perf.c | 12 +++
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_ring_stress_impl.h | 2 +-
app/test/test_sched.c | 14 ++-
app/test/test_security.c | 16 ++-
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_telemetry_data.c | 2 +
app/test/test_timer_secondary.c | 13 +++
app/test/test_trace.c | 32 +++++-
lib/eal/common/eal_common_errno.c | 4 +
lib/eal/windows/eal_memalloc.c | 6 +-
91 files changed, 1131 insertions(+), 156 deletions(-)
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v10 1/9] eal/windows: return ENOTSUP for not supported API
2021-12-01 18:43 ` [PATCH v10 0/9] app/test: enable subset of " Jie Zhou
@ 2021-12-01 18:43 ` Jie Zhou
2021-12-01 18:43 ` [PATCH v10 2/9] app/test: remove POSIX-specific code Jie Zhou
` (8 subsequent siblings)
9 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 18:43 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
UT memory_autotest on Windows has 2 failed cases on eal APIs
eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2
APIs are not supported on Windows yet. Should return ENOTSUP such that
in test_memory.c these 2 ENOTSUP cases will not be marked as failures,
same as other ENOTSUP cases.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
lib/eal/windows/eal_memalloc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/eal/windows/eal_memalloc.c b/lib/eal/windows/eal_memalloc.c
index 55d6dcc71c..aa7589b81d 100644
--- a/lib/eal/windows/eal_memalloc.c
+++ b/lib/eal/windows/eal_memalloc.c
@@ -17,7 +17,7 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
RTE_SET_USED(list_idx);
RTE_SET_USED(seg_idx);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
@@ -28,7 +28,7 @@ eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
RTE_SET_USED(seg_idx);
RTE_SET_USED(offset);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
static int
@@ -428,7 +428,7 @@ eal_memalloc_sync_with_primary(void)
{
/* No multi-process support. */
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v10 2/9] app/test: remove POSIX-specific code
2021-12-01 18:43 ` [PATCH v10 0/9] app/test: enable subset of " Jie Zhou
2021-12-01 18:43 ` [PATCH v10 1/9] eal/windows: return ENOTSUP for not supported API Jie Zhou
@ 2021-12-01 18:43 ` Jie Zhou
2021-12-04 1:05 ` Dmitry Kozlyuk
2021-12-01 18:43 ` [PATCH v10 3/9] app/test: fix incorrect errno variable Jie Zhou
` (7 subsequent siblings)
9 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 18:43 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Remove header inclusion of netinet/in.h and terminos.h
- Include rte_os_shim.h
- Replace sleep and usleep with rte_delay_us_sleep
- Use NUL on Windows as /dev/null for Linux
- Exclude tests not supported on Windows yet, e.g. multi-process, and
IP address parsing (the test cases use linux netinet/in.h u6_addr
and better have a sperate patch to add such tests on Windows)
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/commands.c | 2 --
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +++-
app/test/test.c | 5 ++++-
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline.c | 2 ++
app/test/test_cmdline_lib.c | 13 +++++++++----
app/test/test_crc.c | 1 -
app/test/test_pmd_perf.c | 6 +++++-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_telemetry_data.c | 2 ++
11 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/app/test/commands.c b/app/test/commands.c
index 2dced3bc44..887cabad64 100644
--- a/app/test/commands.c
+++ b/app/test/commands.c
@@ -8,8 +8,6 @@
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
-#include <netinet/in.h>
-#include <termios.h>
#include <inttypes.h>
#include <errno.h>
#include <sys/queue.h>
diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index 8ac24577ba..6b42b9b83b 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -5,6 +5,7 @@
#include <rte_byteorder.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
+#include <rte_os_shim.h>
#include "packet_burst_generator.h"
diff --git a/app/test/process.h b/app/test/process.h
index 5b10cf64df..1f073b9c5c 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -7,12 +7,14 @@
#include <errno.h> /* errno */
#include <limits.h> /* PATH_MAX */
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <libgen.h> /* basename et al */
+#include <sys/wait.h>
+#endif
#include <stdlib.h> /* NULL */
#include <string.h> /* strerror */
#include <unistd.h> /* readlink */
#include <dirent.h>
-#include <sys/wait.h>
#include <rte_string_fns.h> /* strlcpy */
diff --git a/app/test/test.c b/app/test/test.c
index 5194131026..e69cae3eea 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
@@ -63,7 +62,9 @@ do_recursive_call(void)
const char *env_var;
int (*action_fn)(void);
} actions[] = {
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "run_secondary_instances", test_mp_secondary },
+#endif
#ifdef RTE_LIB_PDUMP
#ifdef RTE_NET_RING
{ "run_pdump_server_tests", test_pdump },
@@ -82,7 +83,9 @@ do_recursive_call(void)
{ "test_file_prefix", no_action },
{ "test_no_huge_flag", no_action },
#ifdef RTE_LIB_TIMER
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "timer_secondary_spawn_wait", test_timer_secondary },
+#endif
#endif
};
diff --git a/app/test/test_byteorder.c b/app/test/test_byteorder.c
index 03c08d9abf..de14ed539e 100644
--- a/app/test/test_byteorder.c
+++ b/app/test/test_byteorder.c
@@ -46,7 +46,7 @@ test_byteorder(void)
return -1;
res_u16 = rte_bswap16(0x1337);
- printf("const %"PRIx16" -> %"PRIx16"\n", 0x1337, res_u16);
+ printf("const %"PRIx16" -> %"PRIx16"\n", (uint16_t)0x1337, res_u16);
if (res_u16 != 0x3713)
return -1;
diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c
index 115bee966d..9a76bd299f 100644
--- a/app/test/test_cmdline.c
+++ b/app/test/test_cmdline.c
@@ -31,6 +31,7 @@ test_cmdline(void)
return -1;
if (test_parse_num_invalid_param() < 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
printf("Testing parsing IP addresses...\n");
if (test_parse_ipaddr_valid() < 0)
return -1;
@@ -38,6 +39,7 @@ test_cmdline(void)
return -1;
if (test_parse_ipaddr_invalid_param() < 0)
return -1;
+#endif
printf("Testing parsing strings...\n");
if (test_parse_string_valid() < 0)
return -1;
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index f50ccdb599..fcd58cb76a 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
@@ -22,6 +21,12 @@
#include "test_cmdline.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
+#define NULL_INPUT "/dev/null"
+#else
+#define NULL_INPUT "NUL"
+#endif
+
/****************************************************************/
/* static functions required for some tests */
static void
@@ -156,10 +161,10 @@ test_cmdline_socket_fns(void)
cl = cmdline_stdin_new(&ctx, NULL);
if (cl != NULL)
goto error;
- cl = cmdline_file_new(NULL, "prompt", "/dev/null");
+ cl = cmdline_file_new(NULL, "prompt", NULL_INPUT);
if (cl != NULL)
goto error;
- cl = cmdline_file_new(&ctx, NULL, "/dev/null");
+ cl = cmdline_file_new(&ctx, NULL, NULL_INPUT);
if (cl != NULL)
goto error;
cl = cmdline_file_new(&ctx, "prompt", NULL);
@@ -171,7 +176,7 @@ test_cmdline_socket_fns(void)
cmdline_free(cl);
return -1;
}
- cl = cmdline_file_new(&ctx, "prompt", "/dev/null");
+ cl = cmdline_file_new(&ctx, "prompt", NULL_INPUT);
if (cl == NULL) {
printf("Error: failed to open /dev/null for reading!");
return -1;
diff --git a/app/test/test_crc.c b/app/test/test_crc.c
index bf1d344359..0ed080e482 100644
--- a/app/test/test_crc.c
+++ b/app/test/test_crc.c
@@ -14,7 +14,6 @@
#define CRC32_VEC_LEN2 348
#define CRC16_VEC_LEN1 12
#define CRC16_VEC_LEN2 2
-#define LINE_LEN 75
/* CRC test vector */
static const uint8_t crc_vec[CRC_VEC_LEN] = {
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 0aa9dc1b1c..25611bfe9b 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -296,6 +296,7 @@ reset_count(void)
idle = 0;
}
+#ifndef RTE_EXEC_ENV_WINDOWS
static void
stats_display(uint16_t port_id)
{
@@ -325,6 +326,7 @@ signal_handler(int signum)
if (signum == SIGUSR2)
stats_display(0);
}
+#endif
struct rte_mbuf **tx_burst;
@@ -638,7 +640,7 @@ exec_burst(uint32_t flags, int lcore)
i = (i >= conf->nb_ports - 1) ? 0 : (i + 1);
}
- sleep(5);
+ rte_delay_us(5 * US_PER_S);
/* only when polling second */
if (flags == SC_BURST_XMIT_FIRST)
@@ -669,8 +671,10 @@ test_pmd_perf(void)
printf("Start PMD RXTX cycles cost test.\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
signal(SIGUSR1, signal_handler);
signal(SIGUSR2, signal_handler);
+#endif
nb_ports = rte_eth_dev_count_avail();
if (nb_ports < NB_ETHPORTS_USED) {
diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h
index 2825a9dce6..62f046a91a 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -360,7 +360,7 @@ test_mt1(int (*test)(void *))
/* signal worker to start test */
__atomic_store_n(&wrk_cmd, WRK_CMD_RUN, __ATOMIC_RELEASE);
- usleep(run_time * US_PER_S);
+ rte_delay_us(run_time * US_PER_S);
/* signal worker to start test */
__atomic_store_n(&wrk_cmd, WRK_CMD_STOP, __ATOMIC_RELEASE);
diff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c
index 18b93db8ef..73eee293a1 100644
--- a/app/test/test_telemetry_data.c
+++ b/app/test/test_telemetry_data.c
@@ -4,7 +4,9 @@
#include <string.h>
#include <sys/socket.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/un.h>
+#endif
#include <unistd.h>
#include <limits.h>
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v10 3/9] app/test: fix incorrect errno variable
2021-12-01 18:43 ` [PATCH v10 0/9] app/test: enable subset of " Jie Zhou
2021-12-01 18:43 ` [PATCH v10 1/9] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-12-01 18:43 ` [PATCH v10 2/9] app/test: remove POSIX-specific code Jie Zhou
@ 2021-12-01 18:43 ` Jie Zhou
2021-12-01 18:44 ` [PATCH v10 4/9] app/test: skip interrupt tests on Windows Jie Zhou
` (6 subsequent siblings)
9 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 18:43 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Fix incorrect errno variable used in memory autotest.
Use rte_errno instead.
Fixes: 086d426406bd ("app/test: fix memory autotests on FreeBSD")
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index dbf6871e71..140ac3f3cf 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -63,7 +63,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
/* we're able to get memseg fd - try getting its offset */
ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
if (ret < 0) {
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
return -1;
}
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v10 4/9] app/test: skip interrupt tests on Windows
2021-12-01 18:43 ` [PATCH v10 0/9] app/test: enable subset of " Jie Zhou
` (2 preceding siblings ...)
2021-12-01 18:43 ` [PATCH v10 3/9] app/test: fix incorrect errno variable Jie Zhou
@ 2021-12-01 18:44 ` Jie Zhou
2021-12-01 18:44 ` [PATCH v10 5/9] app/test: skip two logs_autotest cases " Jie Zhou
` (5 subsequent siblings)
9 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 18:44 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Even though test_interrupts.c can compile on Windows, skip interrupt
tests for now since majority of eal_interrupt on Windows are stubs.
Will remove the skip after interrupt being fully enabled on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_interrupts.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
index 2a05399f96..eec9b2805b 100644
--- a/app/test/test_interrupts.c
+++ b/app/test/test_interrupts.c
@@ -12,6 +12,15 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_interrupt(void)
+{
+ printf("Interrupt on Windows is not fully supported yet, skipping test\n");
+ return TEST_SKIPPED;
+}
+#else
+
#define TEST_INTERRUPT_CHECK_INTERVAL 100 /* ms */
/* predefined interrupt handle types */
@@ -590,5 +599,6 @@ test_interrupt(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v10 5/9] app/test: skip two logs_autotest cases on Windows
2021-12-01 18:43 ` [PATCH v10 0/9] app/test: enable subset of " Jie Zhou
` (3 preceding siblings ...)
2021-12-01 18:44 ` [PATCH v10 4/9] app/test: skip interrupt tests on Windows Jie Zhou
@ 2021-12-01 18:44 ` Jie Zhou
2021-12-01 18:44 ` [PATCH v10 6/9] app/test: differentiate a strerror on different OS Jie Zhou
` (4 subsequent siblings)
9 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 18:44 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
DPDK logs_autotest on Windows failed at "dynamic log types" tests.
The failures are on 2 test cases for rte_log_set_level_regexp API,
due to regular expression is not supported on Windows in DPDK yet
and regcomp/regexec are just stubs on Windows (in regex.h).
In app\test\test_logs.c, ifndef these two test cases, and for the
rte_log_set_level_pattern validation case following these two cases,
differentiate the expected log level passed into macro CHECK_LEVELS
Now logs_autotest completes for all dynamic log types and static log types.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_logs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/test/test_logs.c b/app/test/test_logs.c
index 7abb6eeca2..7c001c1ab3 100644
--- a/app/test/test_logs.c
+++ b/app/test/test_logs.c
@@ -113,6 +113,7 @@ test_logs(void)
rte_log_set_level(logtype1, RTE_LOG_ERR);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#ifndef RTE_EXEC_ENV_WINDOWS
rte_log_set_level_regexp("type$", RTE_LOG_EMERG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
@@ -121,7 +122,10 @@ test_logs(void)
rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_EMERG, RTE_LOG_EMERG);
-
+#else
+ ret = rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
+ CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#endif
/* set logtype level low to so we can test global level */
rte_log_set_level_pattern("logtype*", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_DEBUG, RTE_LOG_DEBUG, RTE_LOG_DEBUG);
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v10 6/9] app/test: differentiate a strerror on different OS
2021-12-01 18:43 ` [PATCH v10 0/9] app/test: enable subset of " Jie Zhou
` (4 preceding siblings ...)
2021-12-01 18:44 ` [PATCH v10 5/9] app/test: skip two logs_autotest cases " Jie Zhou
@ 2021-12-01 18:44 ` Jie Zhou
2021-12-01 18:44 ` [PATCH v10 7/9] app/test: remove two alarm_autotest cases Jie Zhou
` (3 subsequent siblings)
9 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 18:44 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
On Windows, strerror returns just "Unknown error" for errnum greater
than MAX_ERRNO, while linux and freebsd returns "Unknown error <num>",
which is the current expectation for errno_autotest. Differentiate
the error string on Windows to remove a "duplicate error code" failure.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_errno.c | 12 +++++++++++-
lib/eal/common/eal_common_errno.c | 4 ++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/app/test/test_errno.c b/app/test/test_errno.c
index 3ff0456a58..0db4fbc8b3 100644
--- a/app/test/test_errno.c
+++ b/app/test/test_errno.c
@@ -18,13 +18,19 @@ test_errno(void)
{
const char *rte_retval;
const char *libc_retval;
+
+#ifndef RTE_EXEC_ENV_WINDOWS
#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD has a colon in the string, unlike linux */
const char unknown_code_result[] = "Unknown error: %d";
#else
const char unknown_code_result[] = "Unknown error %d";
#endif
- char expected_libc_retval[sizeof(unknown_code_result)+3];
+ char expected_libc_retval[sizeof(unknown_code_result) + 3];
+#else
+ /* Windows doesn't return error number for error greater than MAX_errno*/
+ static const char expected_libc_retval[] = "Unknown error";
+#endif
/* use a small selection of standard errors for testing */
int std_errs[] = {EAGAIN, EBADF, EACCES, EINTR, EINVAL};
@@ -54,11 +60,13 @@ test_errno(void)
rte_retval, libc_retval);
if (strcmp(rte_retval, libc_retval) == 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
/* generate appropriate error string for unknown error number
* and then check that this is what we got back. If not, we have
* a duplicate error number that conflicts with errno.h */
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, rte_errs[i]);
+#endif
if ((strcmp(expected_libc_retval, libc_retval) != 0) &&
(strcmp("", libc_retval) != 0)){
printf("Error, duplicate error code %d\n", rte_errs[i]);
@@ -69,8 +77,10 @@ test_errno(void)
/* ensure that beyond RTE_MAX_ERRNO, we always get an unknown code */
rte_retval = rte_strerror(RTE_MAX_ERRNO + 1);
libc_retval = strerror(RTE_MAX_ERRNO + 1);
+#ifndef RTE_EXEC_ENV_WINDOWS
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, RTE_MAX_ERRNO + 1);
+#endif
printf("rte_strerror: '%s', strerror: '%s'\n",
rte_retval, libc_retval);
if ((strcmp(rte_retval, libc_retval) != 0) ||
diff --git a/lib/eal/common/eal_common_errno.c b/lib/eal/common/eal_common_errno.c
index f86802705a..4c4abb802e 100644
--- a/lib/eal/common/eal_common_errno.c
+++ b/lib/eal/common/eal_common_errno.c
@@ -37,7 +37,11 @@ rte_strerror(int errnum)
/* since some implementations of strerror_r throw an error
* themselves if errnum is too big, we handle that case here */
if (errnum >= RTE_MAX_ERRNO)
+#ifdef RTE_EXEC_ENV_WINDOWS
+ snprintf(ret, RETVAL_SZ, "Unknown error%s", sep);
+#else
snprintf(ret, RETVAL_SZ, "Unknown error%s %d", sep, errnum);
+#endif
else
switch (errnum){
case E_RTE_SECONDARY:
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v10 7/9] app/test: remove two alarm_autotest cases
2021-12-01 18:43 ` [PATCH v10 0/9] app/test: enable subset of " Jie Zhou
` (5 preceding siblings ...)
2021-12-01 18:44 ` [PATCH v10 6/9] app/test: differentiate a strerror on different OS Jie Zhou
@ 2021-12-01 18:44 ` Jie Zhou
2021-12-01 18:44 ` [PATCH v10 8/9] app/test: replace .sh script with .py script Jie Zhou
` (2 subsequent siblings)
9 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 18:44 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Remove two alarm_autotest test cases which do bogus range check
on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_alarm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_alarm.c b/app/test/test_alarm.c
index b4034339b8..70e97a3109 100644
--- a/app/test/test_alarm.c
+++ b/app/test/test_alarm.c
@@ -10,6 +10,7 @@
#include "test.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
static volatile int flag;
static void
@@ -18,6 +19,7 @@ test_alarm_callback(void *cb_arg)
flag = 1;
printf("Callback setting flag - OK. [cb_arg = %p]\n", cb_arg);
}
+#endif
static int
test_alarm(void)
@@ -27,6 +29,7 @@ test_alarm(void)
return 0;
#endif
+#ifndef RTE_EXEC_ENV_WINDOWS
/* check if it will fail to set alarm with wrong us value */
printf("check if it will fail to set alarm with wrong ms values\n");
if (rte_eal_alarm_set(0, test_alarm_callback,
@@ -39,6 +42,7 @@ test_alarm(void)
printf("should not be successful with (UINT64_MAX-1) us value\n");
return -1;
}
+#endif
/* check if it will fail to set alarm with null callback parameter */
printf("check if it will fail to set alarm with null callback parameter\n");
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v10 8/9] app/test: replace .sh script with .py script
2021-12-01 18:43 ` [PATCH v10 0/9] app/test: enable subset of " Jie Zhou
` (6 preceding siblings ...)
2021-12-01 18:44 ` [PATCH v10 7/9] app/test: remove two alarm_autotest cases Jie Zhou
@ 2021-12-01 18:44 ` Jie Zhou
2021-12-01 18:44 ` [PATCH v10 9/9] app/test: enable subset of unit tests on Windows Jie Zhou
2021-12-03 0:06 ` [PATCH v11 0/9] app/test: enable subset of " Jie Zhou
9 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 18:44 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Add python script to check if system supports hugepages
- Remove corresponding .sh script
- Replace calling of .sh with corresponding .py in meson.build
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/has-hugepage.sh | 11 -----------
app/test/has_hugepage.py | 26 ++++++++++++++++++++++++++
app/test/meson.build | 2 +-
3 files changed, 27 insertions(+), 12 deletions(-)
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh
deleted file mode 100755
index d600fad319..0000000000
--- a/app/test/has-hugepage.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright 2020 Mellanox Technologies, Ltd
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /proc/sys/vm/nr_hugepages || echo 0
-elif [ "$(uname)" = "FreeBSD" ] ; then
- echo 1 # assume FreeBSD always has hugepages
-else
- echo 0
-fi
diff --git a/app/test/has_hugepage.py b/app/test/has_hugepage.py
new file mode 100644
index 0000000000..f8e7087d1c
--- /dev/null
+++ b/app/test/has_hugepage.py
@@ -0,0 +1,26 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2021 Microsoft Corporation
+"""This script checks if the system supports huge pages"""
+
+import platform
+import ctypes
+
+os_name = platform.system()
+if os_name == "Linux":
+ try:
+ with open("/proc/sys/vm/nr_hugepages") as file_o:
+ content = file_o.read()
+ print(content)
+ except:
+ print("0")
+
+elif os_name == "FreeBSD":
+ # Assume FreeBSD always has hugepages enabled
+ print("1")
+elif os_name == "Windows":
+ if ctypes.windll.kernel32.GetLargePageMinimum() > 0:
+ print("1")
+ else:
+ print("0")
+else:
+ print("0")
diff --git a/app/test/meson.build b/app/test/meson.build
index 2b480adfba..97ee83029e 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -492,7 +492,7 @@ dpdk_test = executable('dpdk-test',
driver_install_path),
install: true)
-has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
+has_hugepage = run_command(py3, 'has_hugepage.py').stdout().strip() != '0'
message('hugepage availability: @0@'.format(has_hugepage))
# some perf tests (eg: memcpy perf autotest)take very long
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v10 9/9] app/test: enable subset of unit tests on Windows
2021-12-01 18:43 ` [PATCH v10 0/9] app/test: enable subset of " Jie Zhou
` (7 preceding siblings ...)
2021-12-01 18:44 ` [PATCH v10 8/9] app/test: replace .sh script with .py script Jie Zhou
@ 2021-12-01 18:44 ` Jie Zhou
2021-12-02 9:17 ` David Marchand
2021-12-03 0:06 ` [PATCH v11 0/9] app/test: enable subset of " Jie Zhou
9 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 18:44 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- For fast tests and perf tests, add test stubs to skip not supported
ones.
- For driver tests, for now skip on Windows totally to avoid
unnecessary amount of test stubs. For example, there are about 30
cryptodev related tests (even though in the meson for CI it only
listed about half) which will be enabled by "patch-18949: app/test:
enable crypto unit tests on Windows".
- For dump tests, currently the tests hang on Windows which require
further investigation. Keep the dump test list just for non-Windows
for easier tracking.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/meson.build | 117 ++++++++++++-----------
app/test/test_acl.c | 12 +++
app/test/test_bpf.c | 15 ++-
app/test/test_cksum.c | 12 +++
app/test/test_cmdline_ipaddr.c | 5 +
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_dmadev.c | 14 ++-
app/test/test_dmadev_api.c | 4 +
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 | 12 +++
app/test/test_graph.c | 18 +++-
app/test/test_graph_perf.c | 16 +++-
app/test/test_hash_perf.c | 12 +++
app/test/test_ipfrag.c | 16 +++-
app/test/test_ipsec.c | 15 ++-
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 | 12 +++
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 | 17 +++-
app/test/test_mbuf.c | 13 ++-
app/test/test_member.c | 16 +++-
app/test/test_member_perf.c | 16 +++-
app/test/test_memcpy_perf.c | 18 +++-
app/test/test_mempool_perf.c | 12 +++
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 | 12 +++
app/test/test_reciprocal_division.c | 12 +++
app/test/test_reciprocal_division_perf.c | 12 +++
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 | 16 +++-
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 ++++++-
71 files changed, 1038 insertions(+), 126 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index 97ee83029e..52eddab36d 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,12 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if is_windows
- build = false
- reason = 'not supported on Windows'
- subdir_done()
-endif
-
if not get_option('tests')
subdir_done()
endif
@@ -158,34 +152,17 @@ test_sources = files(
)
test_deps = [
- 'acl',
'bus_pci',
'bus_vdev',
- 'bpf',
+ 'bitratestats',
'cfgfile',
'cmdline',
- 'cryptodev',
- 'distributor',
- 'dmadev',
- 'efd',
'ethdev',
- 'eventdev',
- 'fib',
- 'flow_classify',
- 'graph',
'hash',
- 'ipsec',
- 'lpm',
- 'member',
- 'node',
- 'pipeline',
- 'port',
- 'rawdev',
+ 'latencystats',
+ 'metrics',
'rcu',
- 'reorder',
- 'rib',
'ring',
- 'security',
'stack',
'telemetry',
'timer',
@@ -334,39 +311,69 @@ perf_test_names = [
]
driver_test_names = [
- 'cryptodev_aesni_mb_autotest',
- 'cryptodev_aesni_gcm_autotest',
- 'cryptodev_cn9k_autotest',
- 'cryptodev_cn10k_autotest',
- 'cryptodev_dpaa_sec_autotest',
- 'cryptodev_dpaa2_sec_autotest',
- 'cryptodev_null_autotest',
- 'cryptodev_octeontx2_autotest',
- 'cryptodev_openssl_autotest',
- 'cryptodev_openssl_asym_autotest',
- 'cryptodev_qat_autotest',
- 'cryptodev_sw_armv8_autotest',
- 'cryptodev_sw_kasumi_autotest',
- 'cryptodev_sw_mvsam_autotest',
- 'cryptodev_sw_snow3g_autotest',
- 'cryptodev_sw_zuc_autotest',
- 'dmadev_autotest',
- 'eventdev_selftest_octeontx',
- 'eventdev_selftest_sw',
- 'rawdev_autotest',
]
dump_test_names = [
- 'dump_struct_sizes',
- 'dump_mempool',
- 'dump_malloc_stats',
- 'dump_devargs',
- 'dump_log_types',
- 'dump_ring',
- 'dump_physmem',
- 'dump_memzone',
]
+if not is_windows
+ test_deps += [
+ 'acl',
+ 'bpf',
+ 'cryptodev',
+ 'distributor',
+ 'dmadev',
+ 'efd',
+ 'eventdev',
+ 'fib',
+ 'flow_classify',
+ 'graph',
+ 'ipsec',
+ 'lpm',
+ 'member',
+ 'node',
+ 'pipeline',
+ 'port',
+ 'rawdev',
+ 'reorder',
+ 'rib',
+ 'security',
+ ]
+
+ driver_test_names += [
+ 'cryptodev_aesni_mb_autotest',
+ 'cryptodev_aesni_gcm_autotest',
+ 'cryptodev_cn9k_autotest',
+ 'cryptodev_cn10k_autotest',
+ 'cryptodev_dpaa_sec_autotest',
+ 'cryptodev_dpaa2_sec_autotest',
+ 'cryptodev_null_autotest',
+ 'cryptodev_octeontx2_autotest',
+ 'cryptodev_openssl_autotest',
+ 'cryptodev_openssl_asym_autotest',
+ 'cryptodev_qat_autotest',
+ 'cryptodev_sw_armv8_autotest',
+ 'cryptodev_sw_kasumi_autotest',
+ 'cryptodev_sw_mvsam_autotest',
+ 'cryptodev_sw_snow3g_autotest',
+ 'cryptodev_sw_zuc_autotest',
+ 'eventdev_selftest_octeontx',
+ 'eventdev_selftest_sw',
+ 'rawdev_autotest',
+ ]
+
+ dump_test_names += [
+ 'dump_struct_sizes',
+ 'dump_mempool',
+ 'dump_malloc_stats',
+ 'dump_devargs',
+ 'dump_log_types',
+ 'dump_ring',
+ 'dump_physmem',
+ 'dump_memzone',
+ ]
+endif
+
# The following linkages are an exception to allow running the
# unit tests without requiring that the developer install the
# DPDK libraries. Explicit linkage of drivers (plugin libraries)
@@ -385,7 +392,7 @@ if dpdk_conf.has('RTE_LIB_METRICS')
test_sources += ['test_metrics.c']
fast_tests += [['metrics_autotest', true]]
endif
-if dpdk_conf.has('RTE_LIB_TELEMETRY')
+if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
endif
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 <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 /*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 46bcb51f86..055df252ba 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -14,11 +14,22 @@
#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 +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_cksum.c b/app/test/test_cksum.c
index cd983d7c01..3c5bfc8671 100644
--- a/app/test/test_cksum.c
+++ b/app/test/test_cksum.c
@@ -13,6 +13,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_cksum(void)
+{
+ printf("cksum not supported, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MEMPOOL_CACHE_SIZE 0
#define MBUF_DATA_SIZE 256
#define NB_MBUF 128
@@ -268,4 +278,6 @@ test_cksum(void)
}
#undef GOTO_FAIL
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(cksum_autotest, test_cksum);
diff --git a/app/test/test_cmdline_ipaddr.c b/app/test/test_cmdline_ipaddr.c
index 2a1ee120fc..ff039a304f 100644
--- a/app/test/test_cmdline_ipaddr.c
+++ b/app/test/test_cmdline_ipaddr.c
@@ -2,9 +2,12 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
+
#include <netinet/in.h>
#include <sys/socket.h>
@@ -669,3 +672,5 @@ test_parse_ipaddr_invalid_param(void)
}
return 0;
}
+
+#endif /*ifndef RTE_EXEC_ENV_WINDOWS*/
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 10b48cdadb..f83c844e42 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 <time.h>
#include <rte_common.h>
@@ -15739,3 +15741,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 9d19a6d6d9..680ced4dbe 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 <rte_bus_vdev.h>
#include <rte_common.h>
#include <rte_hexdump.h>
@@ -2429,3 +2431,5 @@ REGISTER_TEST_COMMAND(cryptodev_octeontx2_asym_autotest,
test_cryptodev_octeontx2_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 <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 /*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 <rte_common.h>
#include <rte_cryptodev.h>
#include <rte_esp.h>
@@ -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 <time.h>
#include <rte_common.h>
@@ -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 <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 /*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 <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 @@ 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 <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 /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(distributor_perf_autotest, test_distributor_perf);
diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c
index b206db27ae..c2ea9090cf 100644
--- a/app/test/test_dmadev.c
+++ b/app/test/test_dmadev.c
@@ -2,6 +2,17 @@
* Copyright(c) 2021 HiSilicon Limited
* Copyright(c) 2021 Intel Corporation
*/
+#include "test.h"
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_dma(void)
+{
+ printf("dma not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
#include <inttypes.h>
@@ -13,7 +24,6 @@
#include <rte_bus_vdev.h>
#include <rte_dmadev_pmd.h>
-#include "test.h"
#include "test_dmadev_api.h"
#define ERR_RETURN(...) do { print_err(__func__, __LINE__, __VA_ARGS__); return -1; } while (0)
@@ -864,4 +874,6 @@ test_dma(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(dmadev_autotest, test_dma);
diff --git a/app/test/test_dmadev_api.c b/app/test/test_dmadev_api.c
index 4a181af90a..7b38f66dc0 100644
--- a/app/test/test_dmadev_api.c
+++ b/app/test/test_dmadev_api.c
@@ -2,6 +2,8 @@
* Copyright(c) 2021 HiSilicon Limited
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <string.h>
#include <rte_cycles.h>
@@ -572,3 +574,5 @@ test_dma_api(uint16_t dev_id)
return 0;
};
+
+#endif /*ifndef RTE_EXEC_ENV_WINDOWS*/
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 <string.h>
#include <stdarg.h>
+
+#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 <libgen.h>
#include <stdlib.h>
#include <errno.h>
@@ -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 <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 /*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 <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 /*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..8f5fd78723 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 <string.h>
#include <rte_common.h>
#include <rte_mempool.h>
#include <rte_mbuf.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_cryptodev.h>
#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 /*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 <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 /*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 <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 /*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 <math.h>
@@ -10,6 +11,17 @@
#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 +33,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 +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 843d9766b0..fee2ecaa22 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 <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
@@ -1048,7 +1058,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);
@@ -1058,3 +1072,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 <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 +33,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 +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 <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 /*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 <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 /*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 <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);
diff --git a/app/test/test_fib_perf.c b/app/test/test_fib_perf.c
index 86b2f832b8..ec7f20e102 100644
--- a/app/test/test_fib_perf.c
+++ b/app/test/test_fib_perf.c
@@ -12,11 +12,22 @@
#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 /*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 <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 /*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..2924308dda 100644
--- a/app/test/test_func_reentrancy.c
+++ b/app/test/test_func_reentrancy.c
@@ -40,6 +40,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_func_reentrancy(void)
+{
+ printf("reentrancy not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
typedef int (*case_func_t)(void* arg);
typedef void (*case_clean_t)(unsigned lcore_id);
@@ -511,4 +521,6 @@ test_func_reentrancy(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(func_reentrancy_autotest, test_func_reentrancy);
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 <assert.h>
#include <inttypes.h>
#include <signal.h>
@@ -9,14 +11,23 @@
#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 +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 <inttypes.h>
#include <signal.h>
#include <stdio.h>
@@ -9,14 +11,22 @@
#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 +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 76cdac5d53..4229f85aa7 100644
--- a/app/test/test_hash_perf.c
+++ b/app/test/test_hash_perf.c
@@ -17,6 +17,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_hash_perf(void)
+{
+ printf("hash_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ENTRIES (1 << 19)
#define KEYS_TO_ADD (MAX_ENTRIES)
#define ADD_PERCENT 0.75 /* 75% table utilization */
@@ -749,4 +759,6 @@ test_hash_perf(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(hash_perf_autotest, test_hash_perf);
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 <time.h>
@@ -8,13 +9,22 @@
#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 +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..ed4d166f0d 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 <time.h>
@@ -13,15 +14,25 @@
#include <rte_bus_vdev.h>
#include <rte_ip.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_crypto.h>
#include <rte_cryptodev.h>
#include <rte_lcore.h>
+
#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 /*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 <stdio.h>
#include <rte_ip.h>
@@ -8,10 +9,20 @@
#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 +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 <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 +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 40ab0d5c4c..8f4e92f6ca 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 <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>
diff --git a/app/test/test_lcores.c b/app/test/test_lcores.c
index 35c47d5372..2277ae597f 100644
--- a/app/test/test_lcores.c
+++ b/app/test/test_lcores.c
@@ -11,6 +11,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_lcores(void)
+{
+ printf("lcore not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
struct thread_context {
enum { INIT, ERROR, DONE } state;
bool lcore_id_any;
@@ -411,4 +421,6 @@ test_lcores(void)
return TEST_SUCCESS;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(lcores_autotest, test_lcores);
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 <stdio.h>
#include <stdint.h>
@@ -10,7 +21,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 +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 <stdio.h>
#include <stdint.h>
@@ -8,9 +9,18 @@
#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 +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 <stdio.h>
#include <stdint.h>
@@ -12,7 +23,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 +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 <stdio.h>
#include <stdint.h>
#include <stdlib.h>
@@ -15,7 +25,6 @@
#include <rte_ip.h>
#include <rte_lpm.h>
-#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..c5224bdafe 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 <stdio.h>
#include <stdint.h>
@@ -8,6 +9,17 @@
#include <stdarg.h>
#include <errno.h>
#include <stdlib.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_malloc(void)
+{
+ printf("malloc not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <sys/mman.h>
#include <sys/queue.h>
#include <unistd.h>
@@ -23,11 +35,8 @@
#include <rte_random.h>
#include <rte_string_fns.h>
-#include "test.h"
-
#define N 10000
-
static int
is_mem_on_socket(int32_t socket);
@@ -1080,4 +1089,6 @@ test_malloc(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(malloc_autotest, test_malloc);
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index f54d1d7c00..1bc19bc71c 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 <string.h>
#include <stdarg.h>
@@ -33,7 +34,15 @@
#include <rte_tcp.h>
#include <rte_mbuf_dyn.h>
-#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_mbuf(void)
+{
+ printf("mbuf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
#define MEMPOOL_CACHE_SIZE 32
#define MBUF_DATA_SIZE 2048
@@ -2981,4 +2990,6 @@ test_mbuf(void)
}
#undef GOTO_FAIL
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(mbuf_autotest, test_mbuf);
diff --git a/app/test/test_member.c b/app/test/test_member.c
index 40aa4c8627..85f3a126b9 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 <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 +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 <stdio.h>
#include <inttypes.h>
@@ -11,9 +12,18 @@
#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 +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 c711e36ba7..e9388fa7c4 100644
--- a/app/test/test_memcpy_perf.c
+++ b/app/test/test_memcpy_perf.c
@@ -2,21 +2,31 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#include "test.h"
+
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_memcpy_perf(void)
+{
+ printf("memcpy_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <sys/time.h>
#include <rte_common.h>
#include <rte_cycles.h>
#include <rte_random.h>
#include <rte_malloc.h>
-
#include <rte_memcpy.h>
-#include "test.h"
-
/*
* Set this to the maximum buffer size you want to test. If it is 0, then the
* values in the buf_sizes[] array below will be used.
@@ -347,4 +357,6 @@ test_memcpy_perf(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(memcpy_perf_autotest, test_memcpy_perf);
diff --git a/app/test/test_mempool_perf.c b/app/test/test_mempool_perf.c
index 87ad251367..60058ab9ab 100644
--- a/app/test/test_mempool_perf.c
+++ b/app/test/test_mempool_perf.c
@@ -28,6 +28,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_mempool_perf(void)
+{
+ printf("mempool_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
/*
* Mempool performance
* =======
@@ -393,4 +403,6 @@ test_mempool_perf(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(mempool_perf_autotest, test_mempool_perf);
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 <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 /*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 <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -12,8 +38,6 @@
#include <time.h>
#include <math.h>
-#include "test.h"
-
#include <rte_pie.h>
#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 <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 /*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..9209fb2658 100644
--- a/app/test/test_rcu_qsbr_perf.c
+++ b/app/test/test_rcu_qsbr_perf.c
@@ -15,6 +15,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_rcu_qsbr_main(void)
+{
+ printf("rcu_qsbr_main not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
/* Check condition and return an error if true. */
static uint16_t enabled_core_ids[RTE_MAX_LCORE];
static unsigned int num_cores;
@@ -687,4 +697,6 @@ test_rcu_qsbr_main(void)
return -1;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
diff --git a/app/test/test_reciprocal_division.c b/app/test/test_reciprocal_division.c
index 8ea9b1d24d..8777211cd7 100644
--- a/app/test/test_reciprocal_division.c
+++ b/app/test/test_reciprocal_division.c
@@ -13,6 +13,16 @@
#include <rte_random.h>
#include <rte_reciprocal.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_reciprocal(void)
+{
+ printf("reciprocal not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ITERATIONS (1ULL << 32)
#define DIVIDE_ITER (100)
@@ -164,4 +174,6 @@ test_reciprocal(void)
return result;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(reciprocal_division, test_reciprocal);
diff --git a/app/test/test_reciprocal_division_perf.c b/app/test/test_reciprocal_division_perf.c
index 4f625873e5..66b004fa1b 100644
--- a/app/test/test_reciprocal_division_perf.c
+++ b/app/test/test_reciprocal_division_perf.c
@@ -13,6 +13,16 @@
#include <rte_random.h>
#include <rte_reciprocal.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_reciprocal_division_perf(void)
+{
+ printf("reciprocal_division_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ITERATIONS (1ULL << 32)
#define DIVIDE_ITER (1ULL << 28)
@@ -205,4 +215,6 @@ test_reciprocal_division_perf(void)
return result;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(reciprocal_division_perf, test_reciprocal_division_perf);
diff --git a/app/test/test_red.c b/app/test/test_red.c
index 05936cfee8..524f9c9b6d 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 <stdlib.h>
#include <stdio.h>
@@ -8,12 +9,34 @@
#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 +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 <stdio.h>
#include <unistd.h>
@@ -9,12 +10,20 @@
#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 +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 <medvedkinv@gmail.com>
* 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 +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 <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,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 <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 +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 060cf1ffa8..c31273941c 100644
--- a/app/test/test_security.c
+++ b/app/test/test_security.c
@@ -1,12 +1,24 @@
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
*/
+#include "test.h"
#include <rte_errno.h>
#include <rte_log.h>
#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_ether.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_security(void)
+{
+ printf("security not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <rte_security.h>
#include <rte_security_driver.h>
@@ -20,7 +32,7 @@
#endif
#include <rte_test.h>
-#include "test.h"
+
/**
* Security
@@ -2639,4 +2651,6 @@ test_security(void)
return unit_test_suite_runner(&security_testsuite);
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(security_autotest, test_security);
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 <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 +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 <rte_ip.h>
#include <rte_string_fns.h>
#include <rte_hexdump.h>
@@ -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 <string.h>
#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 aabf4375db..45dc7682d8 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 <string.h>
#include <rte_pipeline.h>
#include <rte_log.h>
@@ -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 <string.h>
#include <rte_byteorder.h>
#include <rte_table_lpm_ipv6.h>
@@ -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 <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 +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.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v9 9/9] app/test: enable subset of unit tests on Windows
2021-12-01 18:05 ` [PATCH v9 9/9] app/test: enable subset of unit tests on Windows Jie Zhou
@ 2021-12-01 18:45 ` Stephen Hemminger
2021-12-01 18:52 ` Jie Zhou
2021-12-01 18:58 ` [EXTERNAL] " Tyler Retzlaff
0 siblings, 2 replies; 245+ messages in thread
From: Stephen Hemminger @ 2021-12-01 18:45 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
On Wed, 1 Dec 2021 10:05:38 -0800
Jie Zhou <jizh@linux.microsoft.com> wrote:
> diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c
> index b206db27ae..c2ea9090cf 100644
> --- a/app/test/test_dmadev.c
> +++ b/app/test/test_dmadev.c
> @@ -2,6 +2,17 @@
> * Copyright(c) 2021 HiSilicon Limited
> * Copyright(c) 2021 Intel Corporation
> */
> +#include "test.h"
> +
> +#ifdef RTE_EXEC_ENV_WINDOWS
> +static int
> +test_dma(void)
> +{
> + printf("dma not supported on Windows, skipping test\n");
> + return TEST_SKIPPED;
> +}
> +
> +#else
Rather than littering code with ifdefs is it not possible to
just not build these tests on Windows?
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v9 9/9] app/test: enable subset of unit tests on Windows
2021-12-01 18:45 ` Stephen Hemminger
@ 2021-12-01 18:52 ` Jie Zhou
2021-12-01 18:58 ` [EXTERNAL] " Tyler Retzlaff
1 sibling, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-01 18:52 UTC (permalink / raw)
To: Stephen Hemminger
Cc: dev, dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
On Wed, Dec 01, 2021 at 10:45:35AM -0800, Stephen Hemminger wrote:
> On Wed, 1 Dec 2021 10:05:38 -0800
> Jie Zhou <jizh@linux.microsoft.com> wrote:
>
> > diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c
> > index b206db27ae..c2ea9090cf 100644
> > --- a/app/test/test_dmadev.c
> > +++ b/app/test/test_dmadev.c
> > @@ -2,6 +2,17 @@
> > * Copyright(c) 2021 HiSilicon Limited
> > * Copyright(c) 2021 Intel Corporation
> > */
> > +#include "test.h"
> > +
> > +#ifdef RTE_EXEC_ENV_WINDOWS
> > +static int
> > +test_dma(void)
> > +{
> > + printf("dma not supported on Windows, skipping test\n");
> > + return TEST_SKIPPED;
> > +}
> > +
> > +#else
>
> Rather than littering code with ifdefs is it not possible to
> just not build these tests on Windows?
Originally I took the approach not building on Windows, but then the community reached to a point that instead of maintaining two lists of source files to be build on Windows and on non-Windows, we use the same list, and add test stubs for not-yet-supported-on-windows ones.
^ permalink raw reply [flat|nested] 245+ messages in thread
* RE: [EXTERNAL] Re: [PATCH v9 9/9] app/test: enable subset of unit tests on Windows
2021-12-01 18:45 ` Stephen Hemminger
2021-12-01 18:52 ` Jie Zhou
@ 2021-12-01 18:58 ` Tyler Retzlaff
1 sibling, 0 replies; 245+ messages in thread
From: Tyler Retzlaff @ 2021-12-01 18:58 UTC (permalink / raw)
To: Stephen Hemminger, Jie Zhou
Cc: dev, Dmitry Kozlyuk, navasile, Dmitry Malloy, Kadam, Pallavi,
talshn, thomas, aconole
Please don't delay integration of this patch set further to port individual tests. Individual tests can be ported to windows with significantly reduced sensitivity to the churn once the conditional mechanisms are in place.
We spend enormous amounts of time continuously rebasing it every time one of the existing tests is churned or new tests are added it's a losing game given the rate of review the community provides for windows patches.
Thanks
-----Original Message-----
From: Stephen Hemminger <stephen@networkplumber.org>
Sent: Wednesday, December 1, 2021 10:46 AM
To: Jie Zhou <jizh@linux.microsoft.com>
Cc: dev@dpdk.org; Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>; Tyler Retzlaff <roretzla@microsoft.com>; navasile@linux.microsoft.com; Dmitry Malloy <dmitrym@microsoft.com>; Kadam, Pallavi <pallavi.kadam@intel.com>; talshn <talshn@mellanox.com>; thomas <thomas@monjalon.net>; aconole@redhat.com
Subject: [EXTERNAL] Re: [PATCH v9 9/9] app/test: enable subset of unit tests on Windows
On Wed, 1 Dec 2021 10:05:38 -0800
Jie Zhou <jizh@linux.microsoft.com> wrote:
> diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c index
> b206db27ae..c2ea9090cf 100644
> --- a/app/test/test_dmadev.c
> +++ b/app/test/test_dmadev.c
> @@ -2,6 +2,17 @@
> * Copyright(c) 2021 HiSilicon Limited
> * Copyright(c) 2021 Intel Corporation
> */
> +#include "test.h"
> +
> +#ifdef RTE_EXEC_ENV_WINDOWS
> +static int
> +test_dma(void)
> +{
> + printf("dma not supported on Windows, skipping test\n");
> + return TEST_SKIPPED;
> +}
> +
> +#else
Rather than littering code with ifdefs is it not possible to just not build these tests on Windows?
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v10 9/9] app/test: enable subset of unit tests on Windows
2021-12-01 18:44 ` [PATCH v10 9/9] app/test: enable subset of unit tests on Windows Jie Zhou
@ 2021-12-02 9:17 ` David Marchand
2021-12-02 23:23 ` Jie Zhou
0 siblings, 1 reply; 245+ messages in thread
From: David Marchand @ 2021-12-02 9:17 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, Dmitry Kozlyuk, roretzla, Narcisa Ana Maria Vasile,
Dmitry Malloy (MESHCHANINOV),
Pallavi Kadam, Tal Shnaiderman, Thomas Monjalon, Aaron Conole
Hello,
On Wed, Dec 1, 2021 at 7:45 PM Jie Zhou <jizh@linux.microsoft.com> wrote:
> @@ -158,34 +152,17 @@ test_sources = files(
> )
>
> test_deps = [
> - 'acl',
> 'bus_pci',
> 'bus_vdev',
> - 'bpf',
> + 'bitratestats',
There is some issue with your rebase.
Please don't reintroduce mandatory dependencies.
This is probably the reason for the CI failures at UNH.
> 'cfgfile',
> 'cmdline',
--
David Marchand
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v10 9/9] app/test: enable subset of unit tests on Windows
2021-12-02 9:17 ` David Marchand
@ 2021-12-02 23:23 ` Jie Zhou
0 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-02 23:23 UTC (permalink / raw)
To: David Marchand
Cc: dev, Dmitry Kozlyuk, roretzla, Narcisa Ana Maria Vasile,
Dmitry Malloy (MESHCHANINOV),
Pallavi Kadam, Tal Shnaiderman, Thomas Monjalon, Aaron Conole
On Thu, Dec 02, 2021 at 10:17:48AM +0100, David Marchand wrote:
> Hello,
>
> On Wed, Dec 1, 2021 at 7:45 PM Jie Zhou <jizh@linux.microsoft.com> wrote:
> > @@ -158,34 +152,17 @@ test_sources = files(
> > )
> >
> > test_deps = [
> > - 'acl',
> > 'bus_pci',
> > 'bus_vdev',
> > - 'bpf',
> > + 'bitratestats',
>
> There is some issue with your rebase.
> Please don't reintroduce mandatory dependencies.
>
> This is probably the reason for the CI failures at UNH.
>
>
> > 'cfgfile',
> > 'cmdline',
>
>
> --
> David Marchand
Thank you David! Yes, it seems from a rebase error. Removed this mandatory dependency on bitratestats in V10.
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v11 0/9] app/test: enable subset of tests on Windows
2021-12-01 18:43 ` [PATCH v10 0/9] app/test: enable subset of " Jie Zhou
` (8 preceding siblings ...)
2021-12-01 18:44 ` [PATCH v10 9/9] app/test: enable subset of unit tests on Windows Jie Zhou
@ 2021-12-03 0:06 ` Jie Zhou
2021-12-03 0:06 ` [PATCH v11 1/9] eal/windows: return ENOTSUP for not supported API Jie Zhou
` (10 more replies)
9 siblings, 11 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-03 0:06 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
This patchset is to enable a subset of unit tests on windows. It mainly includes:
- Replace POSIX specific codes
- Add test stubs for not supported ones on Windows
- Fix some lib and tests per failures investigation
- Replace .sh script with .py script for meson.build
- Enable build and run subset of unit tests on Windows
Future work:
- Work with CI/CD lab to onboard unit tests on Windows to catch regression
- Enable more tests
---
V2 changes:
- Fix compilation error on FreeBSD
- Fix email mismatch issue
- Add a missing space around "*"
---
V3 changes:
- Fix a misc c coding style issue
- Revise some commit title and message body
- Fix violations of PEP8 in new added Python scripts
- Add error handling in get_coremask.py
- Fix has_hugepage.py to check system support of hugepages
instead of checking privileges
- Fix test meson.build to run Python scripts using py3
- Consolidate lists of source files, test dep, etc. across all
platforms, with conditional extending on some platform(s)
---
V4 changes:
- Remove building of ip_frag, rib, and reorder libraries on Windows.
These three libs usually can be built on Windows without change.
However, in between the time of V3 and V4, there is regression in
upstream caused build failures of these three libs. Will separately
investigate and enable these libraries.
- Remove previous patch#2 (Enable mempool/stack on Windows) from this
patchset as it was separated out and merged as patch-19314.
- Consolidate the source files, deps, tests lists across platforms as
much as possible.
---
V5 changes:
- Remove a space between function name and open parenthesis '('
- Add back a header mistakenly deleted
---
V6 changes:
- Fix inconsistent static vs. non-static declarations
---
V7 changes:
- Remove get_coremask.py as it is not needed any more in meson.build
- Remove enablement of efd and lpm and their corresponding unit tests.
The enablement of these two libs and their UTs will be in separate
patches after this patch set.
V8 changes:
- Fix coding style issue of using C99 // comments
---
V9 changes:
- Fix has_hugepage.py with adding failure handling on Linux, using
proper variable name to follow Python convention, and removing
unnecessary comment.
- Enable previously skipped test_cmdline_socket_fns test cases
- Revise title and message, and add Fixes info for current Patch#3
- Combine 2 patches (previous #2 and #3 in V8) into one and with
more detailed message
---
V10 changes:
- Fix indentation
---
V11 changes:
- Remove mandatory dependency on bitratestats, latencystats,
and metrics libs in test meson.build, which was reintroduced
at rebase in V9.
Jie Zhou (9):
eal/windows: return ENOTSUP for not supported API
app/test: remove POSIX-specific code
app/test: fix incorrect errno variable
app/test: skip interrupt tests on Windows
app/test: skip two logs_autotest cases on Windows
app/test: differentiate a strerror on different OS
app/test: remove two alarm_autotest cases
app/test: replace .sh script with .py script
app/test: enable subset of unit tests on Windows
app/test/commands.c | 2 -
app/test/has-hugepage.sh | 11 ---
app/test/has_hugepage.py | 26 +++++
app/test/meson.build | 118 ++++++++++++-----------
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +-
app/test/test.c | 5 +-
app/test/test_acl.c | 12 +++
app/test/test_alarm.c | 4 +
app/test/test_bpf.c | 15 ++-
app/test/test_byteorder.c | 2 +-
app/test/test_cksum.c | 12 +++
app/test/test_cmdline.c | 2 +
app/test/test_cmdline_ipaddr.c | 5 +
app/test/test_cmdline_lib.c | 13 ++-
app/test/test_crc.c | 1 -
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_dmadev.c | 14 ++-
app/test/test_dmadev_api.c | 4 +
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_errno.c | 12 ++-
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 | 12 +++
app/test/test_graph.c | 18 +++-
app/test/test_graph_perf.c | 16 ++-
app/test/test_hash_perf.c | 12 +++
app/test/test_interrupts.c | 10 ++
app/test/test_ipfrag.c | 16 ++-
app/test/test_ipsec.c | 15 ++-
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 | 12 +++
app/test/test_logs.c | 6 +-
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 | 17 +++-
app/test/test_mbuf.c | 13 ++-
app/test/test_member.c | 16 ++-
app/test/test_member_perf.c | 16 ++-
app/test/test_memcpy_perf.c | 18 +++-
app/test/test_memory.c | 2 +-
app/test/test_mempool_perf.c | 12 +++
app/test/test_mp_secondary.c | 12 +++
app/test/test_pie.c | 30 +++++-
app/test/test_pmd_perf.c | 6 +-
app/test/test_rawdev.c | 17 +++-
app/test/test_rcu_qsbr_perf.c | 12 +++
app/test/test_reciprocal_division.c | 12 +++
app/test/test_reciprocal_division_perf.c | 12 +++
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_ring_stress_impl.h | 2 +-
app/test/test_sched.c | 14 ++-
app/test/test_security.c | 16 ++-
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_telemetry_data.c | 2 +
app/test/test_timer_secondary.c | 13 +++
app/test/test_trace.c | 32 +++++-
lib/eal/common/eal_common_errno.c | 4 +
lib/eal/windows/eal_memalloc.c | 6 +-
91 files changed, 1130 insertions(+), 156 deletions(-)
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v11 1/9] eal/windows: return ENOTSUP for not supported API
2021-12-03 0:06 ` [PATCH v11 0/9] app/test: enable subset of " Jie Zhou
@ 2021-12-03 0:06 ` Jie Zhou
2021-12-03 0:06 ` [PATCH v11 2/9] app/test: remove POSIX-specific code Jie Zhou
` (9 subsequent siblings)
10 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-03 0:06 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
UT memory_autotest on Windows has 2 failed cases on eal APIs
eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2
APIs are not supported on Windows yet. Should return ENOTSUP such that
in test_memory.c these 2 ENOTSUP cases will not be marked as failures,
same as other ENOTSUP cases.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
lib/eal/windows/eal_memalloc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/eal/windows/eal_memalloc.c b/lib/eal/windows/eal_memalloc.c
index 55d6dcc71c..aa7589b81d 100644
--- a/lib/eal/windows/eal_memalloc.c
+++ b/lib/eal/windows/eal_memalloc.c
@@ -17,7 +17,7 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
RTE_SET_USED(list_idx);
RTE_SET_USED(seg_idx);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
@@ -28,7 +28,7 @@ eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
RTE_SET_USED(seg_idx);
RTE_SET_USED(offset);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
static int
@@ -428,7 +428,7 @@ eal_memalloc_sync_with_primary(void)
{
/* No multi-process support. */
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v11 2/9] app/test: remove POSIX-specific code
2021-12-03 0:06 ` [PATCH v11 0/9] app/test: enable subset of " Jie Zhou
2021-12-03 0:06 ` [PATCH v11 1/9] eal/windows: return ENOTSUP for not supported API Jie Zhou
@ 2021-12-03 0:06 ` Jie Zhou
2021-12-03 0:06 ` [PATCH v11 3/9] app/test: fix incorrect errno variable Jie Zhou
` (8 subsequent siblings)
10 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-03 0:06 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Remove header inclusion of netinet/in.h and terminos.h
- Include rte_os_shim.h
- Replace sleep and usleep with rte_delay_us_sleep
- Use NUL on Windows as /dev/null for Linux
- Exclude tests not supported on Windows yet, e.g. multi-process, and
IP address parsing (the test cases use linux netinet/in.h u6_addr
and better have a separate patch to add such tests on Windows)
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/commands.c | 2 --
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +++-
app/test/test.c | 5 ++++-
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline.c | 2 ++
app/test/test_cmdline_lib.c | 13 +++++++++----
app/test/test_crc.c | 1 -
app/test/test_pmd_perf.c | 6 +++++-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_telemetry_data.c | 2 ++
11 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/app/test/commands.c b/app/test/commands.c
index 2dced3bc44..887cabad64 100644
--- a/app/test/commands.c
+++ b/app/test/commands.c
@@ -8,8 +8,6 @@
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
-#include <netinet/in.h>
-#include <termios.h>
#include <inttypes.h>
#include <errno.h>
#include <sys/queue.h>
diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index 8ac24577ba..6b42b9b83b 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -5,6 +5,7 @@
#include <rte_byteorder.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
+#include <rte_os_shim.h>
#include "packet_burst_generator.h"
diff --git a/app/test/process.h b/app/test/process.h
index 5b10cf64df..1f073b9c5c 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -7,12 +7,14 @@
#include <errno.h> /* errno */
#include <limits.h> /* PATH_MAX */
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <libgen.h> /* basename et al */
+#include <sys/wait.h>
+#endif
#include <stdlib.h> /* NULL */
#include <string.h> /* strerror */
#include <unistd.h> /* readlink */
#include <dirent.h>
-#include <sys/wait.h>
#include <rte_string_fns.h> /* strlcpy */
diff --git a/app/test/test.c b/app/test/test.c
index 5194131026..e69cae3eea 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
@@ -63,7 +62,9 @@ do_recursive_call(void)
const char *env_var;
int (*action_fn)(void);
} actions[] = {
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "run_secondary_instances", test_mp_secondary },
+#endif
#ifdef RTE_LIB_PDUMP
#ifdef RTE_NET_RING
{ "run_pdump_server_tests", test_pdump },
@@ -82,7 +83,9 @@ do_recursive_call(void)
{ "test_file_prefix", no_action },
{ "test_no_huge_flag", no_action },
#ifdef RTE_LIB_TIMER
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "timer_secondary_spawn_wait", test_timer_secondary },
+#endif
#endif
};
diff --git a/app/test/test_byteorder.c b/app/test/test_byteorder.c
index 03c08d9abf..de14ed539e 100644
--- a/app/test/test_byteorder.c
+++ b/app/test/test_byteorder.c
@@ -46,7 +46,7 @@ test_byteorder(void)
return -1;
res_u16 = rte_bswap16(0x1337);
- printf("const %"PRIx16" -> %"PRIx16"\n", 0x1337, res_u16);
+ printf("const %"PRIx16" -> %"PRIx16"\n", (uint16_t)0x1337, res_u16);
if (res_u16 != 0x3713)
return -1;
diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c
index 115bee966d..9a76bd299f 100644
--- a/app/test/test_cmdline.c
+++ b/app/test/test_cmdline.c
@@ -31,6 +31,7 @@ test_cmdline(void)
return -1;
if (test_parse_num_invalid_param() < 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
printf("Testing parsing IP addresses...\n");
if (test_parse_ipaddr_valid() < 0)
return -1;
@@ -38,6 +39,7 @@ test_cmdline(void)
return -1;
if (test_parse_ipaddr_invalid_param() < 0)
return -1;
+#endif
printf("Testing parsing strings...\n");
if (test_parse_string_valid() < 0)
return -1;
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index f50ccdb599..fcd58cb76a 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
@@ -22,6 +21,12 @@
#include "test_cmdline.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
+#define NULL_INPUT "/dev/null"
+#else
+#define NULL_INPUT "NUL"
+#endif
+
/****************************************************************/
/* static functions required for some tests */
static void
@@ -156,10 +161,10 @@ test_cmdline_socket_fns(void)
cl = cmdline_stdin_new(&ctx, NULL);
if (cl != NULL)
goto error;
- cl = cmdline_file_new(NULL, "prompt", "/dev/null");
+ cl = cmdline_file_new(NULL, "prompt", NULL_INPUT);
if (cl != NULL)
goto error;
- cl = cmdline_file_new(&ctx, NULL, "/dev/null");
+ cl = cmdline_file_new(&ctx, NULL, NULL_INPUT);
if (cl != NULL)
goto error;
cl = cmdline_file_new(&ctx, "prompt", NULL);
@@ -171,7 +176,7 @@ test_cmdline_socket_fns(void)
cmdline_free(cl);
return -1;
}
- cl = cmdline_file_new(&ctx, "prompt", "/dev/null");
+ cl = cmdline_file_new(&ctx, "prompt", NULL_INPUT);
if (cl == NULL) {
printf("Error: failed to open /dev/null for reading!");
return -1;
diff --git a/app/test/test_crc.c b/app/test/test_crc.c
index bf1d344359..0ed080e482 100644
--- a/app/test/test_crc.c
+++ b/app/test/test_crc.c
@@ -14,7 +14,6 @@
#define CRC32_VEC_LEN2 348
#define CRC16_VEC_LEN1 12
#define CRC16_VEC_LEN2 2
-#define LINE_LEN 75
/* CRC test vector */
static const uint8_t crc_vec[CRC_VEC_LEN] = {
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 0aa9dc1b1c..25611bfe9b 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -296,6 +296,7 @@ reset_count(void)
idle = 0;
}
+#ifndef RTE_EXEC_ENV_WINDOWS
static void
stats_display(uint16_t port_id)
{
@@ -325,6 +326,7 @@ signal_handler(int signum)
if (signum == SIGUSR2)
stats_display(0);
}
+#endif
struct rte_mbuf **tx_burst;
@@ -638,7 +640,7 @@ exec_burst(uint32_t flags, int lcore)
i = (i >= conf->nb_ports - 1) ? 0 : (i + 1);
}
- sleep(5);
+ rte_delay_us(5 * US_PER_S);
/* only when polling second */
if (flags == SC_BURST_XMIT_FIRST)
@@ -669,8 +671,10 @@ test_pmd_perf(void)
printf("Start PMD RXTX cycles cost test.\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
signal(SIGUSR1, signal_handler);
signal(SIGUSR2, signal_handler);
+#endif
nb_ports = rte_eth_dev_count_avail();
if (nb_ports < NB_ETHPORTS_USED) {
diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h
index 2825a9dce6..62f046a91a 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -360,7 +360,7 @@ test_mt1(int (*test)(void *))
/* signal worker to start test */
__atomic_store_n(&wrk_cmd, WRK_CMD_RUN, __ATOMIC_RELEASE);
- usleep(run_time * US_PER_S);
+ rte_delay_us(run_time * US_PER_S);
/* signal worker to start test */
__atomic_store_n(&wrk_cmd, WRK_CMD_STOP, __ATOMIC_RELEASE);
diff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c
index 18b93db8ef..73eee293a1 100644
--- a/app/test/test_telemetry_data.c
+++ b/app/test/test_telemetry_data.c
@@ -4,7 +4,9 @@
#include <string.h>
#include <sys/socket.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/un.h>
+#endif
#include <unistd.h>
#include <limits.h>
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v11 3/9] app/test: fix incorrect errno variable
2021-12-03 0:06 ` [PATCH v11 0/9] app/test: enable subset of " Jie Zhou
2021-12-03 0:06 ` [PATCH v11 1/9] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-12-03 0:06 ` [PATCH v11 2/9] app/test: remove POSIX-specific code Jie Zhou
@ 2021-12-03 0:06 ` Jie Zhou
2021-12-04 1:05 ` Dmitry Kozlyuk
2021-12-03 0:06 ` [PATCH v11 4/9] app/test: skip interrupt tests on Windows Jie Zhou
` (7 subsequent siblings)
10 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-12-03 0:06 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Fix incorrect errno variable used in memory autotest.
Use rte_errno instead.
Fixes: 086d426406bd ("app/test: fix memory autotests on FreeBSD")
Cc: bruce.richardson@intel.com
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index dbf6871e71..140ac3f3cf 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -63,7 +63,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
/* we're able to get memseg fd - try getting its offset */
ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
if (ret < 0) {
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
return -1;
}
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v11 4/9] app/test: skip interrupt tests on Windows
2021-12-03 0:06 ` [PATCH v11 0/9] app/test: enable subset of " Jie Zhou
` (2 preceding siblings ...)
2021-12-03 0:06 ` [PATCH v11 3/9] app/test: fix incorrect errno variable Jie Zhou
@ 2021-12-03 0:06 ` Jie Zhou
2021-12-04 1:06 ` Dmitry Kozlyuk
2021-12-03 0:06 ` [PATCH v11 5/9] app/test: skip two logs_autotest cases " Jie Zhou
` (6 subsequent siblings)
10 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-12-03 0:06 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Even though test_interrupts.c can compile on Windows, skip interrupt
tests for now since majority of eal_interrupt on Windows are stubs.
Will remove the skip after interrupt being fully enabled on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_interrupts.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
index 2a05399f96..eec9b2805b 100644
--- a/app/test/test_interrupts.c
+++ b/app/test/test_interrupts.c
@@ -12,6 +12,15 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_interrupt(void)
+{
+ printf("Interrupt on Windows is not fully supported yet, skipping test\n");
+ return TEST_SKIPPED;
+}
+#else
+
#define TEST_INTERRUPT_CHECK_INTERVAL 100 /* ms */
/* predefined interrupt handle types */
@@ -590,5 +599,6 @@ test_interrupt(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v11 5/9] app/test: skip two logs_autotest cases on Windows
2021-12-03 0:06 ` [PATCH v11 0/9] app/test: enable subset of " Jie Zhou
` (3 preceding siblings ...)
2021-12-03 0:06 ` [PATCH v11 4/9] app/test: skip interrupt tests on Windows Jie Zhou
@ 2021-12-03 0:06 ` Jie Zhou
2021-12-04 1:16 ` Dmitry Kozlyuk
2021-12-03 0:06 ` [PATCH v11 6/9] app/test: differentiate a strerror on different OS Jie Zhou
` (5 subsequent siblings)
10 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-12-03 0:06 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
DPDK logs_autotest on Windows failed at "dynamic log types" tests.
The failures are on 2 test cases for rte_log_set_level_regexp API,
due to regular expression is not supported on Windows in DPDK yet
and regcomp/regexec are just stubs on Windows (in regex.h).
In app\test\test_logs.c, ifndef these two test cases, and for the
rte_log_set_level_pattern validation case following these two cases,
differentiate the expected log level passed into macro CHECK_LEVELS
Now logs_autotest completes for all dynamic log types and static log types.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_logs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/test/test_logs.c b/app/test/test_logs.c
index 7abb6eeca2..7c001c1ab3 100644
--- a/app/test/test_logs.c
+++ b/app/test/test_logs.c
@@ -113,6 +113,7 @@ test_logs(void)
rte_log_set_level(logtype1, RTE_LOG_ERR);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#ifndef RTE_EXEC_ENV_WINDOWS
rte_log_set_level_regexp("type$", RTE_LOG_EMERG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
@@ -121,7 +122,10 @@ test_logs(void)
rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_EMERG, RTE_LOG_EMERG);
-
+#else
+ ret = rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
+ CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#endif
/* set logtype level low to so we can test global level */
rte_log_set_level_pattern("logtype*", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_DEBUG, RTE_LOG_DEBUG, RTE_LOG_DEBUG);
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v11 6/9] app/test: differentiate a strerror on different OS
2021-12-03 0:06 ` [PATCH v11 0/9] app/test: enable subset of " Jie Zhou
` (4 preceding siblings ...)
2021-12-03 0:06 ` [PATCH v11 5/9] app/test: skip two logs_autotest cases " Jie Zhou
@ 2021-12-03 0:06 ` Jie Zhou
2021-12-04 1:33 ` Dmitry Kozlyuk
2021-12-03 0:06 ` [PATCH v11 7/9] app/test: remove two alarm_autotest cases Jie Zhou
` (4 subsequent siblings)
10 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-12-03 0:06 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
On Windows, strerror returns just "Unknown error" for errnum greater
than MAX_ERRNO, while linux and freebsd returns "Unknown error <num>",
which is the current expectation for errno_autotest. Differentiate
the error string on Windows to remove a "duplicate error code" failure.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_errno.c | 12 +++++++++++-
lib/eal/common/eal_common_errno.c | 4 ++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/app/test/test_errno.c b/app/test/test_errno.c
index 3ff0456a58..0db4fbc8b3 100644
--- a/app/test/test_errno.c
+++ b/app/test/test_errno.c
@@ -18,13 +18,19 @@ test_errno(void)
{
const char *rte_retval;
const char *libc_retval;
+
+#ifndef RTE_EXEC_ENV_WINDOWS
#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD has a colon in the string, unlike linux */
const char unknown_code_result[] = "Unknown error: %d";
#else
const char unknown_code_result[] = "Unknown error %d";
#endif
- char expected_libc_retval[sizeof(unknown_code_result)+3];
+ char expected_libc_retval[sizeof(unknown_code_result) + 3];
+#else
+ /* Windows doesn't return error number for error greater than MAX_errno*/
+ static const char expected_libc_retval[] = "Unknown error";
+#endif
/* use a small selection of standard errors for testing */
int std_errs[] = {EAGAIN, EBADF, EACCES, EINTR, EINVAL};
@@ -54,11 +60,13 @@ test_errno(void)
rte_retval, libc_retval);
if (strcmp(rte_retval, libc_retval) == 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
/* generate appropriate error string for unknown error number
* and then check that this is what we got back. If not, we have
* a duplicate error number that conflicts with errno.h */
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, rte_errs[i]);
+#endif
if ((strcmp(expected_libc_retval, libc_retval) != 0) &&
(strcmp("", libc_retval) != 0)){
printf("Error, duplicate error code %d\n", rte_errs[i]);
@@ -69,8 +77,10 @@ test_errno(void)
/* ensure that beyond RTE_MAX_ERRNO, we always get an unknown code */
rte_retval = rte_strerror(RTE_MAX_ERRNO + 1);
libc_retval = strerror(RTE_MAX_ERRNO + 1);
+#ifndef RTE_EXEC_ENV_WINDOWS
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, RTE_MAX_ERRNO + 1);
+#endif
printf("rte_strerror: '%s', strerror: '%s'\n",
rte_retval, libc_retval);
if ((strcmp(rte_retval, libc_retval) != 0) ||
diff --git a/lib/eal/common/eal_common_errno.c b/lib/eal/common/eal_common_errno.c
index f86802705a..4c4abb802e 100644
--- a/lib/eal/common/eal_common_errno.c
+++ b/lib/eal/common/eal_common_errno.c
@@ -37,7 +37,11 @@ rte_strerror(int errnum)
/* since some implementations of strerror_r throw an error
* themselves if errnum is too big, we handle that case here */
if (errnum >= RTE_MAX_ERRNO)
+#ifdef RTE_EXEC_ENV_WINDOWS
+ snprintf(ret, RETVAL_SZ, "Unknown error%s", sep);
+#else
snprintf(ret, RETVAL_SZ, "Unknown error%s %d", sep, errnum);
+#endif
else
switch (errnum){
case E_RTE_SECONDARY:
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v11 7/9] app/test: remove two alarm_autotest cases
2021-12-03 0:06 ` [PATCH v11 0/9] app/test: enable subset of " Jie Zhou
` (5 preceding siblings ...)
2021-12-03 0:06 ` [PATCH v11 6/9] app/test: differentiate a strerror on different OS Jie Zhou
@ 2021-12-03 0:06 ` Jie Zhou
2021-12-04 1:06 ` Dmitry Kozlyuk
2021-12-03 0:06 ` [PATCH v11 8/9] app/test: replace .sh script with .py script Jie Zhou
` (3 subsequent siblings)
10 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-12-03 0:06 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
Remove two alarm_autotest test cases which do bogus range check
on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_alarm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_alarm.c b/app/test/test_alarm.c
index b4034339b8..70e97a3109 100644
--- a/app/test/test_alarm.c
+++ b/app/test/test_alarm.c
@@ -10,6 +10,7 @@
#include "test.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
static volatile int flag;
static void
@@ -18,6 +19,7 @@ test_alarm_callback(void *cb_arg)
flag = 1;
printf("Callback setting flag - OK. [cb_arg = %p]\n", cb_arg);
}
+#endif
static int
test_alarm(void)
@@ -27,6 +29,7 @@ test_alarm(void)
return 0;
#endif
+#ifndef RTE_EXEC_ENV_WINDOWS
/* check if it will fail to set alarm with wrong us value */
printf("check if it will fail to set alarm with wrong ms values\n");
if (rte_eal_alarm_set(0, test_alarm_callback,
@@ -39,6 +42,7 @@ test_alarm(void)
printf("should not be successful with (UINT64_MAX-1) us value\n");
return -1;
}
+#endif
/* check if it will fail to set alarm with null callback parameter */
printf("check if it will fail to set alarm with null callback parameter\n");
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v11 8/9] app/test: replace .sh script with .py script
2021-12-03 0:06 ` [PATCH v11 0/9] app/test: enable subset of " Jie Zhou
` (6 preceding siblings ...)
2021-12-03 0:06 ` [PATCH v11 7/9] app/test: remove two alarm_autotest cases Jie Zhou
@ 2021-12-03 0:06 ` Jie Zhou
2021-12-04 1:06 ` Dmitry Kozlyuk
2021-12-03 0:06 ` [PATCH v11 9/9] app/test: enable subset of unit tests on Windows Jie Zhou
` (2 subsequent siblings)
10 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-12-03 0:06 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- Add python script to check if system supports hugepages
- Remove corresponding .sh script
- Replace calling of .sh with corresponding .py in meson.build
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/has-hugepage.sh | 11 -----------
app/test/has_hugepage.py | 26 ++++++++++++++++++++++++++
app/test/meson.build | 2 +-
3 files changed, 27 insertions(+), 12 deletions(-)
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh
deleted file mode 100755
index d600fad319..0000000000
--- a/app/test/has-hugepage.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright 2020 Mellanox Technologies, Ltd
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /proc/sys/vm/nr_hugepages || echo 0
-elif [ "$(uname)" = "FreeBSD" ] ; then
- echo 1 # assume FreeBSD always has hugepages
-else
- echo 0
-fi
diff --git a/app/test/has_hugepage.py b/app/test/has_hugepage.py
new file mode 100644
index 0000000000..f8e7087d1c
--- /dev/null
+++ b/app/test/has_hugepage.py
@@ -0,0 +1,26 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2021 Microsoft Corporation
+"""This script checks if the system supports huge pages"""
+
+import platform
+import ctypes
+
+os_name = platform.system()
+if os_name == "Linux":
+ try:
+ with open("/proc/sys/vm/nr_hugepages") as file_o:
+ content = file_o.read()
+ print(content)
+ except:
+ print("0")
+
+elif os_name == "FreeBSD":
+ # Assume FreeBSD always has hugepages enabled
+ print("1")
+elif os_name == "Windows":
+ if ctypes.windll.kernel32.GetLargePageMinimum() > 0:
+ print("1")
+ else:
+ print("0")
+else:
+ print("0")
diff --git a/app/test/meson.build b/app/test/meson.build
index 2b480adfba..97ee83029e 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -492,7 +492,7 @@ dpdk_test = executable('dpdk-test',
driver_install_path),
install: true)
-has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
+has_hugepage = run_command(py3, 'has_hugepage.py').stdout().strip() != '0'
message('hugepage availability: @0@'.format(has_hugepage))
# some perf tests (eg: memcpy perf autotest)take very long
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v11 9/9] app/test: enable subset of unit tests on Windows
2021-12-03 0:06 ` [PATCH v11 0/9] app/test: enable subset of " Jie Zhou
` (7 preceding siblings ...)
2021-12-03 0:06 ` [PATCH v11 8/9] app/test: replace .sh script with .py script Jie Zhou
@ 2021-12-03 0:06 ` Jie Zhou
2021-12-04 0:07 ` [PATCH v11 0/9] app/test: enable subset of " Kadam, Pallavi
2021-12-07 21:24 ` [PATCH v12 00/11] " Jie Zhou
10 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-03 0:06 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
- For fast tests and perf tests, add test stubs to skip not supported
ones.
- For driver tests, for now skip on Windows totally to avoid
unnecessary amount of test stubs. For example, there are about 30
cryptodev related tests (even though in the meson for CI it only
listed about half) which will be enabled by "patch-18949: app/test:
enable crypto unit tests on Windows".
- For dump tests, currently the tests hang on Windows which require
further investigation. Keep the dump test list just for non-Windows
for easier tracking.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/meson.build | 114 ++++++++++++-----------
app/test/test_acl.c | 12 +++
app/test/test_bpf.c | 15 ++-
app/test/test_cksum.c | 12 +++
app/test/test_cmdline_ipaddr.c | 5 +
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_dmadev.c | 14 ++-
app/test/test_dmadev_api.c | 4 +
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 | 12 +++
app/test/test_graph.c | 18 +++-
app/test/test_graph_perf.c | 16 +++-
app/test/test_hash_perf.c | 12 +++
app/test/test_ipfrag.c | 16 +++-
app/test/test_ipsec.c | 15 ++-
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 | 12 +++
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 | 17 +++-
app/test/test_mbuf.c | 13 ++-
app/test/test_member.c | 16 +++-
app/test/test_member_perf.c | 16 +++-
app/test/test_memcpy_perf.c | 18 +++-
app/test/test_mempool_perf.c | 12 +++
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 | 12 +++
app/test/test_reciprocal_division.c | 12 +++
app/test/test_reciprocal_division_perf.c | 12 +++
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 | 16 +++-
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 ++++++-
71 files changed, 1035 insertions(+), 126 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index 97ee83029e..0c927403c8 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,12 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if is_windows
- build = false
- reason = 'not supported on Windows'
- subdir_done()
-endif
-
if not get_option('tests')
subdir_done()
endif
@@ -158,34 +152,14 @@ test_sources = files(
)
test_deps = [
- 'acl',
'bus_pci',
'bus_vdev',
- 'bpf',
'cfgfile',
'cmdline',
- 'cryptodev',
- 'distributor',
- 'dmadev',
- 'efd',
'ethdev',
- 'eventdev',
- 'fib',
- 'flow_classify',
- 'graph',
'hash',
- 'ipsec',
- 'lpm',
- 'member',
- 'node',
- 'pipeline',
- 'port',
- 'rawdev',
'rcu',
- 'reorder',
- 'rib',
'ring',
- 'security',
'stack',
'telemetry',
'timer',
@@ -334,39 +308,69 @@ perf_test_names = [
]
driver_test_names = [
- 'cryptodev_aesni_mb_autotest',
- 'cryptodev_aesni_gcm_autotest',
- 'cryptodev_cn9k_autotest',
- 'cryptodev_cn10k_autotest',
- 'cryptodev_dpaa_sec_autotest',
- 'cryptodev_dpaa2_sec_autotest',
- 'cryptodev_null_autotest',
- 'cryptodev_octeontx2_autotest',
- 'cryptodev_openssl_autotest',
- 'cryptodev_openssl_asym_autotest',
- 'cryptodev_qat_autotest',
- 'cryptodev_sw_armv8_autotest',
- 'cryptodev_sw_kasumi_autotest',
- 'cryptodev_sw_mvsam_autotest',
- 'cryptodev_sw_snow3g_autotest',
- 'cryptodev_sw_zuc_autotest',
- 'dmadev_autotest',
- 'eventdev_selftest_octeontx',
- 'eventdev_selftest_sw',
- 'rawdev_autotest',
]
dump_test_names = [
- 'dump_struct_sizes',
- 'dump_mempool',
- 'dump_malloc_stats',
- 'dump_devargs',
- 'dump_log_types',
- 'dump_ring',
- 'dump_physmem',
- 'dump_memzone',
]
+if not is_windows
+ test_deps += [
+ 'acl',
+ 'bpf',
+ 'cryptodev',
+ 'distributor',
+ 'dmadev',
+ 'efd',
+ 'eventdev',
+ 'fib',
+ 'flow_classify',
+ 'graph',
+ 'ipsec',
+ 'lpm',
+ 'member',
+ 'node',
+ 'pipeline',
+ 'port',
+ 'rawdev',
+ 'reorder',
+ 'rib',
+ 'security',
+ ]
+
+ driver_test_names += [
+ 'cryptodev_aesni_mb_autotest',
+ 'cryptodev_aesni_gcm_autotest',
+ 'cryptodev_cn9k_autotest',
+ 'cryptodev_cn10k_autotest',
+ 'cryptodev_dpaa_sec_autotest',
+ 'cryptodev_dpaa2_sec_autotest',
+ 'cryptodev_null_autotest',
+ 'cryptodev_octeontx2_autotest',
+ 'cryptodev_openssl_autotest',
+ 'cryptodev_openssl_asym_autotest',
+ 'cryptodev_qat_autotest',
+ 'cryptodev_sw_armv8_autotest',
+ 'cryptodev_sw_kasumi_autotest',
+ 'cryptodev_sw_mvsam_autotest',
+ 'cryptodev_sw_snow3g_autotest',
+ 'cryptodev_sw_zuc_autotest',
+ 'eventdev_selftest_octeontx',
+ 'eventdev_selftest_sw',
+ 'rawdev_autotest',
+ ]
+
+ dump_test_names += [
+ 'dump_struct_sizes',
+ 'dump_mempool',
+ 'dump_malloc_stats',
+ 'dump_devargs',
+ 'dump_log_types',
+ 'dump_ring',
+ 'dump_physmem',
+ 'dump_memzone',
+ ]
+endif
+
# The following linkages are an exception to allow running the
# unit tests without requiring that the developer install the
# DPDK libraries. Explicit linkage of drivers (plugin libraries)
@@ -385,7 +389,7 @@ if dpdk_conf.has('RTE_LIB_METRICS')
test_sources += ['test_metrics.c']
fast_tests += [['metrics_autotest', true]]
endif
-if dpdk_conf.has('RTE_LIB_TELEMETRY')
+if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
endif
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 <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 /*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 46bcb51f86..055df252ba 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -14,11 +14,22 @@
#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 +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_cksum.c b/app/test/test_cksum.c
index cd983d7c01..3c5bfc8671 100644
--- a/app/test/test_cksum.c
+++ b/app/test/test_cksum.c
@@ -13,6 +13,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_cksum(void)
+{
+ printf("cksum not supported, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MEMPOOL_CACHE_SIZE 0
#define MBUF_DATA_SIZE 256
#define NB_MBUF 128
@@ -268,4 +278,6 @@ test_cksum(void)
}
#undef GOTO_FAIL
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(cksum_autotest, test_cksum);
diff --git a/app/test/test_cmdline_ipaddr.c b/app/test/test_cmdline_ipaddr.c
index 2a1ee120fc..ff039a304f 100644
--- a/app/test/test_cmdline_ipaddr.c
+++ b/app/test/test_cmdline_ipaddr.c
@@ -2,9 +2,12 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
+
#include <netinet/in.h>
#include <sys/socket.h>
@@ -669,3 +672,5 @@ test_parse_ipaddr_invalid_param(void)
}
return 0;
}
+
+#endif /*ifndef RTE_EXEC_ENV_WINDOWS*/
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 10b48cdadb..f83c844e42 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 <time.h>
#include <rte_common.h>
@@ -15739,3 +15741,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 9d19a6d6d9..680ced4dbe 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 <rte_bus_vdev.h>
#include <rte_common.h>
#include <rte_hexdump.h>
@@ -2429,3 +2431,5 @@ REGISTER_TEST_COMMAND(cryptodev_octeontx2_asym_autotest,
test_cryptodev_octeontx2_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 <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 /*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 <rte_common.h>
#include <rte_cryptodev.h>
#include <rte_esp.h>
@@ -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 <time.h>
#include <rte_common.h>
@@ -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 <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 /*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 <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 @@ 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 <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 /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(distributor_perf_autotest, test_distributor_perf);
diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c
index b206db27ae..c2ea9090cf 100644
--- a/app/test/test_dmadev.c
+++ b/app/test/test_dmadev.c
@@ -2,6 +2,17 @@
* Copyright(c) 2021 HiSilicon Limited
* Copyright(c) 2021 Intel Corporation
*/
+#include "test.h"
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_dma(void)
+{
+ printf("dma not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
#include <inttypes.h>
@@ -13,7 +24,6 @@
#include <rte_bus_vdev.h>
#include <rte_dmadev_pmd.h>
-#include "test.h"
#include "test_dmadev_api.h"
#define ERR_RETURN(...) do { print_err(__func__, __LINE__, __VA_ARGS__); return -1; } while (0)
@@ -864,4 +874,6 @@ test_dma(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(dmadev_autotest, test_dma);
diff --git a/app/test/test_dmadev_api.c b/app/test/test_dmadev_api.c
index 4a181af90a..7b38f66dc0 100644
--- a/app/test/test_dmadev_api.c
+++ b/app/test/test_dmadev_api.c
@@ -2,6 +2,8 @@
* Copyright(c) 2021 HiSilicon Limited
*/
+#ifndef RTE_EXEC_ENV_WINDOWS
+
#include <string.h>
#include <rte_cycles.h>
@@ -572,3 +574,5 @@ test_dma_api(uint16_t dev_id)
return 0;
};
+
+#endif /*ifndef RTE_EXEC_ENV_WINDOWS*/
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 <string.h>
#include <stdarg.h>
+
+#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 <libgen.h>
#include <stdlib.h>
#include <errno.h>
@@ -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 <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 /*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 <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 /*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..8f5fd78723 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 <string.h>
#include <rte_common.h>
#include <rte_mempool.h>
#include <rte_mbuf.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_cryptodev.h>
#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 /*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 <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 /*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 <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 /*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 <math.h>
@@ -10,6 +11,17 @@
#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 +33,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 +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 843d9766b0..fee2ecaa22 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 <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
@@ -1048,7 +1058,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);
@@ -1058,3 +1072,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 <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 +33,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 +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 <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 /*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 <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 /*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 <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);
diff --git a/app/test/test_fib_perf.c b/app/test/test_fib_perf.c
index 86b2f832b8..ec7f20e102 100644
--- a/app/test/test_fib_perf.c
+++ b/app/test/test_fib_perf.c
@@ -12,11 +12,22 @@
#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 /*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 <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 /*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..2924308dda 100644
--- a/app/test/test_func_reentrancy.c
+++ b/app/test/test_func_reentrancy.c
@@ -40,6 +40,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_func_reentrancy(void)
+{
+ printf("reentrancy not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
typedef int (*case_func_t)(void* arg);
typedef void (*case_clean_t)(unsigned lcore_id);
@@ -511,4 +521,6 @@ test_func_reentrancy(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(func_reentrancy_autotest, test_func_reentrancy);
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 <assert.h>
#include <inttypes.h>
#include <signal.h>
@@ -9,14 +11,23 @@
#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 +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 <inttypes.h>
#include <signal.h>
#include <stdio.h>
@@ -9,14 +11,22 @@
#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 +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 76cdac5d53..4229f85aa7 100644
--- a/app/test/test_hash_perf.c
+++ b/app/test/test_hash_perf.c
@@ -17,6 +17,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_hash_perf(void)
+{
+ printf("hash_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ENTRIES (1 << 19)
#define KEYS_TO_ADD (MAX_ENTRIES)
#define ADD_PERCENT 0.75 /* 75% table utilization */
@@ -749,4 +759,6 @@ test_hash_perf(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(hash_perf_autotest, test_hash_perf);
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 <time.h>
@@ -8,13 +9,22 @@
#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 +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..ed4d166f0d 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 <time.h>
@@ -13,15 +14,25 @@
#include <rte_bus_vdev.h>
#include <rte_ip.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_crypto.h>
#include <rte_cryptodev.h>
#include <rte_lcore.h>
+
#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 /*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 <stdio.h>
#include <rte_ip.h>
@@ -8,10 +9,20 @@
#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 +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 <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 +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 40ab0d5c4c..8f4e92f6ca 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 <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>
diff --git a/app/test/test_lcores.c b/app/test/test_lcores.c
index 35c47d5372..2277ae597f 100644
--- a/app/test/test_lcores.c
+++ b/app/test/test_lcores.c
@@ -11,6 +11,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_lcores(void)
+{
+ printf("lcore not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
struct thread_context {
enum { INIT, ERROR, DONE } state;
bool lcore_id_any;
@@ -411,4 +421,6 @@ test_lcores(void)
return TEST_SUCCESS;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(lcores_autotest, test_lcores);
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 <stdio.h>
#include <stdint.h>
@@ -10,7 +21,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 +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 <stdio.h>
#include <stdint.h>
@@ -8,9 +9,18 @@
#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 +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 <stdio.h>
#include <stdint.h>
@@ -12,7 +23,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 +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 <stdio.h>
#include <stdint.h>
#include <stdlib.h>
@@ -15,7 +25,6 @@
#include <rte_ip.h>
#include <rte_lpm.h>
-#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..c5224bdafe 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 <stdio.h>
#include <stdint.h>
@@ -8,6 +9,17 @@
#include <stdarg.h>
#include <errno.h>
#include <stdlib.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_malloc(void)
+{
+ printf("malloc not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <sys/mman.h>
#include <sys/queue.h>
#include <unistd.h>
@@ -23,11 +35,8 @@
#include <rte_random.h>
#include <rte_string_fns.h>
-#include "test.h"
-
#define N 10000
-
static int
is_mem_on_socket(int32_t socket);
@@ -1080,4 +1089,6 @@ test_malloc(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(malloc_autotest, test_malloc);
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index f54d1d7c00..1bc19bc71c 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 <string.h>
#include <stdarg.h>
@@ -33,7 +34,15 @@
#include <rte_tcp.h>
#include <rte_mbuf_dyn.h>
-#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_mbuf(void)
+{
+ printf("mbuf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
#define MEMPOOL_CACHE_SIZE 32
#define MBUF_DATA_SIZE 2048
@@ -2981,4 +2990,6 @@ test_mbuf(void)
}
#undef GOTO_FAIL
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(mbuf_autotest, test_mbuf);
diff --git a/app/test/test_member.c b/app/test/test_member.c
index 40aa4c8627..85f3a126b9 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 <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 +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 <stdio.h>
#include <inttypes.h>
@@ -11,9 +12,18 @@
#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 +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 c711e36ba7..e9388fa7c4 100644
--- a/app/test/test_memcpy_perf.c
+++ b/app/test/test_memcpy_perf.c
@@ -2,21 +2,31 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#include "test.h"
+
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_memcpy_perf(void)
+{
+ printf("memcpy_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <sys/time.h>
#include <rte_common.h>
#include <rte_cycles.h>
#include <rte_random.h>
#include <rte_malloc.h>
-
#include <rte_memcpy.h>
-#include "test.h"
-
/*
* Set this to the maximum buffer size you want to test. If it is 0, then the
* values in the buf_sizes[] array below will be used.
@@ -347,4 +357,6 @@ test_memcpy_perf(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(memcpy_perf_autotest, test_memcpy_perf);
diff --git a/app/test/test_mempool_perf.c b/app/test/test_mempool_perf.c
index 87ad251367..60058ab9ab 100644
--- a/app/test/test_mempool_perf.c
+++ b/app/test/test_mempool_perf.c
@@ -28,6 +28,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_mempool_perf(void)
+{
+ printf("mempool_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
/*
* Mempool performance
* =======
@@ -393,4 +403,6 @@ test_mempool_perf(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(mempool_perf_autotest, test_mempool_perf);
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 <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 /*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 <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -12,8 +38,6 @@
#include <time.h>
#include <math.h>
-#include "test.h"
-
#include <rte_pie.h>
#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 <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 /*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..9209fb2658 100644
--- a/app/test/test_rcu_qsbr_perf.c
+++ b/app/test/test_rcu_qsbr_perf.c
@@ -15,6 +15,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_rcu_qsbr_main(void)
+{
+ printf("rcu_qsbr_main not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
/* Check condition and return an error if true. */
static uint16_t enabled_core_ids[RTE_MAX_LCORE];
static unsigned int num_cores;
@@ -687,4 +697,6 @@ test_rcu_qsbr_main(void)
return -1;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
diff --git a/app/test/test_reciprocal_division.c b/app/test/test_reciprocal_division.c
index 8ea9b1d24d..8777211cd7 100644
--- a/app/test/test_reciprocal_division.c
+++ b/app/test/test_reciprocal_division.c
@@ -13,6 +13,16 @@
#include <rte_random.h>
#include <rte_reciprocal.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_reciprocal(void)
+{
+ printf("reciprocal not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ITERATIONS (1ULL << 32)
#define DIVIDE_ITER (100)
@@ -164,4 +174,6 @@ test_reciprocal(void)
return result;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(reciprocal_division, test_reciprocal);
diff --git a/app/test/test_reciprocal_division_perf.c b/app/test/test_reciprocal_division_perf.c
index 4f625873e5..66b004fa1b 100644
--- a/app/test/test_reciprocal_division_perf.c
+++ b/app/test/test_reciprocal_division_perf.c
@@ -13,6 +13,16 @@
#include <rte_random.h>
#include <rte_reciprocal.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_reciprocal_division_perf(void)
+{
+ printf("reciprocal_division_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ITERATIONS (1ULL << 32)
#define DIVIDE_ITER (1ULL << 28)
@@ -205,4 +215,6 @@ test_reciprocal_division_perf(void)
return result;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(reciprocal_division_perf, test_reciprocal_division_perf);
diff --git a/app/test/test_red.c b/app/test/test_red.c
index 05936cfee8..524f9c9b6d 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 <stdlib.h>
#include <stdio.h>
@@ -8,12 +9,34 @@
#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 +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 <stdio.h>
#include <unistd.h>
@@ -9,12 +10,20 @@
#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 +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 <medvedkinv@gmail.com>
* 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 +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 <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,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 <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 +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 060cf1ffa8..c31273941c 100644
--- a/app/test/test_security.c
+++ b/app/test/test_security.c
@@ -1,12 +1,24 @@
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
*/
+#include "test.h"
#include <rte_errno.h>
#include <rte_log.h>
#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_ether.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_security(void)
+{
+ printf("security not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <rte_security.h>
#include <rte_security_driver.h>
@@ -20,7 +32,7 @@
#endif
#include <rte_test.h>
-#include "test.h"
+
/**
* Security
@@ -2639,4 +2651,6 @@ test_security(void)
return unit_test_suite_runner(&security_testsuite);
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(security_autotest, test_security);
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 <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 +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 <rte_ip.h>
#include <rte_string_fns.h>
#include <rte_hexdump.h>
@@ -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 <string.h>
#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 aabf4375db..45dc7682d8 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 <string.h>
#include <rte_pipeline.h>
#include <rte_log.h>
@@ -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 <string.h>
#include <rte_byteorder.h>
#include <rte_table_lpm_ipv6.h>
@@ -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 <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 +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.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v11 0/9] app/test: enable subset of tests on Windows
2021-12-03 0:06 ` [PATCH v11 0/9] app/test: enable subset of " Jie Zhou
` (8 preceding siblings ...)
2021-12-03 0:06 ` [PATCH v11 9/9] app/test: enable subset of unit tests on Windows Jie Zhou
@ 2021-12-04 0:07 ` Kadam, Pallavi
2021-12-07 21:24 ` [PATCH v12 00/11] " Jie Zhou
10 siblings, 0 replies; 245+ messages in thread
From: Kadam, Pallavi @ 2021-12-04 0:07 UTC (permalink / raw)
To: Jie Zhou, dev
Cc: dmitry.kozliuk, roretzla, navasile, dmitrym, talshn, thomas, aconole
On 12/2/2021 4:06 PM, Jie Zhou wrote:
> This patchset is to enable a subset of unit tests on windows. It mainly includes:
> - Replace POSIX specific codes
> - Add test stubs for not supported ones on Windows
> - Fix some lib and tests per failures investigation
> - Replace .sh script with .py script for meson.build
> - Enable build and run subset of unit tests on Windows
>
> Future work:
> - Work with CI/CD lab to onboard unit tests on Windows to catch regression
> - Enable more tests
>
> ---
> V2 changes:
> - Fix compilation error on FreeBSD
> - Fix email mismatch issue
> - Add a missing space around "*"
>
> ---
> V3 changes:
> - Fix a misc c coding style issue
> - Revise some commit title and message body
> - Fix violations of PEP8 in new added Python scripts
> - Add error handling in get_coremask.py
> - Fix has_hugepage.py to check system support of hugepages
> instead of checking privileges
> - Fix test meson.build to run Python scripts using py3
> - Consolidate lists of source files, test dep, etc. across all
> platforms, with conditional extending on some platform(s)
>
> ---
> V4 changes:
> - Remove building of ip_frag, rib, and reorder libraries on Windows.
> These three libs usually can be built on Windows without change.
> However, in between the time of V3 and V4, there is regression in
> upstream caused build failures of these three libs. Will separately
> investigate and enable these libraries.
>
> - Remove previous patch#2 (Enable mempool/stack on Windows) from this
> patchset as it was separated out and merged as patch-19314.
>
> - Consolidate the source files, deps, tests lists across platforms as
> much as possible.
>
> ---
> V5 changes:
> - Remove a space between function name and open parenthesis '('
> - Add back a header mistakenly deleted
>
> ---
> V6 changes:
> - Fix inconsistent static vs. non-static declarations
>
> ---
> V7 changes:
> - Remove get_coremask.py as it is not needed any more in meson.build
> - Remove enablement of efd and lpm and their corresponding unit tests.
> The enablement of these two libs and their UTs will be in separate
> patches after this patch set.
>
> V8 changes:
> - Fix coding style issue of using C99 // comments
>
> ---
> V9 changes:
> - Fix has_hugepage.py with adding failure handling on Linux, using
> proper variable name to follow Python convention, and removing
> unnecessary comment.
> - Enable previously skipped test_cmdline_socket_fns test cases
> - Revise title and message, and add Fixes info for current Patch#3
> - Combine 2 patches (previous #2 and #3 in V8) into one and with
> more detailed message
>
> ---
> V10 changes:
> - Fix indentation
>
> ---
> V11 changes:
> - Remove mandatory dependency on bitratestats, latencystats,
> and metrics libs in test meson.build, which was reintroduced
> at rebase in V9.
>
>
> Jie Zhou (9):
> eal/windows: return ENOTSUP for not supported API
> app/test: remove POSIX-specific code
> app/test: fix incorrect errno variable
> app/test: skip interrupt tests on Windows
> app/test: skip two logs_autotest cases on Windows
> app/test: differentiate a strerror on different OS
> app/test: remove two alarm_autotest cases
> app/test: replace .sh script with .py script
> app/test: enable subset of unit tests on Windows
>
> app/test/commands.c | 2 -
> app/test/has-hugepage.sh | 11 ---
> app/test/has_hugepage.py | 26 +++++
> app/test/meson.build | 118 ++++++++++++-----------
> app/test/packet_burst_generator.c | 1 +
> app/test/process.h | 4 +-
> app/test/test.c | 5 +-
> app/test/test_acl.c | 12 +++
> app/test/test_alarm.c | 4 +
> app/test/test_bpf.c | 15 ++-
> app/test/test_byteorder.c | 2 +-
> app/test/test_cksum.c | 12 +++
> app/test/test_cmdline.c | 2 +
> app/test/test_cmdline_ipaddr.c | 5 +
> app/test/test_cmdline_lib.c | 13 ++-
> app/test/test_crc.c | 1 -
> 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_dmadev.c | 14 ++-
> app/test/test_dmadev_api.c | 4 +
> 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_errno.c | 12 ++-
> 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 | 12 +++
> app/test/test_graph.c | 18 +++-
> app/test/test_graph_perf.c | 16 ++-
> app/test/test_hash_perf.c | 12 +++
> app/test/test_interrupts.c | 10 ++
> app/test/test_ipfrag.c | 16 ++-
> app/test/test_ipsec.c | 15 ++-
> 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 | 12 +++
> app/test/test_logs.c | 6 +-
> 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 | 17 +++-
> app/test/test_mbuf.c | 13 ++-
> app/test/test_member.c | 16 ++-
> app/test/test_member_perf.c | 16 ++-
> app/test/test_memcpy_perf.c | 18 +++-
> app/test/test_memory.c | 2 +-
> app/test/test_mempool_perf.c | 12 +++
> app/test/test_mp_secondary.c | 12 +++
> app/test/test_pie.c | 30 +++++-
> app/test/test_pmd_perf.c | 6 +-
> app/test/test_rawdev.c | 17 +++-
> app/test/test_rcu_qsbr_perf.c | 12 +++
> app/test/test_reciprocal_division.c | 12 +++
> app/test/test_reciprocal_division_perf.c | 12 +++
> 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_ring_stress_impl.h | 2 +-
> app/test/test_sched.c | 14 ++-
> app/test/test_security.c | 16 ++-
> 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_telemetry_data.c | 2 +
> app/test/test_timer_secondary.c | 13 +++
> app/test/test_trace.c | 32 +++++-
> lib/eal/common/eal_common_errno.c | 4 +
> lib/eal/windows/eal_memalloc.c | 6 +-
> 91 files changed, 1130 insertions(+), 156 deletions(-)
> delete mode 100755 app/test/has-hugepage.sh
> create mode 100644 app/test/has_hugepage.py
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
>
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v10 2/9] app/test: remove POSIX-specific code
2021-12-01 18:43 ` [PATCH v10 2/9] app/test: remove POSIX-specific code Jie Zhou
@ 2021-12-04 1:05 ` Dmitry Kozlyuk
0 siblings, 0 replies; 245+ messages in thread
From: Dmitry Kozlyuk @ 2021-12-04 1:05 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
2021-12-01 10:43 (UTC-0800), Jie Zhou:
> - Remove header inclusion of netinet/in.h and terminos.h
Typo: "termios.h".
> - Include rte_os_shim.h
> - Replace sleep and usleep with rte_delay_us_sleep
Instead of all the above I'd say:
"Replace POSIX-specific code with DPDK equivalents
or conditionally disable it on Windows."
> - Use NUL on Windows as /dev/null for Linux
"Linux" -> "Unix"
> - Exclude tests not supported on Windows yet, e.g. multi-process, and
> IP address parsing (the test cases use linux netinet/in.h u6_addr
> and better have a sperate patch to add such tests on Windows)
Instead of "e.g." a complete list of missing tests is preferable:
* multi-process
* PMD performance statistics display on signal
* command-line IP address parsing
TBH, I don't understand the issue with test_cmdline_ipaddr---
it could be fixed with just a few lines:
#define IP4(a,b,c,d) {.s_addr = ... }
#ifdef RTE_EXEC_ENV_WINDOWS
#define s6_addr16 u.Word
#else
#define s6_addr16 __u6_addr.__u6_addr16
#endif
Why it should be a separate patch?
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v11 3/9] app/test: fix incorrect errno variable
2021-12-03 0:06 ` [PATCH v11 3/9] app/test: fix incorrect errno variable Jie Zhou
@ 2021-12-04 1:05 ` Dmitry Kozlyuk
0 siblings, 0 replies; 245+ messages in thread
From: Dmitry Kozlyuk @ 2021-12-04 1:05 UTC (permalink / raw)
To: Jie Zhou, talshn
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, thomas, aconole
2021-12-02 16:06 (UTC-0800), Jie Zhou:
> Fix incorrect errno variable used in memory autotest.
> Use rte_errno instead.
>
> Fixes: 086d426406bd ("app/test: fix memory autotests on FreeBSD")
> Cc: bruce.richardson@intel.com
>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> ---
> app/test/test_memory.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/app/test/test_memory.c b/app/test/test_memory.c
> index dbf6871e71..140ac3f3cf 100644
> --- a/app/test/test_memory.c
> +++ b/app/test/test_memory.c
> @@ -63,7 +63,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
> /* we're able to get memseg fd - try getting its offset */
> ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
> if (ret < 0) {
> - if (errno == ENOTSUP)
> + if (rte_errno == ENOTSUP)
> return 1;
> return -1;
> }
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v11 4/9] app/test: skip interrupt tests on Windows
2021-12-03 0:06 ` [PATCH v11 4/9] app/test: skip interrupt tests on Windows Jie Zhou
@ 2021-12-04 1:06 ` Dmitry Kozlyuk
0 siblings, 0 replies; 245+ messages in thread
From: Dmitry Kozlyuk @ 2021-12-04 1:06 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
2021-12-02 16:06 (UTC-0800), Jie Zhou:
> Even though test_interrupts.c can compile on Windows, skip interrupt
> tests for now since majority of eal_interrupt on Windows are stubs.
> Will remove the skip after interrupt being fully enabled on Windows.
>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v11 8/9] app/test: replace .sh script with .py script
2021-12-03 0:06 ` [PATCH v11 8/9] app/test: replace .sh script with .py script Jie Zhou
@ 2021-12-04 1:06 ` Dmitry Kozlyuk
0 siblings, 0 replies; 245+ messages in thread
From: Dmitry Kozlyuk @ 2021-12-04 1:06 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
2021-12-02 16:06 (UTC-0800), Jie Zhou:
> - Add python script to check if system supports hugepages
> - Remove corresponding .sh script
> - Replace calling of .sh with corresponding .py in meson.build
>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v11 7/9] app/test: remove two alarm_autotest cases
2021-12-03 0:06 ` [PATCH v11 7/9] app/test: remove two alarm_autotest cases Jie Zhou
@ 2021-12-04 1:06 ` Dmitry Kozlyuk
0 siblings, 0 replies; 245+ messages in thread
From: Dmitry Kozlyuk @ 2021-12-04 1:06 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
2021-12-02 16:06 (UTC-0800), Jie Zhou:
> Remove two alarm_autotest test cases which do bogus range check
> on Windows.
>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Overflow check in rte_eal_alarm_set() for all systems
should be revised and corrected if need be.
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v11 5/9] app/test: skip two logs_autotest cases on Windows
2021-12-03 0:06 ` [PATCH v11 5/9] app/test: skip two logs_autotest cases " Jie Zhou
@ 2021-12-04 1:16 ` Dmitry Kozlyuk
0 siblings, 0 replies; 245+ messages in thread
From: Dmitry Kozlyuk @ 2021-12-04 1:16 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
2021-12-02 16:06 (UTC-0800), Jie Zhou:
> DPDK logs_autotest on Windows failed at "dynamic log types" tests.
> The failures are on 2 test cases for rte_log_set_level_regexp API,
> due to regular expression is not supported on Windows in DPDK yet
> and regcomp/regexec are just stubs on Windows (in regex.h).
>
> In app\test\test_logs.c, ifndef these two test cases, and for the
> rte_log_set_level_pattern validation case following these two cases,
> differentiate the expected log level passed into macro CHECK_LEVELS
>
> Now logs_autotest completes for all dynamic log types and static log types.
>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v11 6/9] app/test: differentiate a strerror on different OS
2021-12-03 0:06 ` [PATCH v11 6/9] app/test: differentiate a strerror on different OS Jie Zhou
@ 2021-12-04 1:33 ` Dmitry Kozlyuk
2021-12-06 17:25 ` Jie Zhou
0 siblings, 1 reply; 245+ messages in thread
From: Dmitry Kozlyuk @ 2021-12-04 1:33 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
2021-12-02 16:06 (UTC-0800), Jie Zhou:
> On Windows, strerror returns just "Unknown error" for errnum greater
> than MAX_ERRNO, while linux and freebsd returns "Unknown error <num>",
> which is the current expectation for errno_autotest. Differentiate
> the error string on Windows to remove a "duplicate error code" failure.
>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
>
> ---
> app/test/test_errno.c | 12 +++++++++++-
> lib/eal/common/eal_common_errno.c | 4 ++++
> 2 files changed, 15 insertions(+), 1 deletion(-)
[...]
> diff --git a/lib/eal/common/eal_common_errno.c b/lib/eal/common/eal_common_errno.c
> index f86802705a..4c4abb802e 100644
> --- a/lib/eal/common/eal_common_errno.c
> +++ b/lib/eal/common/eal_common_errno.c
> @@ -37,7 +37,11 @@ rte_strerror(int errnum)
> /* since some implementations of strerror_r throw an error
> * themselves if errnum is too big, we handle that case here */
> if (errnum >= RTE_MAX_ERRNO)
> +#ifdef RTE_EXEC_ENV_WINDOWS
> + snprintf(ret, RETVAL_SZ, "Unknown error%s", sep);
"sep" is not needed here, is it?
> +#else
> snprintf(ret, RETVAL_SZ, "Unknown error%s %d", sep, errnum);
> +#endif
> else
> switch (errnum){
> case E_RTE_SECONDARY:
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v11 6/9] app/test: differentiate a strerror on different OS
2021-12-04 1:33 ` Dmitry Kozlyuk
@ 2021-12-06 17:25 ` Jie Zhou
0 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-06 17:25 UTC (permalink / raw)
To: Dmitry Kozlyuk
Cc: dev, roretzla, navasile, dmitrym, pallavi.kadam, talshn, thomas, aconole
On Sat, Dec 04, 2021 at 04:33:37AM +0300, Dmitry Kozlyuk wrote:
> 2021-12-02 16:06 (UTC-0800), Jie Zhou:
> > On Windows, strerror returns just "Unknown error" for errnum greater
> > than MAX_ERRNO, while linux and freebsd returns "Unknown error <num>",
> > which is the current expectation for errno_autotest. Differentiate
> > the error string on Windows to remove a "duplicate error code" failure.
> >
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> >
> > ---
> > app/test/test_errno.c | 12 +++++++++++-
> > lib/eal/common/eal_common_errno.c | 4 ++++
> > 2 files changed, 15 insertions(+), 1 deletion(-)
> [...]
> > diff --git a/lib/eal/common/eal_common_errno.c b/lib/eal/common/eal_common_errno.c
> > index f86802705a..4c4abb802e 100644
> > --- a/lib/eal/common/eal_common_errno.c
> > +++ b/lib/eal/common/eal_common_errno.c
> > @@ -37,7 +37,11 @@ rte_strerror(int errnum)
> > /* since some implementations of strerror_r throw an error
> > * themselves if errnum is too big, we handle that case here */
> > if (errnum >= RTE_MAX_ERRNO)
> > +#ifdef RTE_EXEC_ENV_WINDOWS
> > + snprintf(ret, RETVAL_SZ, "Unknown error%s", sep);
>
> "sep" is not needed here, is it?
Yes, it is unnecessary. Removed. Thanks for spotting it.
>
> > +#else
> > snprintf(ret, RETVAL_SZ, "Unknown error%s %d", sep, errnum);
> > +#endif
> > else
> > switch (errnum){
> > case E_RTE_SECONDARY:
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v12 00/11] app/test: enable subset of tests on Windows
2021-12-03 0:06 ` [PATCH v11 0/9] app/test: enable subset of " Jie Zhou
` (9 preceding siblings ...)
2021-12-04 0:07 ` [PATCH v11 0/9] app/test: enable subset of " Kadam, Pallavi
@ 2021-12-07 21:24 ` Jie Zhou
2021-12-07 21:24 ` [PATCH v12 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
` (11 more replies)
10 siblings, 12 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-07 21:24 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
The goal of this patchset is to enable unit tests in CI for Windows.
It mainly contains:
- Replace POSIX specific codes
- Fix some lib and tests per failures investigation
- Add test stubs for not yet supported ones on Windows
- Replace .sh script with .py script for meson.build
- Enable build and run subset of unit tests on Windows
Future work:
- Work with CI lab to onboard unit tests for Windows to catch regression
- Investigate issues hit at CI onboarding
- Enable more tests
---
V2 changes:
- Fix compilation error on FreeBSD
- Fix email mismatch issue
- Add a missing space around "*"
---
V3 changes:
- Fix a misc c coding style issue
- Revise some commit title and message body
- Fix violations of PEP8 in new added Python scripts
- Add error handling in get_coremask.py
- Fix has_hugepage.py to check system support of hugepages
instead of checking privileges
- Fix test meson.build to run Python scripts using py3
- Consolidate lists of source files, test dep, etc. across all
platforms, with conditional extending on some platform(s)
---
V4 changes:
- Remove building of ip_frag, rib, and reorder libraries on Windows.
These three libs usually can be built on Windows without change.
However, in between the time of V3 and V4, there is regression in
upstream caused build failures of these three libs. Will separately
investigate and enable these libraries.
- Remove previous patch#2 (Enable mempool/stack on Windows) from this
patchset as it was separated out and merged as patch-19314.
- Consolidate the source files, deps, tests lists across platforms as
much as possible.
---
V5 changes:
- Remove a space between function name and open parenthesis '('
- Add back a header mistakenly deleted
---
V6 changes:
- Fix inconsistent static vs. non-static declarations
---
V7 changes:
- Remove get_coremask.py as it is not needed any more in meson.build
- Remove enablement of efd and lpm and their corresponding unit tests.
The enablement of these two libs and their UTs will be in separate
patches after this patch set.
V8 changes:
- Fix coding style issue of using C99 // comments
---
V9 changes:
- Fix has_hugepage.py with adding failure handling on Linux, using
proper variable name to follow Python convention, and removing
unnecessary comment.
- Enable previously skipped test_cmdline_socket_fns test cases
- Revise title and message, and add Fixes info for current Patch#3
- Combine 2 patches (previous #2 and #3 in V8) into one and with
more detailed message
---
V10 changes:
- Fix indentation
---
V11 changes:
- Remove mandatory dependency on bitratestats, latencystats,
and metrics libs in test meson.build, which was reintroduced
at rebase in V9.
V12 changes:
- Remove unnecessary print of a null string
- Enable several previous disabled tests
- Split Patch#9 in V11 into two patches for better structure
- Reorder some of the patches for better structure
- Document more details in commit message for issue tracking
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Jie Zhou (11):
eal/windows: return ENOTSUP for not supported API
app/test: remove POSIX-specific code
app/test: fix incorrect errno variable
app/test: skip interrupt tests on Windows
app/test: skip two logs_autotest cases on Windows
app/test: differentiate a strerror on different OS
app/test: remove two alarm_autotest cases
app/test: resolve name collision
app/test: add test stubs for not supported ones
app/test: replace .sh script with .py script
app/test: enable unit test on Windows
app/test/commands.c | 2 -
app/test/has-hugepage.sh | 11 ---
app/test/has_hugepage.py | 26 ++++++
app/test/meson.build | 113 ++++++++++++-----------
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +-
app/test/test.c | 5 +-
app/test/test_acl.c | 12 +++
app/test/test_alarm.c | 4 +
app/test/test_bpf.c | 15 ++-
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline_ipaddr.c | 19 ++--
app/test/test_cmdline_lib.c | 13 ++-
app/test/test_crc.c | 1 -
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_dmadev.c | 2 +-
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_errno.c | 12 ++-
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 | 12 +++
app/test/test_graph.c | 18 +++-
app/test/test_graph_perf.c | 16 +++-
app/test/test_hash_perf.c | 28 ++++--
app/test/test_interrupts.c | 10 ++
app/test/test_ipfrag.c | 16 +++-
app/test/test_ipsec.c | 15 ++-
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 | 12 +++
app/test/test_logs.c | 6 +-
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 | 33 ++++---
app/test/test_memory.c | 2 +-
app/test/test_mp_secondary.c | 12 +++
app/test/test_pie.c | 30 +++++-
app/test/test_pmd_perf.c | 6 +-
app/test/test_rawdev.c | 17 +++-
app/test/test_rcu_qsbr_perf.c | 12 +++
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_ring_stress_impl.h | 2 +-
app/test/test_sched.c | 14 ++-
app/test/test_security.c | 4 +-
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_telemetry_data.c | 2 +
app/test/test_timer_secondary.c | 13 +++
app/test/test_trace.c | 32 ++++++-
lib/eal/common/eal_common_errno.c | 4 +
lib/eal/windows/eal_memalloc.c | 6 +-
85 files changed, 1063 insertions(+), 190 deletions(-)
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v12 01/11] eal/windows: return ENOTSUP for not supported API
2021-12-07 21:24 ` [PATCH v12 00/11] " Jie Zhou
@ 2021-12-07 21:24 ` Jie Zhou
2021-12-07 21:24 ` [PATCH v12 02/11] app/test: remove POSIX-specific code Jie Zhou
` (10 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-07 21:24 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
UT memory_autotest on Windows has 2 failed cases on eal APIs
eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2
APIs are not supported on Windows yet. Should return ENOTSUP such that
in test_memory.c these 2 ENOTSUP cases will not be marked as failures,
same as other ENOTSUP cases.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
lib/eal/windows/eal_memalloc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/eal/windows/eal_memalloc.c b/lib/eal/windows/eal_memalloc.c
index 55d6dcc71c..aa7589b81d 100644
--- a/lib/eal/windows/eal_memalloc.c
+++ b/lib/eal/windows/eal_memalloc.c
@@ -17,7 +17,7 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
RTE_SET_USED(list_idx);
RTE_SET_USED(seg_idx);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
@@ -28,7 +28,7 @@ eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
RTE_SET_USED(seg_idx);
RTE_SET_USED(offset);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
static int
@@ -428,7 +428,7 @@ eal_memalloc_sync_with_primary(void)
{
/* No multi-process support. */
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v12 02/11] app/test: remove POSIX-specific code
2021-12-07 21:24 ` [PATCH v12 00/11] " Jie Zhou
2021-12-07 21:24 ` [PATCH v12 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
@ 2021-12-07 21:24 ` Jie Zhou
2021-12-07 21:24 ` [PATCH v12 03/11] app/test: fix incorrect errno variable Jie Zhou
` (9 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-07 21:24 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
- Replace POSIX-specific code with DPDK equivalents or conditional platform
specific code, or conditionally disable it on Windows
- Use NUL on Windows as /dev/null for Unix
- Exclude tests not supported on Windows yet
* multi-process
* PMD performance statistics display on signal
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/commands.c | 2 --
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +++-
app/test/test.c | 5 ++++-
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline_ipaddr.c | 19 +++++++++----------
app/test/test_cmdline_lib.c | 13 +++++++++----
app/test/test_crc.c | 1 -
app/test/test_memcpy_perf.c | 28 ++++++++++++++--------------
app/test/test_pmd_perf.c | 6 +++++-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_telemetry_data.c | 2 ++
12 files changed, 49 insertions(+), 36 deletions(-)
diff --git a/app/test/commands.c b/app/test/commands.c
index 2dced3bc44..887cabad64 100644
--- a/app/test/commands.c
+++ b/app/test/commands.c
@@ -8,8 +8,6 @@
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
-#include <netinet/in.h>
-#include <termios.h>
#include <inttypes.h>
#include <errno.h>
#include <sys/queue.h>
diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index 8ac24577ba..6b42b9b83b 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -5,6 +5,7 @@
#include <rte_byteorder.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
+#include <rte_os_shim.h>
#include "packet_burst_generator.h"
diff --git a/app/test/process.h b/app/test/process.h
index 5b10cf64df..1f073b9c5c 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -7,12 +7,14 @@
#include <errno.h> /* errno */
#include <limits.h> /* PATH_MAX */
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <libgen.h> /* basename et al */
+#include <sys/wait.h>
+#endif
#include <stdlib.h> /* NULL */
#include <string.h> /* strerror */
#include <unistd.h> /* readlink */
#include <dirent.h>
-#include <sys/wait.h>
#include <rte_string_fns.h> /* strlcpy */
diff --git a/app/test/test.c b/app/test/test.c
index 5194131026..e69cae3eea 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
@@ -63,7 +62,9 @@ do_recursive_call(void)
const char *env_var;
int (*action_fn)(void);
} actions[] = {
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "run_secondary_instances", test_mp_secondary },
+#endif
#ifdef RTE_LIB_PDUMP
#ifdef RTE_NET_RING
{ "run_pdump_server_tests", test_pdump },
@@ -82,7 +83,9 @@ do_recursive_call(void)
{ "test_file_prefix", no_action },
{ "test_no_huge_flag", no_action },
#ifdef RTE_LIB_TIMER
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "timer_secondary_spawn_wait", test_timer_secondary },
+#endif
#endif
};
diff --git a/app/test/test_byteorder.c b/app/test/test_byteorder.c
index 03c08d9abf..de14ed539e 100644
--- a/app/test/test_byteorder.c
+++ b/app/test/test_byteorder.c
@@ -46,7 +46,7 @@ test_byteorder(void)
return -1;
res_u16 = rte_bswap16(0x1337);
- printf("const %"PRIx16" -> %"PRIx16"\n", 0x1337, res_u16);
+ printf("const %"PRIx16" -> %"PRIx16"\n", (uint16_t)0x1337, res_u16);
if (res_u16 != 0x3713)
return -1;
diff --git a/app/test/test_cmdline_ipaddr.c b/app/test/test_cmdline_ipaddr.c
index 2a1ee120fc..278fa3cd79 100644
--- a/app/test/test_cmdline_ipaddr.c
+++ b/app/test/test_cmdline_ipaddr.c
@@ -1,12 +1,9 @@
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2010-2014 Intel Corporation
*/
-
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
-#include <netinet/in.h>
-#include <sys/socket.h>
#include <rte_string_fns.h>
@@ -15,17 +12,21 @@
#include "test_cmdline.h"
-#define IP4(a,b,c,d) {((uint32_t)(((a) & 0xff)) | \
- (((b) & 0xff) << 8) | \
- (((c) & 0xff) << 16) | \
- ((d) & 0xff) << 24)}
+#define IP4(a,b,c,d) {.s_addr = (uint32_t)(((a) & 0xff) | \
+ (((b) & 0xff) << 8) | \
+ (((c) & 0xff) << 16) | \
+ ((d) & 0xff) << 24)}
#define U16_SWAP(x) \
(((x & 0xFF) << 8) | ((x & 0xFF00) >> 8))
/* create IPv6 address, swapping bytes where needed */
#ifndef s6_addr16
-# define s6_addr16 __u6_addr.__u6_addr16
+#ifdef RTE_EXEC_ENV_WINDOWS
+#define s6_addr16 u.Word
+#else
+#define s6_addr16 __u6_addr.__u6_addr16
+#endif
#endif
#define IP6(a,b,c,d,e,f,g,h) .ipv6 = \
{.s6_addr16 = \
@@ -166,8 +167,6 @@ const char * ipaddr_garbage_network6_strs[] = {
};
#define IPv6_GARBAGE_PREFIX 64
-
-
const char * ipaddr_invalid_strs[] = {
/** IPv4 **/
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index f50ccdb599..fcd58cb76a 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
@@ -22,6 +21,12 @@
#include "test_cmdline.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
+#define NULL_INPUT "/dev/null"
+#else
+#define NULL_INPUT "NUL"
+#endif
+
/****************************************************************/
/* static functions required for some tests */
static void
@@ -156,10 +161,10 @@ test_cmdline_socket_fns(void)
cl = cmdline_stdin_new(&ctx, NULL);
if (cl != NULL)
goto error;
- cl = cmdline_file_new(NULL, "prompt", "/dev/null");
+ cl = cmdline_file_new(NULL, "prompt", NULL_INPUT);
if (cl != NULL)
goto error;
- cl = cmdline_file_new(&ctx, NULL, "/dev/null");
+ cl = cmdline_file_new(&ctx, NULL, NULL_INPUT);
if (cl != NULL)
goto error;
cl = cmdline_file_new(&ctx, "prompt", NULL);
@@ -171,7 +176,7 @@ test_cmdline_socket_fns(void)
cmdline_free(cl);
return -1;
}
- cl = cmdline_file_new(&ctx, "prompt", "/dev/null");
+ cl = cmdline_file_new(&ctx, "prompt", NULL_INPUT);
if (cl == NULL) {
printf("Error: failed to open /dev/null for reading!");
return -1;
diff --git a/app/test/test_crc.c b/app/test/test_crc.c
index bf1d344359..0ed080e482 100644
--- a/app/test/test_crc.c
+++ b/app/test/test_crc.c
@@ -14,7 +14,6 @@
#define CRC32_VEC_LEN2 348
#define CRC16_VEC_LEN1 12
#define CRC16_VEC_LEN2 2
-#define LINE_LEN 75
/* CRC test vector */
static const uint8_t crc_vec[CRC_VEC_LEN] = {
diff --git a/app/test/test_memcpy_perf.c b/app/test/test_memcpy_perf.c
index c711e36ba7..0dc88ed39c 100644
--- a/app/test/test_memcpy_perf.c
+++ b/app/test/test_memcpy_perf.c
@@ -6,10 +6,10 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include <sys/time.h>
#include <rte_common.h>
#include <rte_cycles.h>
+#include <rte_os_shim.h>
#include <rte_random.h>
#include <rte_malloc.h>
@@ -271,7 +271,7 @@ static int
perf_test(void)
{
int ret;
- struct timeval tv_begin, tv_end;
+ struct timespec tv_begin, tv_end;
double time_aligned, time_unaligned;
double time_aligned_const, time_unaligned_const;
@@ -298,32 +298,32 @@ perf_test(void)
printf("\n================================= %2dB aligned =================================",
ALIGNMENT_UNIT);
/* Do aligned tests where size is a variable */
- gettimeofday(&tv_begin, NULL);
+ timespec_get(&tv_begin, TIME_UTC);
perf_test_variable_aligned();
- gettimeofday(&tv_end, NULL);
+ timespec_get(&tv_end, TIME_UTC);
time_aligned = (double)(tv_end.tv_sec - tv_begin.tv_sec)
- + ((double)tv_end.tv_usec - tv_begin.tv_usec)/1000000;
+ + ((double)tv_end.tv_nsec - tv_begin.tv_nsec) / NS_PER_S;
printf("\n------- ----------------- ----------------- ----------------- -----------------");
/* Do aligned tests where size is a compile-time constant */
- gettimeofday(&tv_begin, NULL);
+ timespec_get(&tv_begin, TIME_UTC);
perf_test_constant_aligned();
- gettimeofday(&tv_end, NULL);
+ timespec_get(&tv_end, TIME_UTC);
time_aligned_const = (double)(tv_end.tv_sec - tv_begin.tv_sec)
- + ((double)tv_end.tv_usec - tv_begin.tv_usec)/1000000;
+ + ((double)tv_end.tv_nsec - tv_begin.tv_nsec) / NS_PER_S;
printf("\n================================== Unaligned ==================================");
/* Do unaligned tests where size is a variable */
- gettimeofday(&tv_begin, NULL);
+ timespec_get(&tv_begin, TIME_UTC);
perf_test_variable_unaligned();
- gettimeofday(&tv_end, NULL);
+ timespec_get(&tv_end, TIME_UTC);
time_unaligned = (double)(tv_end.tv_sec - tv_begin.tv_sec)
- + ((double)tv_end.tv_usec - tv_begin.tv_usec)/1000000;
+ + ((double)tv_end.tv_nsec - tv_begin.tv_nsec) / NS_PER_S;
printf("\n------- ----------------- ----------------- ----------------- -----------------");
/* Do unaligned tests where size is a compile-time constant */
- gettimeofday(&tv_begin, NULL);
+ timespec_get(&tv_begin, TIME_UTC);
perf_test_constant_unaligned();
- gettimeofday(&tv_end, NULL);
+ timespec_get(&tv_end, TIME_UTC);
time_unaligned_const = (double)(tv_end.tv_sec - tv_begin.tv_sec)
- + ((double)tv_end.tv_usec - tv_begin.tv_usec)/1000000;
+ + ((double)tv_end.tv_nsec - tv_begin.tv_nsec) / NS_PER_S;
printf("\n======= ================= ================= ================= =================\n\n");
printf("Test Execution Time (seconds):\n");
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 0aa9dc1b1c..25611bfe9b 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -296,6 +296,7 @@ reset_count(void)
idle = 0;
}
+#ifndef RTE_EXEC_ENV_WINDOWS
static void
stats_display(uint16_t port_id)
{
@@ -325,6 +326,7 @@ signal_handler(int signum)
if (signum == SIGUSR2)
stats_display(0);
}
+#endif
struct rte_mbuf **tx_burst;
@@ -638,7 +640,7 @@ exec_burst(uint32_t flags, int lcore)
i = (i >= conf->nb_ports - 1) ? 0 : (i + 1);
}
- sleep(5);
+ rte_delay_us(5 * US_PER_S);
/* only when polling second */
if (flags == SC_BURST_XMIT_FIRST)
@@ -669,8 +671,10 @@ test_pmd_perf(void)
printf("Start PMD RXTX cycles cost test.\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
signal(SIGUSR1, signal_handler);
signal(SIGUSR2, signal_handler);
+#endif
nb_ports = rte_eth_dev_count_avail();
if (nb_ports < NB_ETHPORTS_USED) {
diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h
index 2825a9dce6..62f046a91a 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -360,7 +360,7 @@ test_mt1(int (*test)(void *))
/* signal worker to start test */
__atomic_store_n(&wrk_cmd, WRK_CMD_RUN, __ATOMIC_RELEASE);
- usleep(run_time * US_PER_S);
+ rte_delay_us(run_time * US_PER_S);
/* signal worker to start test */
__atomic_store_n(&wrk_cmd, WRK_CMD_STOP, __ATOMIC_RELEASE);
diff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c
index 18b93db8ef..73eee293a1 100644
--- a/app/test/test_telemetry_data.c
+++ b/app/test/test_telemetry_data.c
@@ -4,7 +4,9 @@
#include <string.h>
#include <sys/socket.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/un.h>
+#endif
#include <unistd.h>
#include <limits.h>
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v12 03/11] app/test: fix incorrect errno variable
2021-12-07 21:24 ` [PATCH v12 00/11] " Jie Zhou
2021-12-07 21:24 ` [PATCH v12 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-12-07 21:24 ` [PATCH v12 02/11] app/test: remove POSIX-specific code Jie Zhou
@ 2021-12-07 21:24 ` Jie Zhou
2021-12-07 21:24 ` [PATCH v12 04/11] app/test: skip interrupt tests on Windows Jie Zhou
` (8 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-07 21:24 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Fix incorrect errno variable used in memory autotest.
Use rte_errno instead.
Fixes: 086d426406bd ("app/test: fix memory autotests on FreeBSD")
Cc: bruce.richardson@intel.com
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/test_memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index dbf6871e71..140ac3f3cf 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -63,7 +63,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
/* we're able to get memseg fd - try getting its offset */
ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
if (ret < 0) {
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
return -1;
}
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v12 04/11] app/test: skip interrupt tests on Windows
2021-12-07 21:24 ` [PATCH v12 00/11] " Jie Zhou
` (2 preceding siblings ...)
2021-12-07 21:24 ` [PATCH v12 03/11] app/test: fix incorrect errno variable Jie Zhou
@ 2021-12-07 21:24 ` Jie Zhou
2021-12-07 21:24 ` [PATCH v12 05/11] app/test: skip two logs_autotest cases " Jie Zhou
` (7 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-07 21:24 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Even though test_interrupts.c can compile on Windows, skip interrupt
tests for now since majority of eal_interrupt on Windows are stubs.
Will remove the skip after interrupt being fully enabled on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/test_interrupts.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
index 2a05399f96..eec9b2805b 100644
--- a/app/test/test_interrupts.c
+++ b/app/test/test_interrupts.c
@@ -12,6 +12,15 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_interrupt(void)
+{
+ printf("Interrupt on Windows is not fully supported yet, skipping test\n");
+ return TEST_SKIPPED;
+}
+#else
+
#define TEST_INTERRUPT_CHECK_INTERVAL 100 /* ms */
/* predefined interrupt handle types */
@@ -590,5 +599,6 @@ test_interrupt(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v12 05/11] app/test: skip two logs_autotest cases on Windows
2021-12-07 21:24 ` [PATCH v12 00/11] " Jie Zhou
` (3 preceding siblings ...)
2021-12-07 21:24 ` [PATCH v12 04/11] app/test: skip interrupt tests on Windows Jie Zhou
@ 2021-12-07 21:24 ` Jie Zhou
2021-12-07 21:24 ` [PATCH v12 06/11] app/test: differentiate a strerror on different OS Jie Zhou
` (6 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-07 21:24 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
DPDK logs_autotest on Windows failed at "dynamic log types" tests.
The failures are on 2 test cases for rte_log_set_level_regexp API,
due to regular expression is not supported on Windows in DPDK yet
and regcomp/regexec are just stubs on Windows (in regex.h).
In app\test\test_logs.c, ifndef these two test cases, and for the
rte_log_set_level_pattern validation case following these two cases,
differentiate the expected log level passed into macro CHECK_LEVELS
Now logs_autotest completes for all dynamic log types and static log types.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/test_logs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/test/test_logs.c b/app/test/test_logs.c
index 7abb6eeca2..7c001c1ab3 100644
--- a/app/test/test_logs.c
+++ b/app/test/test_logs.c
@@ -113,6 +113,7 @@ test_logs(void)
rte_log_set_level(logtype1, RTE_LOG_ERR);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#ifndef RTE_EXEC_ENV_WINDOWS
rte_log_set_level_regexp("type$", RTE_LOG_EMERG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
@@ -121,7 +122,10 @@ test_logs(void)
rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_EMERG, RTE_LOG_EMERG);
-
+#else
+ ret = rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
+ CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#endif
/* set logtype level low to so we can test global level */
rte_log_set_level_pattern("logtype*", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_DEBUG, RTE_LOG_DEBUG, RTE_LOG_DEBUG);
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v12 06/11] app/test: differentiate a strerror on different OS
2021-12-07 21:24 ` [PATCH v12 00/11] " Jie Zhou
` (4 preceding siblings ...)
2021-12-07 21:24 ` [PATCH v12 05/11] app/test: skip two logs_autotest cases " Jie Zhou
@ 2021-12-07 21:24 ` Jie Zhou
2021-12-07 21:24 ` [PATCH v12 07/11] app/test: remove two alarm_autotest cases Jie Zhou
` (5 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-07 21:24 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
On Windows, strerror returns just "Unknown error" for errnum greater
than MAX_ERRNO, while linux and freebsd returns "Unknown error <num>",
which is the current expectation for errno_autotest. Differentiate
the error string on Windows to remove a "duplicate error code" failure.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_errno.c | 12 +++++++++++-
lib/eal/common/eal_common_errno.c | 4 ++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/app/test/test_errno.c b/app/test/test_errno.c
index 3ff0456a58..0db4fbc8b3 100644
--- a/app/test/test_errno.c
+++ b/app/test/test_errno.c
@@ -18,13 +18,19 @@ test_errno(void)
{
const char *rte_retval;
const char *libc_retval;
+
+#ifndef RTE_EXEC_ENV_WINDOWS
#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD has a colon in the string, unlike linux */
const char unknown_code_result[] = "Unknown error: %d";
#else
const char unknown_code_result[] = "Unknown error %d";
#endif
- char expected_libc_retval[sizeof(unknown_code_result)+3];
+ char expected_libc_retval[sizeof(unknown_code_result) + 3];
+#else
+ /* Windows doesn't return error number for error greater than MAX_errno*/
+ static const char expected_libc_retval[] = "Unknown error";
+#endif
/* use a small selection of standard errors for testing */
int std_errs[] = {EAGAIN, EBADF, EACCES, EINTR, EINVAL};
@@ -54,11 +60,13 @@ test_errno(void)
rte_retval, libc_retval);
if (strcmp(rte_retval, libc_retval) == 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
/* generate appropriate error string for unknown error number
* and then check that this is what we got back. If not, we have
* a duplicate error number that conflicts with errno.h */
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, rte_errs[i]);
+#endif
if ((strcmp(expected_libc_retval, libc_retval) != 0) &&
(strcmp("", libc_retval) != 0)){
printf("Error, duplicate error code %d\n", rte_errs[i]);
@@ -69,8 +77,10 @@ test_errno(void)
/* ensure that beyond RTE_MAX_ERRNO, we always get an unknown code */
rte_retval = rte_strerror(RTE_MAX_ERRNO + 1);
libc_retval = strerror(RTE_MAX_ERRNO + 1);
+#ifndef RTE_EXEC_ENV_WINDOWS
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, RTE_MAX_ERRNO + 1);
+#endif
printf("rte_strerror: '%s', strerror: '%s'\n",
rte_retval, libc_retval);
if ((strcmp(rte_retval, libc_retval) != 0) ||
diff --git a/lib/eal/common/eal_common_errno.c b/lib/eal/common/eal_common_errno.c
index f86802705a..7507c746ec 100644
--- a/lib/eal/common/eal_common_errno.c
+++ b/lib/eal/common/eal_common_errno.c
@@ -37,7 +37,11 @@ rte_strerror(int errnum)
/* since some implementations of strerror_r throw an error
* themselves if errnum is too big, we handle that case here */
if (errnum >= RTE_MAX_ERRNO)
+#ifdef RTE_EXEC_ENV_WINDOWS
+ snprintf(ret, RETVAL_SZ, "Unknown error");
+#else
snprintf(ret, RETVAL_SZ, "Unknown error%s %d", sep, errnum);
+#endif
else
switch (errnum){
case E_RTE_SECONDARY:
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v12 07/11] app/test: remove two alarm_autotest cases
2021-12-07 21:24 ` [PATCH v12 00/11] " Jie Zhou
` (5 preceding siblings ...)
2021-12-07 21:24 ` [PATCH v12 06/11] app/test: differentiate a strerror on different OS Jie Zhou
@ 2021-12-07 21:24 ` Jie Zhou
2021-12-07 21:24 ` [PATCH v12 08/11] app/test: resolve name collision Jie Zhou
` (4 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-07 21:24 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Remove two alarm_autotest test cases which do bogus range check
on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/test_alarm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_alarm.c b/app/test/test_alarm.c
index b4034339b8..70e97a3109 100644
--- a/app/test/test_alarm.c
+++ b/app/test/test_alarm.c
@@ -10,6 +10,7 @@
#include "test.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
static volatile int flag;
static void
@@ -18,6 +19,7 @@ test_alarm_callback(void *cb_arg)
flag = 1;
printf("Callback setting flag - OK. [cb_arg = %p]\n", cb_arg);
}
+#endif
static int
test_alarm(void)
@@ -27,6 +29,7 @@ test_alarm(void)
return 0;
#endif
+#ifndef RTE_EXEC_ENV_WINDOWS
/* check if it will fail to set alarm with wrong us value */
printf("check if it will fail to set alarm with wrong ms values\n");
if (rte_eal_alarm_set(0, test_alarm_callback,
@@ -39,6 +42,7 @@ test_alarm(void)
printf("should not be successful with (UINT64_MAX-1) us value\n");
return -1;
}
+#endif
/* check if it will fail to set alarm with null callback parameter */
printf("check if it will fail to set alarm with null callback parameter\n");
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v12 08/11] app/test: resolve name collision
2021-12-07 21:24 ` [PATCH v12 00/11] " Jie Zhou
` (6 preceding siblings ...)
2021-12-07 21:24 ` [PATCH v12 07/11] app/test: remove two alarm_autotest cases Jie Zhou
@ 2021-12-07 21:24 ` Jie Zhou
2021-12-07 21:24 ` [PATCH v12 09/11] app/test: add test stubs for not supported ones Jie Zhou
` (3 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-07 21:24 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Add OP_ prefix to resolve name collision to enable hash_perf test
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/test_hash_perf.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/app/test/test_hash_perf.c b/app/test/test_hash_perf.c
index 76cdac5d53..7e98ec3964 100644
--- a/app/test/test_hash_perf.c
+++ b/app/test/test_hash_perf.c
@@ -30,10 +30,10 @@
#define BURST_SIZE 16
enum operations {
- ADD = 0,
- LOOKUP,
- LOOKUP_MULTI,
- DELETE,
+ OP_ADD = 0,
+ OP_LOOKUP,
+ OP_LOOKUP_MULTI,
+ OP_DELETE,
NUM_OPERATIONS
};
@@ -308,7 +308,7 @@ timed_adds(unsigned int with_hash, unsigned int with_data,
const uint64_t end_tsc = rte_rdtsc();
const uint64_t time_taken = end_tsc - start_tsc;
- cycles[table_index][ADD][with_hash][with_data] = time_taken/keys_to_add;
+ cycles[table_index][OP_ADD][with_hash][with_data] = time_taken/keys_to_add;
return 0;
}
@@ -385,7 +385,7 @@ timed_lookups(unsigned int with_hash, unsigned int with_data,
const uint64_t end_tsc = rte_rdtsc();
const uint64_t time_taken = end_tsc - start_tsc;
- cycles[table_index][LOOKUP][with_hash][with_data] = time_taken/num_lookups;
+ cycles[table_index][OP_LOOKUP][with_hash][with_data] = time_taken/num_lookups;
return 0;
}
@@ -511,7 +511,7 @@ timed_lookups_multi(unsigned int with_hash, unsigned int with_data,
const uint64_t end_tsc = rte_rdtsc();
const uint64_t time_taken = end_tsc - start_tsc;
- cycles[table_index][LOOKUP_MULTI][with_hash][with_data] =
+ cycles[table_index][OP_LOOKUP_MULTI][with_hash][with_data] =
time_taken/num_lookups;
return 0;
@@ -550,7 +550,7 @@ timed_deletes(unsigned int with_hash, unsigned int with_data,
const uint64_t end_tsc = rte_rdtsc();
const uint64_t time_taken = end_tsc - start_tsc;
- cycles[table_index][DELETE][with_hash][with_data] = time_taken/keys_to_add;
+ cycles[table_index][OP_DELETE][with_hash][with_data] = time_taken/keys_to_add;
return 0;
}
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v12 09/11] app/test: add test stubs for not supported ones
2021-12-07 21:24 ` [PATCH v12 00/11] " Jie Zhou
` (7 preceding siblings ...)
2021-12-07 21:24 ` [PATCH v12 08/11] app/test: resolve name collision Jie Zhou
@ 2021-12-07 21:24 ` Jie Zhou
2021-12-07 21:24 ` [PATCH v12 10/11] app/test: replace .sh script with .py script Jie Zhou
` (2 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-07 21:24 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Add test stubs for tests which are not yet supported for Windows:
- The libraries the 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>
---
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 | 12 ++++
app/test/test_graph.c | 18 ++++-
app/test/test_graph_perf.c | 16 ++++-
app/test/test_hash_perf.c | 12 ++++
app/test/test_ipfrag.c | 16 ++++-
app/test/test_ipsec.c | 15 +++-
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 | 12 ++++
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 | 5 +-
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 | 12 ++++
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 | 4 +-
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, 882 insertions(+), 74 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 <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 /*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 46bcb51f86..055df252ba 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -14,11 +14,22 @@
#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 +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 10b48cdadb..f83c844e42 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 <time.h>
#include <rte_common.h>
@@ -15739,3 +15741,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 9d19a6d6d9..680ced4dbe 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 <rte_bus_vdev.h>
#include <rte_common.h>
#include <rte_hexdump.h>
@@ -2429,3 +2431,5 @@ REGISTER_TEST_COMMAND(cryptodev_octeontx2_asym_autotest,
test_cryptodev_octeontx2_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 <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 /*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 <rte_common.h>
#include <rte_cryptodev.h>
#include <rte_esp.h>
@@ -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 <time.h>
#include <rte_common.h>
@@ -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 <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 /*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 <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 @@ 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 <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 /*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 <string.h>
#include <stdarg.h>
+
+#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 <libgen.h>
#include <stdlib.h>
#include <errno.h>
@@ -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 <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 /*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 <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 /*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..8f5fd78723 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 <string.h>
#include <rte_common.h>
#include <rte_mempool.h>
#include <rte_mbuf.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_cryptodev.h>
#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 /*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 <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 /*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 <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 /*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 <math.h>
@@ -10,6 +11,17 @@
#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 +33,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 +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 843d9766b0..fee2ecaa22 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 <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
@@ -1048,7 +1058,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);
@@ -1058,3 +1072,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 <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 +33,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 +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 <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 /*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 <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 /*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 <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);
diff --git a/app/test/test_fib_perf.c b/app/test/test_fib_perf.c
index 86b2f832b8..ec7f20e102 100644
--- a/app/test/test_fib_perf.c
+++ b/app/test/test_fib_perf.c
@@ -12,11 +12,22 @@
#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 /*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 <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 /*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..2924308dda 100644
--- a/app/test/test_func_reentrancy.c
+++ b/app/test/test_func_reentrancy.c
@@ -40,6 +40,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_func_reentrancy(void)
+{
+ printf("reentrancy not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
typedef int (*case_func_t)(void* arg);
typedef void (*case_clean_t)(unsigned lcore_id);
@@ -511,4 +521,6 @@ test_func_reentrancy(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(func_reentrancy_autotest, test_func_reentrancy);
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 <assert.h>
#include <inttypes.h>
#include <signal.h>
@@ -9,14 +11,23 @@
#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 +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 <inttypes.h>
#include <signal.h>
#include <stdio.h>
@@ -9,14 +11,22 @@
#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 +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..a3e9f43967 100644
--- a/app/test/test_hash_perf.c
+++ b/app/test/test_hash_perf.c
@@ -17,6 +17,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_hash_perf(void)
+{
+ printf("hash_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ENTRIES (1 << 19)
#define KEYS_TO_ADD (MAX_ENTRIES)
#define ADD_PERCENT 0.75 /* 75% table utilization */
@@ -749,4 +759,6 @@ test_hash_perf(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(hash_perf_autotest, test_hash_perf);
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 <time.h>
@@ -8,13 +9,22 @@
#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 +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..ed4d166f0d 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 <time.h>
@@ -13,15 +14,25 @@
#include <rte_bus_vdev.h>
#include <rte_ip.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_crypto.h>
#include <rte_cryptodev.h>
#include <rte_lcore.h>
+
#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 /*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 <stdio.h>
#include <rte_ip.h>
@@ -8,10 +9,20 @@
#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 +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 <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 +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 40ab0d5c4c..8f4e92f6ca 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 <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>
diff --git a/app/test/test_lcores.c b/app/test/test_lcores.c
index 35c47d5372..2277ae597f 100644
--- a/app/test/test_lcores.c
+++ b/app/test/test_lcores.c
@@ -11,6 +11,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_lcores(void)
+{
+ printf("lcore not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
struct thread_context {
enum { INIT, ERROR, DONE } state;
bool lcore_id_any;
@@ -411,4 +421,6 @@ test_lcores(void)
return TEST_SUCCESS;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(lcores_autotest, test_lcores);
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 <stdio.h>
#include <stdint.h>
@@ -10,7 +21,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 +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 <stdio.h>
#include <stdint.h>
@@ -8,9 +9,18 @@
#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 +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 <stdio.h>
#include <stdint.h>
@@ -12,7 +23,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 +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 <stdio.h>
#include <stdint.h>
#include <stdlib.h>
@@ -15,7 +25,6 @@
#include <rte_ip.h>
#include <rte_lpm.h>
-#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 <stdio.h>
#include <stdint.h>
@@ -8,7 +9,9 @@
#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>
@@ -23,11 +26,8 @@
#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 +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..24ca49f73f 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 <string.h>
#include <stdarg.h>
@@ -33,8 +34,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 +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 <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 /*!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 40aa4c8627..85f3a126b9 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 <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 +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 <stdio.h>
#include <inttypes.h>
@@ -11,9 +12,18 @@
#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 +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 0dc88ed39c..488784c870 100644
--- a/app/test/test_memcpy_perf.c
+++ b/app/test/test_memcpy_perf.c
@@ -2,6 +2,8 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#include "test.h"
+
#include <stdint.h>
#include <stdio.h>
#include <string.h>
@@ -12,11 +14,8 @@
#include <rte_os_shim.h>
#include <rte_random.h>
#include <rte_malloc.h>
-
#include <rte_memcpy.h>
-#include "test.h"
-
/*
* Set this to the maximum buffer size you want to test. If it is 0, then the
* values in the buf_sizes[] array below will be used.
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 <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 /*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 <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -12,8 +38,6 @@
#include <time.h>
#include <math.h>
-#include "test.h"
-
#include <rte_pie.h>
#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 <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 /*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..9209fb2658 100644
--- a/app/test/test_rcu_qsbr_perf.c
+++ b/app/test/test_rcu_qsbr_perf.c
@@ -15,6 +15,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_rcu_qsbr_main(void)
+{
+ printf("rcu_qsbr_main not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
/* Check condition and return an error if true. */
static uint16_t enabled_core_ids[RTE_MAX_LCORE];
static unsigned int num_cores;
@@ -687,4 +697,6 @@ test_rcu_qsbr_main(void)
return -1;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
diff --git a/app/test/test_red.c b/app/test/test_red.c
index 05936cfee8..524f9c9b6d 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 <stdlib.h>
#include <stdio.h>
@@ -8,12 +9,34 @@
#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 +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 <stdio.h>
#include <unistd.h>
@@ -9,12 +10,20 @@
#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 +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 <medvedkinv@gmail.com>
* 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 +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 <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,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 <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 +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 060cf1ffa8..6c1d8602d2 100644
--- a/app/test/test_security.c
+++ b/app/test/test_security.c
@@ -1,12 +1,14 @@
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
*/
+#include "test.h"
#include <rte_errno.h>
#include <rte_log.h>
#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_ether.h>
+
#include <rte_security.h>
#include <rte_security_driver.h>
@@ -20,7 +22,7 @@
#endif
#include <rte_test.h>
-#include "test.h"
+
/**
* Security
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 <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 +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 <rte_ip.h>
#include <rte_string_fns.h>
#include <rte_hexdump.h>
@@ -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 <string.h>
#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 aabf4375db..45dc7682d8 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 <string.h>
#include <rte_pipeline.h>
#include <rte_log.h>
@@ -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 <string.h>
#include <rte_byteorder.h>
#include <rte_table_lpm_ipv6.h>
@@ -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 <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 +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.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v12 10/11] app/test: replace .sh script with .py script
2021-12-07 21:24 ` [PATCH v12 00/11] " Jie Zhou
` (8 preceding siblings ...)
2021-12-07 21:24 ` [PATCH v12 09/11] app/test: add test stubs for not supported ones Jie Zhou
@ 2021-12-07 21:24 ` Jie Zhou
2021-12-07 21:24 ` [PATCH v12 11/11] app/test: enable unit test for Windows Jie Zhou
2021-12-08 1:50 ` [PATCH v13 00/11] app/test: enable subset of tests on Windows Jie Zhou
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-07 21:24 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
- Add python script to check if system supports hugepages
- Remove corresponding .sh script
- Replace calling of .sh with corresponding .py in meson.build
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/has-hugepage.sh | 11 -----------
app/test/has_hugepage.py | 26 ++++++++++++++++++++++++++
app/test/meson.build | 2 +-
3 files changed, 27 insertions(+), 12 deletions(-)
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh
deleted file mode 100755
index d600fad319..0000000000
--- a/app/test/has-hugepage.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright 2020 Mellanox Technologies, Ltd
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /proc/sys/vm/nr_hugepages || echo 0
-elif [ "$(uname)" = "FreeBSD" ] ; then
- echo 1 # assume FreeBSD always has hugepages
-else
- echo 0
-fi
diff --git a/app/test/has_hugepage.py b/app/test/has_hugepage.py
new file mode 100644
index 0000000000..f8e7087d1c
--- /dev/null
+++ b/app/test/has_hugepage.py
@@ -0,0 +1,26 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2021 Microsoft Corporation
+"""This script checks if the system supports huge pages"""
+
+import platform
+import ctypes
+
+os_name = platform.system()
+if os_name == "Linux":
+ try:
+ with open("/proc/sys/vm/nr_hugepages") as file_o:
+ content = file_o.read()
+ print(content)
+ except:
+ print("0")
+
+elif os_name == "FreeBSD":
+ # Assume FreeBSD always has hugepages enabled
+ print("1")
+elif os_name == "Windows":
+ if ctypes.windll.kernel32.GetLargePageMinimum() > 0:
+ print("1")
+ else:
+ print("0")
+else:
+ print("0")
diff --git a/app/test/meson.build b/app/test/meson.build
index 2b480adfba..97ee83029e 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -492,7 +492,7 @@ dpdk_test = executable('dpdk-test',
driver_install_path),
install: true)
-has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
+has_hugepage = run_command(py3, 'has_hugepage.py').stdout().strip() != '0'
message('hugepage availability: @0@'.format(has_hugepage))
# some perf tests (eg: memcpy perf autotest)take very long
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v12 11/11] app/test: enable unit test for Windows
2021-12-07 21:24 ` [PATCH v12 00/11] " Jie Zhou
` (9 preceding siblings ...)
2021-12-07 21:24 ` [PATCH v12 10/11] app/test: replace .sh script with .py script Jie Zhou
@ 2021-12-07 21:24 ` Jie Zhou
2021-12-08 1:50 ` [PATCH v13 00/11] app/test: enable subset of tests on Windows Jie Zhou
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-07 21:24 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Enable a subset of unit tests for Windows CI
- For driver tests, it's better for driver owners to enable each. For example,
the cryptodev tests will be enabled by "patch-18949: app/test: enable crypto
unit tests on Windows" (which depends on this patchset to be merged).
- For dump tests, currently the tests hang on Windows which require
further investigation.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/meson.build | 111 ++++++++++++++++++++++---------------------
1 file changed, 58 insertions(+), 53 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index 97ee83029e..fcf38729e7 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,12 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if is_windows
- build = false
- reason = 'not supported on Windows'
- subdir_done()
-endif
-
if not get_option('tests')
subdir_done()
endif
@@ -158,32 +152,14 @@ test_sources = files(
)
test_deps = [
- 'acl',
'bus_pci',
'bus_vdev',
- 'bpf',
'cfgfile',
'cmdline',
- 'cryptodev',
- 'distributor',
'dmadev',
- 'efd',
'ethdev',
- 'eventdev',
- 'fib',
- 'flow_classify',
- 'graph',
'hash',
- 'ipsec',
- 'lpm',
- 'member',
- 'node',
- 'pipeline',
- 'port',
- 'rawdev',
'rcu',
- 'reorder',
- 'rib',
'ring',
'security',
'stack',
@@ -334,39 +310,68 @@ perf_test_names = [
]
driver_test_names = [
- 'cryptodev_aesni_mb_autotest',
- 'cryptodev_aesni_gcm_autotest',
- 'cryptodev_cn9k_autotest',
- 'cryptodev_cn10k_autotest',
- 'cryptodev_dpaa_sec_autotest',
- 'cryptodev_dpaa2_sec_autotest',
- 'cryptodev_null_autotest',
- 'cryptodev_octeontx2_autotest',
- 'cryptodev_openssl_autotest',
- 'cryptodev_openssl_asym_autotest',
- 'cryptodev_qat_autotest',
- 'cryptodev_sw_armv8_autotest',
- 'cryptodev_sw_kasumi_autotest',
- 'cryptodev_sw_mvsam_autotest',
- 'cryptodev_sw_snow3g_autotest',
- 'cryptodev_sw_zuc_autotest',
- 'dmadev_autotest',
- 'eventdev_selftest_octeontx',
- 'eventdev_selftest_sw',
- 'rawdev_autotest',
]
dump_test_names = [
- 'dump_struct_sizes',
- 'dump_mempool',
- 'dump_malloc_stats',
- 'dump_devargs',
- 'dump_log_types',
- 'dump_ring',
- 'dump_physmem',
- 'dump_memzone',
]
+if not is_windows
+ test_deps += [
+ 'acl',
+ 'bpf',
+ 'cryptodev',
+ 'distributor',
+ 'efd',
+ 'eventdev',
+ 'fib',
+ 'flow_classify',
+ 'graph',
+ 'ipsec',
+ 'lpm',
+ 'member',
+ 'node',
+ 'pipeline',
+ 'port',
+ 'rawdev',
+ 'reorder',
+ 'rib',
+ ]
+
+ driver_test_names += [
+ 'cryptodev_aesni_mb_autotest',
+ 'cryptodev_aesni_gcm_autotest',
+ 'cryptodev_cn9k_autotest',
+ 'cryptodev_cn10k_autotest',
+ 'cryptodev_dpaa_sec_autotest',
+ 'cryptodev_dpaa2_sec_autotest',
+ 'cryptodev_null_autotest',
+ 'cryptodev_octeontx2_autotest',
+ 'cryptodev_openssl_autotest',
+ 'cryptodev_openssl_asym_autotest',
+ 'cryptodev_qat_autotest',
+ 'cryptodev_sw_armv8_autotest',
+ 'cryptodev_sw_kasumi_autotest',
+ 'cryptodev_sw_mvsam_autotest',
+ 'cryptodev_sw_snow3g_autotest',
+ 'cryptodev_sw_zuc_autotest',
+ 'dmadev_autotest',
+ 'eventdev_selftest_octeontx',
+ 'eventdev_selftest_sw',
+ 'rawdev_autotest',
+ ]
+
+ dump_test_names += [
+ 'dump_struct_sizes',
+ 'dump_mempool',
+ 'dump_malloc_stats',
+ 'dump_devargs',
+ 'dump_log_types',
+ 'dump_ring',
+ 'dump_physmem',
+ 'dump_memzone',
+ ]
+endif
+
# The following linkages are an exception to allow running the
# unit tests without requiring that the developer install the
# DPDK libraries. Explicit linkage of drivers (plugin libraries)
@@ -385,7 +390,7 @@ if dpdk_conf.has('RTE_LIB_METRICS')
test_sources += ['test_metrics.c']
fast_tests += [['metrics_autotest', true]]
endif
-if dpdk_conf.has('RTE_LIB_TELEMETRY')
+if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
endif
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v13 00/11] app/test: enable subset of tests on Windows
2021-12-07 21:24 ` [PATCH v12 00/11] " Jie Zhou
` (10 preceding siblings ...)
2021-12-07 21:24 ` [PATCH v12 11/11] app/test: enable unit test for Windows Jie Zhou
@ 2021-12-08 1:50 ` Jie Zhou
2021-12-08 1:50 ` [PATCH v13 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
` (11 more replies)
11 siblings, 12 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 1:50 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
The goal of this patchset is to enable unit tests in CI for Windows.
It mainly contains:
- Replace POSIX specific codes
- Fix some lib and tests per failures investigation
- Add test stubs for not yet supported ones on Windows
- Replace .sh script with .py script for meson.build
- Enable build and run subset of unit tests on Windows
Future work:
- Work with CI lab to onboard unit tests for Windows to catch regression
- Investigate issues hit at CI onboarding
- Enable more tests
---
V2 changes:
- Fix compilation error on FreeBSD
- Fix email mismatch issue
- Add a missing space around "*"
---
V3 changes:
- Fix a misc c coding style issue
- Revise some commit title and message body
- Fix violations of PEP8 in new added Python scripts
- Add error handling in get_coremask.py
- Fix has_hugepage.py to check system support of hugepages
instead of checking privileges
- Fix test meson.build to run Python scripts using py3
- Consolidate lists of source files, test dep, etc. across all
platforms, with conditional extending on some platform(s)
---
V4 changes:
- Remove building of ip_frag, rib, and reorder libraries on Windows.
These three libs usually can be built on Windows without change.
However, in between the time of V3 and V4, there is regression in
upstream caused build failures of these three libs. Will separately
investigate and enable these libraries.
- Remove previous patch#2 (Enable mempool/stack on Windows) from this
patchset as it was separated out and merged as patch-19314.
- Consolidate the source files, deps, tests lists across platforms as
much as possible.
---
V5 changes:
- Remove a space between function name and open parenthesis '('
- Add back a header mistakenly deleted
---
V6 changes:
- Fix inconsistent static vs. non-static declarations
---
V7 changes:
- Remove get_coremask.py as it is not needed any more in meson.build
- Remove enablement of efd and lpm and their corresponding unit tests.
The enablement of these two libs and their UTs will be in separate
patches after this patch set.
V8 changes:
- Fix coding style issue of using C99 // comments
---
V9 changes:
- Fix has_hugepage.py with adding failure handling on Linux, using
proper variable name to follow Python convention, and removing
unnecessary comment.
- Enable previously skipped test_cmdline_socket_fns test cases
- Revise title and message, and add Fixes info for current Patch#3
- Combine 2 patches (previous #2 and #3 in V8) into one and with
more detailed message
---
V10 changes:
- Fix indentation
---
V11 changes:
- Remove mandatory dependency on bitratestats, latencystats,
and metrics libs in test meson.build, which was reintroduced
at rebase in V9.
---
V12 changes:
- Remove unnecessary print of a null string
- Enable several previous disabled tests
- Split Patch#9 in V11 into two patches for better structure
- Reorder some of the patches for better structure
- Document more details in commit message for issue tracking
---
V13 changes:
- Fix misc coding style issue
- Fix build issue on Ubuntu 18.04
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Jie Zhou (11):
eal/windows: return ENOTSUP for not supported API
app/test: remove POSIX-specific code
app/test: fix incorrect errno variable
app/test: skip interrupt tests on Windows
app/test: skip two logs_autotest cases on Windows
app/test: differentiate a strerror on different OS
app/test: remove two alarm_autotest cases
app/test: resolve name collision
app/test: add test stubs for not supported ones
app/test: replace .sh script with .py script
app/test: enable unit test on Windows
app/test/commands.c | 2 -
app/test/has-hugepage.sh | 11 ---
app/test/has_hugepage.py | 26 ++++++
app/test/meson.build | 113 ++++++++++++-----------
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +-
app/test/test.c | 5 +-
app/test/test_acl.c | 12 +++
app/test/test_alarm.c | 4 +
app/test/test_bpf.c | 15 ++-
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline_ipaddr.c | 13 ++-
app/test/test_cmdline_lib.c | 13 ++-
app/test/test_crc.c | 1 -
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_errno.c | 12 ++-
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 | 12 +++
app/test/test_graph.c | 18 +++-
app/test/test_graph_perf.c | 16 +++-
app/test/test_hash_perf.c | 28 ++++--
app/test/test_interrupts.c | 10 ++
app/test/test_ipfrag.c | 16 +++-
app/test/test_ipsec.c | 15 ++-
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 | 12 +++
app/test/test_logs.c | 6 +-
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 | 30 +++---
app/test/test_memory.c | 2 +-
app/test/test_mp_secondary.c | 12 +++
app/test/test_pie.c | 30 +++++-
app/test/test_pmd_perf.c | 6 +-
app/test/test_rawdev.c | 17 +++-
app/test/test_rcu_qsbr_perf.c | 12 +++
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_ring_stress_impl.h | 2 +-
app/test/test_sched.c | 14 ++-
app/test/test_security.c | 4 +-
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_telemetry_data.c | 2 +
app/test/test_timer_secondary.c | 13 +++
app/test/test_trace.c | 32 ++++++-
lib/eal/common/eal_common_errno.c | 4 +
lib/eal/windows/eal_memalloc.c | 6 +-
84 files changed, 1058 insertions(+), 184 deletions(-)
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v13 01/11] eal/windows: return ENOTSUP for not supported API
2021-12-08 1:50 ` [PATCH v13 00/11] app/test: enable subset of tests on Windows Jie Zhou
@ 2021-12-08 1:50 ` Jie Zhou
2021-12-08 1:50 ` [PATCH v13 02/11] app/test: remove POSIX-specific code Jie Zhou
` (10 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 1:50 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
UT memory_autotest on Windows has 2 failed cases on eal APIs
eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2
APIs are not supported on Windows yet. Should return ENOTSUP such that
in test_memory.c these 2 ENOTSUP cases will not be marked as failures,
same as other ENOTSUP cases.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
lib/eal/windows/eal_memalloc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/eal/windows/eal_memalloc.c b/lib/eal/windows/eal_memalloc.c
index 55d6dcc71c..aa7589b81d 100644
--- a/lib/eal/windows/eal_memalloc.c
+++ b/lib/eal/windows/eal_memalloc.c
@@ -17,7 +17,7 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
RTE_SET_USED(list_idx);
RTE_SET_USED(seg_idx);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
@@ -28,7 +28,7 @@ eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
RTE_SET_USED(seg_idx);
RTE_SET_USED(offset);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
static int
@@ -428,7 +428,7 @@ eal_memalloc_sync_with_primary(void)
{
/* No multi-process support. */
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v13 02/11] app/test: remove POSIX-specific code
2021-12-08 1:50 ` [PATCH v13 00/11] app/test: enable subset of tests on Windows Jie Zhou
2021-12-08 1:50 ` [PATCH v13 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
@ 2021-12-08 1:50 ` Jie Zhou
2021-12-08 1:50 ` [PATCH v13 03/11] app/test: fix incorrect errno variable Jie Zhou
` (9 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 1:50 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
- Replace POSIX-specific code with DPDK equivalents or
conditionally disable it on Windows
- Use NUL on Windows as /dev/null for Unix
- Exclude tests not supported on Windows yet
* multi-process
* PMD performance statistics display on signal
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/commands.c | 2 --
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +++-
app/test/test.c | 5 ++++-
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline_ipaddr.c | 13 ++++++-------
app/test/test_cmdline_lib.c | 13 +++++++++----
app/test/test_crc.c | 1 -
app/test/test_memcpy_perf.c | 29 +++++++++++++++--------------
app/test/test_pmd_perf.c | 6 +++++-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_telemetry_data.c | 2 ++
12 files changed, 47 insertions(+), 33 deletions(-)
diff --git a/app/test/commands.c b/app/test/commands.c
index 2dced3bc44..887cabad64 100644
--- a/app/test/commands.c
+++ b/app/test/commands.c
@@ -8,8 +8,6 @@
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
-#include <netinet/in.h>
-#include <termios.h>
#include <inttypes.h>
#include <errno.h>
#include <sys/queue.h>
diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index 8ac24577ba..6b42b9b83b 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -5,6 +5,7 @@
#include <rte_byteorder.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
+#include <rte_os_shim.h>
#include "packet_burst_generator.h"
diff --git a/app/test/process.h b/app/test/process.h
index 5b10cf64df..1f073b9c5c 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -7,12 +7,14 @@
#include <errno.h> /* errno */
#include <limits.h> /* PATH_MAX */
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <libgen.h> /* basename et al */
+#include <sys/wait.h>
+#endif
#include <stdlib.h> /* NULL */
#include <string.h> /* strerror */
#include <unistd.h> /* readlink */
#include <dirent.h>
-#include <sys/wait.h>
#include <rte_string_fns.h> /* strlcpy */
diff --git a/app/test/test.c b/app/test/test.c
index 5194131026..e69cae3eea 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
@@ -63,7 +62,9 @@ do_recursive_call(void)
const char *env_var;
int (*action_fn)(void);
} actions[] = {
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "run_secondary_instances", test_mp_secondary },
+#endif
#ifdef RTE_LIB_PDUMP
#ifdef RTE_NET_RING
{ "run_pdump_server_tests", test_pdump },
@@ -82,7 +83,9 @@ do_recursive_call(void)
{ "test_file_prefix", no_action },
{ "test_no_huge_flag", no_action },
#ifdef RTE_LIB_TIMER
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "timer_secondary_spawn_wait", test_timer_secondary },
+#endif
#endif
};
diff --git a/app/test/test_byteorder.c b/app/test/test_byteorder.c
index 03c08d9abf..de14ed539e 100644
--- a/app/test/test_byteorder.c
+++ b/app/test/test_byteorder.c
@@ -46,7 +46,7 @@ test_byteorder(void)
return -1;
res_u16 = rte_bswap16(0x1337);
- printf("const %"PRIx16" -> %"PRIx16"\n", 0x1337, res_u16);
+ printf("const %"PRIx16" -> %"PRIx16"\n", (uint16_t)0x1337, res_u16);
if (res_u16 != 0x3713)
return -1;
diff --git a/app/test/test_cmdline_ipaddr.c b/app/test/test_cmdline_ipaddr.c
index 2a1ee120fc..f540063508 100644
--- a/app/test/test_cmdline_ipaddr.c
+++ b/app/test/test_cmdline_ipaddr.c
@@ -1,12 +1,9 @@
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2010-2014 Intel Corporation
*/
-
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
-#include <netinet/in.h>
-#include <sys/socket.h>
#include <rte_string_fns.h>
@@ -15,7 +12,7 @@
#include "test_cmdline.h"
-#define IP4(a,b,c,d) {((uint32_t)(((a) & 0xff)) | \
+#define IP4(a,b,c,d) {.s_addr = (uint32_t)(((a) & 0xff) | \
(((b) & 0xff) << 8) | \
(((c) & 0xff) << 16) | \
((d) & 0xff) << 24)}
@@ -25,7 +22,11 @@
/* create IPv6 address, swapping bytes where needed */
#ifndef s6_addr16
-# define s6_addr16 __u6_addr.__u6_addr16
+#ifdef RTE_EXEC_ENV_WINDOWS
+#define s6_addr16 u.Word
+#else
+#define s6_addr16 __u6_addr.__u6_addr16
+#endif
#endif
#define IP6(a,b,c,d,e,f,g,h) .ipv6 = \
{.s6_addr16 = \
@@ -166,8 +167,6 @@ const char * ipaddr_garbage_network6_strs[] = {
};
#define IPv6_GARBAGE_PREFIX 64
-
-
const char * ipaddr_invalid_strs[] = {
/** IPv4 **/
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index f50ccdb599..fcd58cb76a 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
@@ -22,6 +21,12 @@
#include "test_cmdline.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
+#define NULL_INPUT "/dev/null"
+#else
+#define NULL_INPUT "NUL"
+#endif
+
/****************************************************************/
/* static functions required for some tests */
static void
@@ -156,10 +161,10 @@ test_cmdline_socket_fns(void)
cl = cmdline_stdin_new(&ctx, NULL);
if (cl != NULL)
goto error;
- cl = cmdline_file_new(NULL, "prompt", "/dev/null");
+ cl = cmdline_file_new(NULL, "prompt", NULL_INPUT);
if (cl != NULL)
goto error;
- cl = cmdline_file_new(&ctx, NULL, "/dev/null");
+ cl = cmdline_file_new(&ctx, NULL, NULL_INPUT);
if (cl != NULL)
goto error;
cl = cmdline_file_new(&ctx, "prompt", NULL);
@@ -171,7 +176,7 @@ test_cmdline_socket_fns(void)
cmdline_free(cl);
return -1;
}
- cl = cmdline_file_new(&ctx, "prompt", "/dev/null");
+ cl = cmdline_file_new(&ctx, "prompt", NULL_INPUT);
if (cl == NULL) {
printf("Error: failed to open /dev/null for reading!");
return -1;
diff --git a/app/test/test_crc.c b/app/test/test_crc.c
index bf1d344359..0ed080e482 100644
--- a/app/test/test_crc.c
+++ b/app/test/test_crc.c
@@ -14,7 +14,6 @@
#define CRC32_VEC_LEN2 348
#define CRC16_VEC_LEN1 12
#define CRC16_VEC_LEN2 2
-#define LINE_LEN 75
/* CRC test vector */
static const uint8_t crc_vec[CRC_VEC_LEN] = {
diff --git a/app/test/test_memcpy_perf.c b/app/test/test_memcpy_perf.c
index c711e36ba7..3727c160e6 100644
--- a/app/test/test_memcpy_perf.c
+++ b/app/test/test_memcpy_perf.c
@@ -6,10 +6,11 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include <sys/time.h>
+#include <time.h>
#include <rte_common.h>
#include <rte_cycles.h>
+#include <rte_os_shim.h>
#include <rte_random.h>
#include <rte_malloc.h>
@@ -271,7 +272,7 @@ static int
perf_test(void)
{
int ret;
- struct timeval tv_begin, tv_end;
+ struct timespec tv_begin, tv_end;
double time_aligned, time_unaligned;
double time_aligned_const, time_unaligned_const;
@@ -298,32 +299,32 @@ perf_test(void)
printf("\n================================= %2dB aligned =================================",
ALIGNMENT_UNIT);
/* Do aligned tests where size is a variable */
- gettimeofday(&tv_begin, NULL);
+ timespec_get(&tv_begin, TIME_UTC);
perf_test_variable_aligned();
- gettimeofday(&tv_end, NULL);
+ timespec_get(&tv_end, TIME_UTC);
time_aligned = (double)(tv_end.tv_sec - tv_begin.tv_sec)
- + ((double)tv_end.tv_usec - tv_begin.tv_usec)/1000000;
+ + ((double)tv_end.tv_nsec - tv_begin.tv_nsec) / NS_PER_S;
printf("\n------- ----------------- ----------------- ----------------- -----------------");
/* Do aligned tests where size is a compile-time constant */
- gettimeofday(&tv_begin, NULL);
+ timespec_get(&tv_begin, TIME_UTC);
perf_test_constant_aligned();
- gettimeofday(&tv_end, NULL);
+ timespec_get(&tv_end, TIME_UTC);
time_aligned_const = (double)(tv_end.tv_sec - tv_begin.tv_sec)
- + ((double)tv_end.tv_usec - tv_begin.tv_usec)/1000000;
+ + ((double)tv_end.tv_nsec - tv_begin.tv_nsec) / NS_PER_S;
printf("\n================================== Unaligned ==================================");
/* Do unaligned tests where size is a variable */
- gettimeofday(&tv_begin, NULL);
+ timespec_get(&tv_begin, TIME_UTC);
perf_test_variable_unaligned();
- gettimeofday(&tv_end, NULL);
+ timespec_get(&tv_end, TIME_UTC);
time_unaligned = (double)(tv_end.tv_sec - tv_begin.tv_sec)
- + ((double)tv_end.tv_usec - tv_begin.tv_usec)/1000000;
+ + ((double)tv_end.tv_nsec - tv_begin.tv_nsec) / NS_PER_S;
printf("\n------- ----------------- ----------------- ----------------- -----------------");
/* Do unaligned tests where size is a compile-time constant */
- gettimeofday(&tv_begin, NULL);
+ timespec_get(&tv_begin, TIME_UTC);
perf_test_constant_unaligned();
- gettimeofday(&tv_end, NULL);
+ timespec_get(&tv_end, TIME_UTC);
time_unaligned_const = (double)(tv_end.tv_sec - tv_begin.tv_sec)
- + ((double)tv_end.tv_usec - tv_begin.tv_usec)/1000000;
+ + ((double)tv_end.tv_nsec - tv_begin.tv_nsec) / NS_PER_S;
printf("\n======= ================= ================= ================= =================\n\n");
printf("Test Execution Time (seconds):\n");
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 0aa9dc1b1c..25611bfe9b 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -296,6 +296,7 @@ reset_count(void)
idle = 0;
}
+#ifndef RTE_EXEC_ENV_WINDOWS
static void
stats_display(uint16_t port_id)
{
@@ -325,6 +326,7 @@ signal_handler(int signum)
if (signum == SIGUSR2)
stats_display(0);
}
+#endif
struct rte_mbuf **tx_burst;
@@ -638,7 +640,7 @@ exec_burst(uint32_t flags, int lcore)
i = (i >= conf->nb_ports - 1) ? 0 : (i + 1);
}
- sleep(5);
+ rte_delay_us(5 * US_PER_S);
/* only when polling second */
if (flags == SC_BURST_XMIT_FIRST)
@@ -669,8 +671,10 @@ test_pmd_perf(void)
printf("Start PMD RXTX cycles cost test.\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
signal(SIGUSR1, signal_handler);
signal(SIGUSR2, signal_handler);
+#endif
nb_ports = rte_eth_dev_count_avail();
if (nb_ports < NB_ETHPORTS_USED) {
diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h
index 2825a9dce6..62f046a91a 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -360,7 +360,7 @@ test_mt1(int (*test)(void *))
/* signal worker to start test */
__atomic_store_n(&wrk_cmd, WRK_CMD_RUN, __ATOMIC_RELEASE);
- usleep(run_time * US_PER_S);
+ rte_delay_us(run_time * US_PER_S);
/* signal worker to start test */
__atomic_store_n(&wrk_cmd, WRK_CMD_STOP, __ATOMIC_RELEASE);
diff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c
index 18b93db8ef..73eee293a1 100644
--- a/app/test/test_telemetry_data.c
+++ b/app/test/test_telemetry_data.c
@@ -4,7 +4,9 @@
#include <string.h>
#include <sys/socket.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/un.h>
+#endif
#include <unistd.h>
#include <limits.h>
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v13 03/11] app/test: fix incorrect errno variable
2021-12-08 1:50 ` [PATCH v13 00/11] app/test: enable subset of tests on Windows Jie Zhou
2021-12-08 1:50 ` [PATCH v13 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-12-08 1:50 ` [PATCH v13 02/11] app/test: remove POSIX-specific code Jie Zhou
@ 2021-12-08 1:50 ` Jie Zhou
2021-12-08 1:50 ` [PATCH v13 04/11] app/test: skip interrupt tests on Windows Jie Zhou
` (8 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 1:50 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Fix incorrect errno variable used in memory autotest.
Use rte_errno instead.
Fixes: 086d426406bd ("app/test: fix memory autotests on FreeBSD")
Cc: bruce.richardson@intel.com
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/test_memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index dbf6871e71..140ac3f3cf 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -63,7 +63,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
/* we're able to get memseg fd - try getting its offset */
ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
if (ret < 0) {
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
return -1;
}
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v13 04/11] app/test: skip interrupt tests on Windows
2021-12-08 1:50 ` [PATCH v13 00/11] app/test: enable subset of tests on Windows Jie Zhou
` (2 preceding siblings ...)
2021-12-08 1:50 ` [PATCH v13 03/11] app/test: fix incorrect errno variable Jie Zhou
@ 2021-12-08 1:50 ` Jie Zhou
2021-12-08 1:50 ` [PATCH v13 05/11] app/test: skip two logs_autotest cases " Jie Zhou
` (7 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 1:50 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Even though test_interrupts.c can compile on Windows, skip interrupt
tests for now since majority of eal_interrupt on Windows are stubs.
Will remove the skip after interrupt being fully enabled on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/test_interrupts.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
index 2a05399f96..eec9b2805b 100644
--- a/app/test/test_interrupts.c
+++ b/app/test/test_interrupts.c
@@ -12,6 +12,15 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_interrupt(void)
+{
+ printf("Interrupt on Windows is not fully supported yet, skipping test\n");
+ return TEST_SKIPPED;
+}
+#else
+
#define TEST_INTERRUPT_CHECK_INTERVAL 100 /* ms */
/* predefined interrupt handle types */
@@ -590,5 +599,6 @@ test_interrupt(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v13 05/11] app/test: skip two logs_autotest cases on Windows
2021-12-08 1:50 ` [PATCH v13 00/11] app/test: enable subset of tests on Windows Jie Zhou
` (3 preceding siblings ...)
2021-12-08 1:50 ` [PATCH v13 04/11] app/test: skip interrupt tests on Windows Jie Zhou
@ 2021-12-08 1:50 ` Jie Zhou
2021-12-08 1:50 ` [PATCH v13 06/11] app/test: differentiate a strerror on different OS Jie Zhou
` (6 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 1:50 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
DPDK logs_autotest on Windows failed at "dynamic log types" tests.
The failures are on 2 test cases for rte_log_set_level_regexp API,
due to regular expression is not supported on Windows in DPDK yet
and regcomp/regexec are just stubs on Windows (in regex.h).
In app\test\test_logs.c, ifndef these two test cases, and for the
rte_log_set_level_pattern validation case following these two cases,
differentiate the expected log level passed into macro CHECK_LEVELS
Now logs_autotest completes for all dynamic log types and static log types.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/test_logs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/test/test_logs.c b/app/test/test_logs.c
index 7abb6eeca2..7c001c1ab3 100644
--- a/app/test/test_logs.c
+++ b/app/test/test_logs.c
@@ -113,6 +113,7 @@ test_logs(void)
rte_log_set_level(logtype1, RTE_LOG_ERR);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#ifndef RTE_EXEC_ENV_WINDOWS
rte_log_set_level_regexp("type$", RTE_LOG_EMERG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
@@ -121,7 +122,10 @@ test_logs(void)
rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_EMERG, RTE_LOG_EMERG);
-
+#else
+ ret = rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
+ CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#endif
/* set logtype level low to so we can test global level */
rte_log_set_level_pattern("logtype*", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_DEBUG, RTE_LOG_DEBUG, RTE_LOG_DEBUG);
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v13 06/11] app/test: differentiate a strerror on different OS
2021-12-08 1:50 ` [PATCH v13 00/11] app/test: enable subset of tests on Windows Jie Zhou
` (4 preceding siblings ...)
2021-12-08 1:50 ` [PATCH v13 05/11] app/test: skip two logs_autotest cases " Jie Zhou
@ 2021-12-08 1:50 ` Jie Zhou
2021-12-08 1:50 ` [PATCH v13 07/11] app/test: remove two alarm_autotest cases Jie Zhou
` (5 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 1:50 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
On Windows, strerror returns just "Unknown error" for errnum greater
than MAX_ERRNO, while linux and freebsd returns "Unknown error <num>",
which is the current expectation for errno_autotest. Differentiate
the error string on Windows to remove a "duplicate error code" failure.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_errno.c | 12 +++++++++++-
lib/eal/common/eal_common_errno.c | 4 ++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/app/test/test_errno.c b/app/test/test_errno.c
index 3ff0456a58..0db4fbc8b3 100644
--- a/app/test/test_errno.c
+++ b/app/test/test_errno.c
@@ -18,13 +18,19 @@ test_errno(void)
{
const char *rte_retval;
const char *libc_retval;
+
+#ifndef RTE_EXEC_ENV_WINDOWS
#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD has a colon in the string, unlike linux */
const char unknown_code_result[] = "Unknown error: %d";
#else
const char unknown_code_result[] = "Unknown error %d";
#endif
- char expected_libc_retval[sizeof(unknown_code_result)+3];
+ char expected_libc_retval[sizeof(unknown_code_result) + 3];
+#else
+ /* Windows doesn't return error number for error greater than MAX_errno*/
+ static const char expected_libc_retval[] = "Unknown error";
+#endif
/* use a small selection of standard errors for testing */
int std_errs[] = {EAGAIN, EBADF, EACCES, EINTR, EINVAL};
@@ -54,11 +60,13 @@ test_errno(void)
rte_retval, libc_retval);
if (strcmp(rte_retval, libc_retval) == 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
/* generate appropriate error string for unknown error number
* and then check that this is what we got back. If not, we have
* a duplicate error number that conflicts with errno.h */
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, rte_errs[i]);
+#endif
if ((strcmp(expected_libc_retval, libc_retval) != 0) &&
(strcmp("", libc_retval) != 0)){
printf("Error, duplicate error code %d\n", rte_errs[i]);
@@ -69,8 +77,10 @@ test_errno(void)
/* ensure that beyond RTE_MAX_ERRNO, we always get an unknown code */
rte_retval = rte_strerror(RTE_MAX_ERRNO + 1);
libc_retval = strerror(RTE_MAX_ERRNO + 1);
+#ifndef RTE_EXEC_ENV_WINDOWS
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, RTE_MAX_ERRNO + 1);
+#endif
printf("rte_strerror: '%s', strerror: '%s'\n",
rte_retval, libc_retval);
if ((strcmp(rte_retval, libc_retval) != 0) ||
diff --git a/lib/eal/common/eal_common_errno.c b/lib/eal/common/eal_common_errno.c
index f86802705a..7507c746ec 100644
--- a/lib/eal/common/eal_common_errno.c
+++ b/lib/eal/common/eal_common_errno.c
@@ -37,7 +37,11 @@ rte_strerror(int errnum)
/* since some implementations of strerror_r throw an error
* themselves if errnum is too big, we handle that case here */
if (errnum >= RTE_MAX_ERRNO)
+#ifdef RTE_EXEC_ENV_WINDOWS
+ snprintf(ret, RETVAL_SZ, "Unknown error");
+#else
snprintf(ret, RETVAL_SZ, "Unknown error%s %d", sep, errnum);
+#endif
else
switch (errnum){
case E_RTE_SECONDARY:
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v13 07/11] app/test: remove two alarm_autotest cases
2021-12-08 1:50 ` [PATCH v13 00/11] app/test: enable subset of tests on Windows Jie Zhou
` (5 preceding siblings ...)
2021-12-08 1:50 ` [PATCH v13 06/11] app/test: differentiate a strerror on different OS Jie Zhou
@ 2021-12-08 1:50 ` Jie Zhou
2021-12-08 1:50 ` [PATCH v13 08/11] app/test: resolve name collision Jie Zhou
` (4 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 1:50 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Remove two alarm_autotest test cases which do bogus range check
on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/test_alarm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_alarm.c b/app/test/test_alarm.c
index b4034339b8..70e97a3109 100644
--- a/app/test/test_alarm.c
+++ b/app/test/test_alarm.c
@@ -10,6 +10,7 @@
#include "test.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
static volatile int flag;
static void
@@ -18,6 +19,7 @@ test_alarm_callback(void *cb_arg)
flag = 1;
printf("Callback setting flag - OK. [cb_arg = %p]\n", cb_arg);
}
+#endif
static int
test_alarm(void)
@@ -27,6 +29,7 @@ test_alarm(void)
return 0;
#endif
+#ifndef RTE_EXEC_ENV_WINDOWS
/* check if it will fail to set alarm with wrong us value */
printf("check if it will fail to set alarm with wrong ms values\n");
if (rte_eal_alarm_set(0, test_alarm_callback,
@@ -39,6 +42,7 @@ test_alarm(void)
printf("should not be successful with (UINT64_MAX-1) us value\n");
return -1;
}
+#endif
/* check if it will fail to set alarm with null callback parameter */
printf("check if it will fail to set alarm with null callback parameter\n");
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v13 08/11] app/test: resolve name collision
2021-12-08 1:50 ` [PATCH v13 00/11] app/test: enable subset of tests on Windows Jie Zhou
` (6 preceding siblings ...)
2021-12-08 1:50 ` [PATCH v13 07/11] app/test: remove two alarm_autotest cases Jie Zhou
@ 2021-12-08 1:50 ` Jie Zhou
2021-12-08 1:51 ` [PATCH v13 09/11] app/test: add test stubs for not supported ones Jie Zhou
` (3 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 1:50 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Add OP_ prefix to resolve name collision to enable hash_perf test
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/test_hash_perf.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/app/test/test_hash_perf.c b/app/test/test_hash_perf.c
index 76cdac5d53..7e98ec3964 100644
--- a/app/test/test_hash_perf.c
+++ b/app/test/test_hash_perf.c
@@ -30,10 +30,10 @@
#define BURST_SIZE 16
enum operations {
- ADD = 0,
- LOOKUP,
- LOOKUP_MULTI,
- DELETE,
+ OP_ADD = 0,
+ OP_LOOKUP,
+ OP_LOOKUP_MULTI,
+ OP_DELETE,
NUM_OPERATIONS
};
@@ -308,7 +308,7 @@ timed_adds(unsigned int with_hash, unsigned int with_data,
const uint64_t end_tsc = rte_rdtsc();
const uint64_t time_taken = end_tsc - start_tsc;
- cycles[table_index][ADD][with_hash][with_data] = time_taken/keys_to_add;
+ cycles[table_index][OP_ADD][with_hash][with_data] = time_taken/keys_to_add;
return 0;
}
@@ -385,7 +385,7 @@ timed_lookups(unsigned int with_hash, unsigned int with_data,
const uint64_t end_tsc = rte_rdtsc();
const uint64_t time_taken = end_tsc - start_tsc;
- cycles[table_index][LOOKUP][with_hash][with_data] = time_taken/num_lookups;
+ cycles[table_index][OP_LOOKUP][with_hash][with_data] = time_taken/num_lookups;
return 0;
}
@@ -511,7 +511,7 @@ timed_lookups_multi(unsigned int with_hash, unsigned int with_data,
const uint64_t end_tsc = rte_rdtsc();
const uint64_t time_taken = end_tsc - start_tsc;
- cycles[table_index][LOOKUP_MULTI][with_hash][with_data] =
+ cycles[table_index][OP_LOOKUP_MULTI][with_hash][with_data] =
time_taken/num_lookups;
return 0;
@@ -550,7 +550,7 @@ timed_deletes(unsigned int with_hash, unsigned int with_data,
const uint64_t end_tsc = rte_rdtsc();
const uint64_t time_taken = end_tsc - start_tsc;
- cycles[table_index][DELETE][with_hash][with_data] = time_taken/keys_to_add;
+ cycles[table_index][OP_DELETE][with_hash][with_data] = time_taken/keys_to_add;
return 0;
}
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v13 09/11] app/test: add test stubs for not supported ones
2021-12-08 1:50 ` [PATCH v13 00/11] app/test: enable subset of tests on Windows Jie Zhou
` (7 preceding siblings ...)
2021-12-08 1:50 ` [PATCH v13 08/11] app/test: resolve name collision Jie Zhou
@ 2021-12-08 1:51 ` Jie Zhou
2021-12-08 1:51 ` [PATCH v13 10/11] app/test: replace .sh script with .py script Jie Zhou
` (2 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 1:51 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Add test stubs for tests which are not yet supported for Windows:
- The libraries the 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>
---
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 | 12 ++++
app/test/test_graph.c | 18 ++++-
app/test/test_graph_perf.c | 16 ++++-
app/test/test_hash_perf.c | 12 ++++
app/test/test_ipfrag.c | 16 ++++-
app/test/test_ipsec.c | 15 +++-
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 | 12 ++++
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 | 12 ++++
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 | 4 +-
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, 880 insertions(+), 72 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 <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 /*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 46bcb51f86..055df252ba 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -14,11 +14,22 @@
#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 +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 10b48cdadb..f83c844e42 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 <time.h>
#include <rte_common.h>
@@ -15739,3 +15741,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 9d19a6d6d9..680ced4dbe 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 <rte_bus_vdev.h>
#include <rte_common.h>
#include <rte_hexdump.h>
@@ -2429,3 +2431,5 @@ REGISTER_TEST_COMMAND(cryptodev_octeontx2_asym_autotest,
test_cryptodev_octeontx2_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 <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 /*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 <rte_common.h>
#include <rte_cryptodev.h>
#include <rte_esp.h>
@@ -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 <time.h>
#include <rte_common.h>
@@ -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 <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 /*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 <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 @@ 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 <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 /*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 <string.h>
#include <stdarg.h>
+
+#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 <libgen.h>
#include <stdlib.h>
#include <errno.h>
@@ -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 <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 /*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 <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 /*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..8f5fd78723 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 <string.h>
#include <rte_common.h>
#include <rte_mempool.h>
#include <rte_mbuf.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_cryptodev.h>
#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 /*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 <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 /*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 <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 /*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 <math.h>
@@ -10,6 +11,17 @@
#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 +33,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 +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 843d9766b0..fee2ecaa22 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 <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
@@ -1048,7 +1058,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);
@@ -1058,3 +1072,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 <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 +33,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 +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 <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 /*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 <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 /*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 <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);
diff --git a/app/test/test_fib_perf.c b/app/test/test_fib_perf.c
index 86b2f832b8..ec7f20e102 100644
--- a/app/test/test_fib_perf.c
+++ b/app/test/test_fib_perf.c
@@ -12,11 +12,22 @@
#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 /*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 <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 /*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..2924308dda 100644
--- a/app/test/test_func_reentrancy.c
+++ b/app/test/test_func_reentrancy.c
@@ -40,6 +40,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_func_reentrancy(void)
+{
+ printf("reentrancy not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
typedef int (*case_func_t)(void* arg);
typedef void (*case_clean_t)(unsigned lcore_id);
@@ -511,4 +521,6 @@ test_func_reentrancy(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(func_reentrancy_autotest, test_func_reentrancy);
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 <assert.h>
#include <inttypes.h>
#include <signal.h>
@@ -9,14 +11,23 @@
#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 +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 <inttypes.h>
#include <signal.h>
#include <stdio.h>
@@ -9,14 +11,22 @@
#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 +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..a3e9f43967 100644
--- a/app/test/test_hash_perf.c
+++ b/app/test/test_hash_perf.c
@@ -17,6 +17,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_hash_perf(void)
+{
+ printf("hash_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ENTRIES (1 << 19)
#define KEYS_TO_ADD (MAX_ENTRIES)
#define ADD_PERCENT 0.75 /* 75% table utilization */
@@ -749,4 +759,6 @@ test_hash_perf(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(hash_perf_autotest, test_hash_perf);
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 <time.h>
@@ -8,13 +9,22 @@
#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 +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..ed4d166f0d 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 <time.h>
@@ -13,15 +14,25 @@
#include <rte_bus_vdev.h>
#include <rte_ip.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_crypto.h>
#include <rte_cryptodev.h>
#include <rte_lcore.h>
+
#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 /*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 <stdio.h>
#include <rte_ip.h>
@@ -8,10 +9,20 @@
#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 +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 <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 +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 40ab0d5c4c..8f4e92f6ca 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 <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>
diff --git a/app/test/test_lcores.c b/app/test/test_lcores.c
index 35c47d5372..2277ae597f 100644
--- a/app/test/test_lcores.c
+++ b/app/test/test_lcores.c
@@ -11,6 +11,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_lcores(void)
+{
+ printf("lcore not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
struct thread_context {
enum { INIT, ERROR, DONE } state;
bool lcore_id_any;
@@ -411,4 +421,6 @@ test_lcores(void)
return TEST_SUCCESS;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(lcores_autotest, test_lcores);
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 <stdio.h>
#include <stdint.h>
@@ -10,7 +21,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 +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 <stdio.h>
#include <stdint.h>
@@ -8,9 +9,18 @@
#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 +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 <stdio.h>
#include <stdint.h>
@@ -12,7 +23,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 +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 <stdio.h>
#include <stdint.h>
#include <stdlib.h>
@@ -15,7 +25,6 @@
#include <rte_ip.h>
#include <rte_lpm.h>
-#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 <stdio.h>
#include <stdint.h>
@@ -8,7 +9,9 @@
#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>
@@ -23,11 +26,8 @@
#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 +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 <string.h>
#include <stdarg.h>
@@ -33,8 +34,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 +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 <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 /*!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 40aa4c8627..85f3a126b9 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 <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 +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 <stdio.h>
#include <inttypes.h>
@@ -11,9 +12,18 @@
#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 +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 <rte_os_shim.h>
#include <rte_random.h>
#include <rte_malloc.h>
-
#include <rte_memcpy.h>
#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 <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 /*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 <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -12,8 +38,6 @@
#include <time.h>
#include <math.h>
-#include "test.h"
-
#include <rte_pie.h>
#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 <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 /*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..9209fb2658 100644
--- a/app/test/test_rcu_qsbr_perf.c
+++ b/app/test/test_rcu_qsbr_perf.c
@@ -15,6 +15,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_rcu_qsbr_main(void)
+{
+ printf("rcu_qsbr_main not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
/* Check condition and return an error if true. */
static uint16_t enabled_core_ids[RTE_MAX_LCORE];
static unsigned int num_cores;
@@ -687,4 +697,6 @@ test_rcu_qsbr_main(void)
return -1;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
diff --git a/app/test/test_red.c b/app/test/test_red.c
index 05936cfee8..524f9c9b6d 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 <stdlib.h>
#include <stdio.h>
@@ -8,12 +9,34 @@
#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 +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 <stdio.h>
#include <unistd.h>
@@ -9,12 +10,20 @@
#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 +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 <medvedkinv@gmail.com>
* 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 +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 <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,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 <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 +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 060cf1ffa8..6c1d8602d2 100644
--- a/app/test/test_security.c
+++ b/app/test/test_security.c
@@ -1,12 +1,14 @@
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
*/
+#include "test.h"
#include <rte_errno.h>
#include <rte_log.h>
#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_ether.h>
+
#include <rte_security.h>
#include <rte_security_driver.h>
@@ -20,7 +22,7 @@
#endif
#include <rte_test.h>
-#include "test.h"
+
/**
* Security
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 <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 +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 <rte_ip.h>
#include <rte_string_fns.h>
#include <rte_hexdump.h>
@@ -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 <string.h>
#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 aabf4375db..45dc7682d8 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 <string.h>
#include <rte_pipeline.h>
#include <rte_log.h>
@@ -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 <string.h>
#include <rte_byteorder.h>
#include <rte_table_lpm_ipv6.h>
@@ -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 <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 +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.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v13 10/11] app/test: replace .sh script with .py script
2021-12-08 1:50 ` [PATCH v13 00/11] app/test: enable subset of tests on Windows Jie Zhou
` (8 preceding siblings ...)
2021-12-08 1:51 ` [PATCH v13 09/11] app/test: add test stubs for not supported ones Jie Zhou
@ 2021-12-08 1:51 ` Jie Zhou
2021-12-08 1:51 ` [PATCH v13 11/11] app/test: enable unit test on Windows Jie Zhou
2021-12-08 18:59 ` [PATCH v14 00/11] app/test: enable subset of tests " Jie Zhou
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 1:51 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
- Add python script to check if system supports hugepages
- Remove corresponding .sh script
- Replace calling of .sh with corresponding .py in meson.build
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/has-hugepage.sh | 11 -----------
app/test/has_hugepage.py | 26 ++++++++++++++++++++++++++
app/test/meson.build | 2 +-
3 files changed, 27 insertions(+), 12 deletions(-)
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh
deleted file mode 100755
index d600fad319..0000000000
--- a/app/test/has-hugepage.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright 2020 Mellanox Technologies, Ltd
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /proc/sys/vm/nr_hugepages || echo 0
-elif [ "$(uname)" = "FreeBSD" ] ; then
- echo 1 # assume FreeBSD always has hugepages
-else
- echo 0
-fi
diff --git a/app/test/has_hugepage.py b/app/test/has_hugepage.py
new file mode 100644
index 0000000000..f8e7087d1c
--- /dev/null
+++ b/app/test/has_hugepage.py
@@ -0,0 +1,26 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2021 Microsoft Corporation
+"""This script checks if the system supports huge pages"""
+
+import platform
+import ctypes
+
+os_name = platform.system()
+if os_name == "Linux":
+ try:
+ with open("/proc/sys/vm/nr_hugepages") as file_o:
+ content = file_o.read()
+ print(content)
+ except:
+ print("0")
+
+elif os_name == "FreeBSD":
+ # Assume FreeBSD always has hugepages enabled
+ print("1")
+elif os_name == "Windows":
+ if ctypes.windll.kernel32.GetLargePageMinimum() > 0:
+ print("1")
+ else:
+ print("0")
+else:
+ print("0")
diff --git a/app/test/meson.build b/app/test/meson.build
index 2b480adfba..97ee83029e 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -492,7 +492,7 @@ dpdk_test = executable('dpdk-test',
driver_install_path),
install: true)
-has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
+has_hugepage = run_command(py3, 'has_hugepage.py').stdout().strip() != '0'
message('hugepage availability: @0@'.format(has_hugepage))
# some perf tests (eg: memcpy perf autotest)take very long
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v13 11/11] app/test: enable unit test on Windows
2021-12-08 1:50 ` [PATCH v13 00/11] app/test: enable subset of tests on Windows Jie Zhou
` (9 preceding siblings ...)
2021-12-08 1:51 ` [PATCH v13 10/11] app/test: replace .sh script with .py script Jie Zhou
@ 2021-12-08 1:51 ` Jie Zhou
2021-12-08 16:57 ` Bruce Richardson
2021-12-08 18:59 ` [PATCH v14 00/11] app/test: enable subset of tests " Jie Zhou
11 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 1:51 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Enable a subset of unit tests for Windows CI
- For driver tests, driver owners should enable corresponding tests when
enabling driver for Windows. For example, the cryptodev tests will be
enabled by "patch-18949: app/test: enable crypto unit tests on Windows"
(which depends on this patchset to be merged).
- For dump tests, currently the tests hang on Windows which require
further investigation.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/meson.build | 111 ++++++++++++++++++++++---------------------
1 file changed, 58 insertions(+), 53 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index 97ee83029e..fcf38729e7 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,12 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if is_windows
- build = false
- reason = 'not supported on Windows'
- subdir_done()
-endif
-
if not get_option('tests')
subdir_done()
endif
@@ -158,32 +152,14 @@ test_sources = files(
)
test_deps = [
- 'acl',
'bus_pci',
'bus_vdev',
- 'bpf',
'cfgfile',
'cmdline',
- 'cryptodev',
- 'distributor',
'dmadev',
- 'efd',
'ethdev',
- 'eventdev',
- 'fib',
- 'flow_classify',
- 'graph',
'hash',
- 'ipsec',
- 'lpm',
- 'member',
- 'node',
- 'pipeline',
- 'port',
- 'rawdev',
'rcu',
- 'reorder',
- 'rib',
'ring',
'security',
'stack',
@@ -334,39 +310,68 @@ perf_test_names = [
]
driver_test_names = [
- 'cryptodev_aesni_mb_autotest',
- 'cryptodev_aesni_gcm_autotest',
- 'cryptodev_cn9k_autotest',
- 'cryptodev_cn10k_autotest',
- 'cryptodev_dpaa_sec_autotest',
- 'cryptodev_dpaa2_sec_autotest',
- 'cryptodev_null_autotest',
- 'cryptodev_octeontx2_autotest',
- 'cryptodev_openssl_autotest',
- 'cryptodev_openssl_asym_autotest',
- 'cryptodev_qat_autotest',
- 'cryptodev_sw_armv8_autotest',
- 'cryptodev_sw_kasumi_autotest',
- 'cryptodev_sw_mvsam_autotest',
- 'cryptodev_sw_snow3g_autotest',
- 'cryptodev_sw_zuc_autotest',
- 'dmadev_autotest',
- 'eventdev_selftest_octeontx',
- 'eventdev_selftest_sw',
- 'rawdev_autotest',
]
dump_test_names = [
- 'dump_struct_sizes',
- 'dump_mempool',
- 'dump_malloc_stats',
- 'dump_devargs',
- 'dump_log_types',
- 'dump_ring',
- 'dump_physmem',
- 'dump_memzone',
]
+if not is_windows
+ test_deps += [
+ 'acl',
+ 'bpf',
+ 'cryptodev',
+ 'distributor',
+ 'efd',
+ 'eventdev',
+ 'fib',
+ 'flow_classify',
+ 'graph',
+ 'ipsec',
+ 'lpm',
+ 'member',
+ 'node',
+ 'pipeline',
+ 'port',
+ 'rawdev',
+ 'reorder',
+ 'rib',
+ ]
+
+ driver_test_names += [
+ 'cryptodev_aesni_mb_autotest',
+ 'cryptodev_aesni_gcm_autotest',
+ 'cryptodev_cn9k_autotest',
+ 'cryptodev_cn10k_autotest',
+ 'cryptodev_dpaa_sec_autotest',
+ 'cryptodev_dpaa2_sec_autotest',
+ 'cryptodev_null_autotest',
+ 'cryptodev_octeontx2_autotest',
+ 'cryptodev_openssl_autotest',
+ 'cryptodev_openssl_asym_autotest',
+ 'cryptodev_qat_autotest',
+ 'cryptodev_sw_armv8_autotest',
+ 'cryptodev_sw_kasumi_autotest',
+ 'cryptodev_sw_mvsam_autotest',
+ 'cryptodev_sw_snow3g_autotest',
+ 'cryptodev_sw_zuc_autotest',
+ 'dmadev_autotest',
+ 'eventdev_selftest_octeontx',
+ 'eventdev_selftest_sw',
+ 'rawdev_autotest',
+ ]
+
+ dump_test_names += [
+ 'dump_struct_sizes',
+ 'dump_mempool',
+ 'dump_malloc_stats',
+ 'dump_devargs',
+ 'dump_log_types',
+ 'dump_ring',
+ 'dump_physmem',
+ 'dump_memzone',
+ ]
+endif
+
# The following linkages are an exception to allow running the
# unit tests without requiring that the developer install the
# DPDK libraries. Explicit linkage of drivers (plugin libraries)
@@ -385,7 +390,7 @@ if dpdk_conf.has('RTE_LIB_METRICS')
test_sources += ['test_metrics.c']
fast_tests += [['metrics_autotest', true]]
endif
-if dpdk_conf.has('RTE_LIB_TELEMETRY')
+if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
endif
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v13 11/11] app/test: enable unit test on Windows
2021-12-08 1:51 ` [PATCH v13 11/11] app/test: enable unit test on Windows Jie Zhou
@ 2021-12-08 16:57 ` Bruce Richardson
2021-12-08 18:19 ` Jie Zhou
0 siblings, 1 reply; 245+ messages in thread
From: Bruce Richardson @ 2021-12-08 16:57 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
On Tue, Dec 07, 2021 at 05:51:02PM -0800, Jie Zhou wrote:
> Enable a subset of unit tests for Windows CI
>
> - For driver tests, driver owners should enable corresponding tests when
> enabling driver for Windows. For example, the cryptodev tests will be
> enabled by "patch-18949: app/test: enable crypto unit tests on Windows"
> (which depends on this patchset to be merged).
> - For dump tests, currently the tests hang on Windows which require
> further investigation.
>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
>
Mostly these changes look ok to me. One small query below.
/Bruce
> ---
> app/test/meson.build | 111 ++++++++++++++++++++++---------------------
> 1 file changed, 58 insertions(+), 53 deletions(-)
>
> diff --git a/app/test/meson.build b/app/test/meson.build
> index 97ee83029e..fcf38729e7 100644
> --- a/app/test/meson.build
> +++ b/app/test/meson.build
> @@ -1,12 +1,6 @@
> # SPDX-License-Identifier: BSD-3-Clause
> # Copyright(c) 2017 Intel Corporation
>
> -if is_windows
> - build = false
<snip>
> # The following linkages are an exception to allow running the
> # unit tests without requiring that the developer install the
> # DPDK libraries. Explicit linkage of drivers (plugin libraries)
> @@ -385,7 +390,7 @@ if dpdk_conf.has('RTE_LIB_METRICS')
> test_sources += ['test_metrics.c']
> fast_tests += [['metrics_autotest', true]]
> endif
> -if dpdk_conf.has('RTE_LIB_TELEMETRY')
> +if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
> test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
> fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
If telemetry is enabled, is there a reason these won't run on Windows?
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v13 11/11] app/test: enable unit test on Windows
2021-12-08 16:57 ` Bruce Richardson
@ 2021-12-08 18:19 ` Jie Zhou
2021-12-08 18:23 ` Bruce Richardson
0 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 18:19 UTC (permalink / raw)
To: Bruce Richardson
Cc: dev, dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
On Wed, Dec 08, 2021 at 04:57:52PM +0000, Bruce Richardson wrote:
> On Tue, Dec 07, 2021 at 05:51:02PM -0800, Jie Zhou wrote:
> > Enable a subset of unit tests for Windows CI
> >
> > - For driver tests, driver owners should enable corresponding tests when
> > enabling driver for Windows. For example, the cryptodev tests will be
> > enabled by "patch-18949: app/test: enable crypto unit tests on Windows"
> > (which depends on this patchset to be merged).
> > - For dump tests, currently the tests hang on Windows which require
> > further investigation.
> >
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> >
>
> Mostly these changes look ok to me. One small query below.
>
> /Bruce
> > ---
> > app/test/meson.build | 111 ++++++++++++++++++++++---------------------
> > 1 file changed, 58 insertions(+), 53 deletions(-)
> >
> > diff --git a/app/test/meson.build b/app/test/meson.build
> > index 97ee83029e..fcf38729e7 100644
> > --- a/app/test/meson.build
> > +++ b/app/test/meson.build
> > @@ -1,12 +1,6 @@
> > # SPDX-License-Identifier: BSD-3-Clause
> > # Copyright(c) 2017 Intel Corporation
> >
> > -if is_windows
> > - build = false
>
> <snip>
>
> > # The following linkages are an exception to allow running the
> > # unit tests without requiring that the developer install the
> > # DPDK libraries. Explicit linkage of drivers (plugin libraries)
> > @@ -385,7 +390,7 @@ if dpdk_conf.has('RTE_LIB_METRICS')
> > test_sources += ['test_metrics.c']
> > fast_tests += [['metrics_autotest', true]]
> > endif
> > -if dpdk_conf.has('RTE_LIB_TELEMETRY')
> > +if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
> > test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
> > fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
>
> If telemetry is enabled, is there a reason these won't run on Windows?
Hi Bruce, the telemetry test has many POSIX socket specific codes which requires replacement for Windows. We will work on investigation of enabling more tests (including the telemetry tests) after this patchset. Sorry I forgot to mention that in the commit message, but it is on my list. The current goal is to get this patchset merged asap before another upstream churn to rebase, rework, etc. If you prefer me to send out a V14 to add this info into commit message or remove this change from meson.build but add test stub into the specific test files, please just let me know. Thanks for your understanding. -- Jie
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v13 11/11] app/test: enable unit test on Windows
2021-12-08 18:19 ` Jie Zhou
@ 2021-12-08 18:23 ` Bruce Richardson
2021-12-08 18:29 ` Jie Zhou
0 siblings, 1 reply; 245+ messages in thread
From: Bruce Richardson @ 2021-12-08 18:23 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
On Wed, Dec 08, 2021 at 10:19:27AM -0800, Jie Zhou wrote:
> On Wed, Dec 08, 2021 at 04:57:52PM +0000, Bruce Richardson wrote:
> > On Tue, Dec 07, 2021 at 05:51:02PM -0800, Jie Zhou wrote:
> > > Enable a subset of unit tests for Windows CI
> > >
> > > - For driver tests, driver owners should enable corresponding tests when
> > > enabling driver for Windows. For example, the cryptodev tests will be
> > > enabled by "patch-18949: app/test: enable crypto unit tests on Windows"
> > > (which depends on this patchset to be merged).
> > > - For dump tests, currently the tests hang on Windows which require
> > > further investigation.
> > >
> > > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > >
> >
> > Mostly these changes look ok to me. One small query below.
> >
> > /Bruce
> > > ---
> > > app/test/meson.build | 111 ++++++++++++++++++++++---------------------
> > > 1 file changed, 58 insertions(+), 53 deletions(-)
> > >
> > > diff --git a/app/test/meson.build b/app/test/meson.build
> > > index 97ee83029e..fcf38729e7 100644
> > > --- a/app/test/meson.build
> > > +++ b/app/test/meson.build
> > > @@ -1,12 +1,6 @@
> > > # SPDX-License-Identifier: BSD-3-Clause
> > > # Copyright(c) 2017 Intel Corporation
> > >
> > > -if is_windows
> > > - build = false
> >
> > <snip>
> >
> > > # The following linkages are an exception to allow running the
> > > # unit tests without requiring that the developer install the
> > > # DPDK libraries. Explicit linkage of drivers (plugin libraries)
> > > @@ -385,7 +390,7 @@ if dpdk_conf.has('RTE_LIB_METRICS')
> > > test_sources += ['test_metrics.c']
> > > fast_tests += [['metrics_autotest', true]]
> > > endif
> > > -if dpdk_conf.has('RTE_LIB_TELEMETRY')
> > > +if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
> > > test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
> > > fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
> >
> > If telemetry is enabled, is there a reason these won't run on Windows?
>
> Hi Bruce, the telemetry test has many POSIX socket specific codes which requires replacement for Windows. We will work on investigation of enabling more tests (including the telemetry tests) after this patchset. Sorry I forgot to mention that in the commit message, but it is on my list. The current goal is to get this patchset merged asap before another upstream churn to rebase, rework, etc. If you prefer me to send out a V14 to add this info into commit message or remove this change from meson.build but add test stub into the specific test files, please just let me know. Thanks for your understanding. -- Jie
A line to two added to the commit log is probably sufficient.
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v13 11/11] app/test: enable unit test on Windows
2021-12-08 18:23 ` Bruce Richardson
@ 2021-12-08 18:29 ` Jie Zhou
0 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 18:29 UTC (permalink / raw)
To: Bruce Richardson
Cc: dev, dmitry.kozliuk, roretzla, navasile, dmitrym, pallavi.kadam,
talshn, thomas, aconole
On Wed, Dec 08, 2021 at 06:23:30PM +0000, Bruce Richardson wrote:
> On Wed, Dec 08, 2021 at 10:19:27AM -0800, Jie Zhou wrote:
> > On Wed, Dec 08, 2021 at 04:57:52PM +0000, Bruce Richardson wrote:
> > > On Tue, Dec 07, 2021 at 05:51:02PM -0800, Jie Zhou wrote:
> > > > Enable a subset of unit tests for Windows CI
> > > >
> > > > - For driver tests, driver owners should enable corresponding tests when
> > > > enabling driver for Windows. For example, the cryptodev tests will be
> > > > enabled by "patch-18949: app/test: enable crypto unit tests on Windows"
> > > > (which depends on this patchset to be merged).
> > > > - For dump tests, currently the tests hang on Windows which require
> > > > further investigation.
> > > >
> > > > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > > >
> > >
> > > Mostly these changes look ok to me. One small query below.
> > >
> > > /Bruce
> > > > ---
> > > > app/test/meson.build | 111 ++++++++++++++++++++++---------------------
> > > > 1 file changed, 58 insertions(+), 53 deletions(-)
> > > >
> > > > diff --git a/app/test/meson.build b/app/test/meson.build
> > > > index 97ee83029e..fcf38729e7 100644
> > > > --- a/app/test/meson.build
> > > > +++ b/app/test/meson.build
> > > > @@ -1,12 +1,6 @@
> > > > # SPDX-License-Identifier: BSD-3-Clause
> > > > # Copyright(c) 2017 Intel Corporation
> > > >
> > > > -if is_windows
> > > > - build = false
> > >
> > > <snip>
> > >
> > > > # The following linkages are an exception to allow running the
> > > > # unit tests without requiring that the developer install the
> > > > # DPDK libraries. Explicit linkage of drivers (plugin libraries)
> > > > @@ -385,7 +390,7 @@ if dpdk_conf.has('RTE_LIB_METRICS')
> > > > test_sources += ['test_metrics.c']
> > > > fast_tests += [['metrics_autotest', true]]
> > > > endif
> > > > -if dpdk_conf.has('RTE_LIB_TELEMETRY')
> > > > +if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
> > > > test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
> > > > fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
> > >
> > > If telemetry is enabled, is there a reason these won't run on Windows?
> >
> > Hi Bruce, the telemetry test has many POSIX socket specific codes which requires replacement for Windows. We will work on investigation of enabling more tests (including the telemetry tests) after this patchset. Sorry I forgot to mention that in the commit message, but it is on my list. The current goal is to get this patchset merged asap before another upstream churn to rebase, rework, etc. If you prefer me to send out a V14 to add this info into commit message or remove this change from meson.build but add test stub into the specific test files, please just let me know. Thanks for your understanding. -- Jie
>
> A line to two added to the commit log is probably sufficient.
>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Thanks Bruce. Will add the info into commit message in V14.
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v14 00/11] app/test: enable subset of tests on Windows
2021-12-08 1:50 ` [PATCH v13 00/11] app/test: enable subset of tests on Windows Jie Zhou
` (10 preceding siblings ...)
2021-12-08 1:51 ` [PATCH v13 11/11] app/test: enable unit test on Windows Jie Zhou
@ 2021-12-08 18:59 ` Jie Zhou
2021-12-08 18:59 ` [PATCH v14 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
` (12 more replies)
11 siblings, 13 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 18:59 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
The goal of this patchset is to enable unit tests in CI for Windows.
It mainly contains:
- Replace POSIX specific codes
- Fix some lib and tests per failures investigation
- Add test stubs for not yet supported ones on Windows
- Replace .sh script with .py script for meson.build
- Enable build and run subset of unit tests on Windows
Future work:
- Work with CI lab to onboard unit tests for Windows to catch regression
- Investigate issues hit at CI onboarding
- Enable more tests
---
V2 changes:
- Fix compilation error on FreeBSD
- Fix email mismatch issue
- Add a missing space around "*"
---
V3 changes:
- Fix a misc c coding style issue
- Revise some commit title and message body
- Fix violations of PEP8 in new added Python scripts
- Add error handling in get_coremask.py
- Fix has_hugepage.py to check system support of hugepages
instead of checking privileges
- Fix test meson.build to run Python scripts using py3
- Consolidate lists of source files, test dep, etc. across all
platforms, with conditional extending on some platform(s)
---
V4 changes:
- Remove building of ip_frag, rib, and reorder libraries on Windows.
These three libs usually can be built on Windows without change.
However, in between the time of V3 and V4, there is regression in
upstream caused build failures of these three libs. Will separately
investigate and enable these libraries.
- Remove previous patch#2 (Enable mempool/stack on Windows) from this
patchset as it was separated out and merged as patch-19314.
- Consolidate the source files, deps, tests lists across platforms as
much as possible.
---
V5 changes:
- Remove a space between function name and open parenthesis '('
- Add back a header mistakenly deleted
---
V6 changes:
- Fix inconsistent static vs. non-static declarations
---
V7 changes:
- Remove get_coremask.py as it is not needed any more in meson.build
- Remove enablement of efd and lpm and their corresponding unit tests.
The enablement of these two libs and their UTs will be in separate
patches after this patch set.
V8 changes:
- Fix coding style issue of using C99 // comments
---
V9 changes:
- Fix has_hugepage.py with adding failure handling on Linux, using
proper variable name to follow Python convention, and removing
unnecessary comment.
- Enable previously skipped test_cmdline_socket_fns test cases
- Revise title and message, and add Fixes info for current Patch#3
- Combine 2 patches (previous #2 and #3 in V8) into one and with
more detailed message
---
V10 changes:
- Fix indentation
---
V11 changes:
- Remove mandatory dependency on bitratestats, latencystats,
and metrics libs in test meson.build, which was reintroduced
at rebase in V9.
---
V12 changes:
- Remove unnecessary print of a null string
- Enable several previous disabled tests
- Split Patch#9 in V11 into two patches for better structure
- Reorder some of the patches for better structure
- Document more details in commit message for issue tracking
---
V13 changes:
- Fix misc coding style issue
- Fix build issue on Ubuntu 18.04
---
V14 changes:
- Explain the reason of skipping telemetry tests in commit log
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Jie Zhou (11):
eal/windows: return ENOTSUP for not supported API
app/test: remove POSIX-specific code
app/test: fix incorrect errno variable
app/test: skip interrupt tests on Windows
app/test: skip two logs_autotest cases on Windows
app/test: differentiate a strerror on different OS
app/test: remove two alarm_autotest cases
app/test: resolve name collision
app/test: add test stubs for not supported ones
app/test: replace .sh script with .py script
app/test: enable unit test on Windows
app/test/commands.c | 2 -
app/test/has-hugepage.sh | 11 ---
app/test/has_hugepage.py | 26 ++++++
app/test/meson.build | 113 ++++++++++++-----------
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +-
app/test/test.c | 5 +-
app/test/test_acl.c | 12 +++
app/test/test_alarm.c | 4 +
app/test/test_bpf.c | 15 ++-
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline_ipaddr.c | 13 ++-
app/test/test_cmdline_lib.c | 13 ++-
app/test/test_crc.c | 1 -
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_errno.c | 12 ++-
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 | 12 +++
app/test/test_graph.c | 18 +++-
app/test/test_graph_perf.c | 16 +++-
app/test/test_hash_perf.c | 28 ++++--
app/test/test_interrupts.c | 10 ++
app/test/test_ipfrag.c | 16 +++-
app/test/test_ipsec.c | 15 ++-
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 | 12 +++
app/test/test_logs.c | 6 +-
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 | 30 +++---
app/test/test_memory.c | 2 +-
app/test/test_mp_secondary.c | 12 +++
app/test/test_pie.c | 30 +++++-
app/test/test_pmd_perf.c | 6 +-
app/test/test_rawdev.c | 17 +++-
app/test/test_rcu_qsbr_perf.c | 12 +++
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_ring_stress_impl.h | 2 +-
app/test/test_sched.c | 14 ++-
app/test/test_security.c | 4 +-
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_telemetry_data.c | 2 +
app/test/test_timer_secondary.c | 13 +++
app/test/test_trace.c | 32 ++++++-
lib/eal/common/eal_common_errno.c | 4 +
lib/eal/windows/eal_memalloc.c | 6 +-
84 files changed, 1058 insertions(+), 184 deletions(-)
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v14 01/11] eal/windows: return ENOTSUP for not supported API
2021-12-08 18:59 ` [PATCH v14 00/11] app/test: enable subset of tests " Jie Zhou
@ 2021-12-08 18:59 ` Jie Zhou
2021-12-08 18:59 ` [PATCH v14 02/11] app/test: remove POSIX-specific code Jie Zhou
` (11 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 18:59 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
UT memory_autotest on Windows has 2 failed cases on eal APIs
eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2
APIs are not supported on Windows yet. Should return ENOTSUP such that
in test_memory.c these 2 ENOTSUP cases will not be marked as failures,
same as other ENOTSUP cases.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
lib/eal/windows/eal_memalloc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/eal/windows/eal_memalloc.c b/lib/eal/windows/eal_memalloc.c
index 55d6dcc71c..aa7589b81d 100644
--- a/lib/eal/windows/eal_memalloc.c
+++ b/lib/eal/windows/eal_memalloc.c
@@ -17,7 +17,7 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
RTE_SET_USED(list_idx);
RTE_SET_USED(seg_idx);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
@@ -28,7 +28,7 @@ eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
RTE_SET_USED(seg_idx);
RTE_SET_USED(offset);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
static int
@@ -428,7 +428,7 @@ eal_memalloc_sync_with_primary(void)
{
/* No multi-process support. */
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v14 02/11] app/test: remove POSIX-specific code
2021-12-08 18:59 ` [PATCH v14 00/11] app/test: enable subset of tests " Jie Zhou
2021-12-08 18:59 ` [PATCH v14 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
@ 2021-12-08 18:59 ` Jie Zhou
2021-12-09 19:46 ` Tyler Retzlaff
2021-12-08 18:59 ` [PATCH v14 03/11] app/test: fix incorrect errno variable Jie Zhou
` (10 subsequent siblings)
12 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 18:59 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
- Replace POSIX-specific code with DPDK equivalents or
conditionally disable it on Windows
- Use NUL on Windows as /dev/null for Unix
- Exclude tests not supported on Windows yet
* multi-process
* PMD performance statistics display on signal
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/commands.c | 2 --
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +++-
app/test/test.c | 5 ++++-
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline_ipaddr.c | 13 ++++++-------
app/test/test_cmdline_lib.c | 13 +++++++++----
app/test/test_crc.c | 1 -
app/test/test_memcpy_perf.c | 29 +++++++++++++++--------------
app/test/test_pmd_perf.c | 6 +++++-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_telemetry_data.c | 2 ++
12 files changed, 47 insertions(+), 33 deletions(-)
diff --git a/app/test/commands.c b/app/test/commands.c
index 2dced3bc44..887cabad64 100644
--- a/app/test/commands.c
+++ b/app/test/commands.c
@@ -8,8 +8,6 @@
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
-#include <netinet/in.h>
-#include <termios.h>
#include <inttypes.h>
#include <errno.h>
#include <sys/queue.h>
diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index 8ac24577ba..6b42b9b83b 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -5,6 +5,7 @@
#include <rte_byteorder.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
+#include <rte_os_shim.h>
#include "packet_burst_generator.h"
diff --git a/app/test/process.h b/app/test/process.h
index 5b10cf64df..1f073b9c5c 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -7,12 +7,14 @@
#include <errno.h> /* errno */
#include <limits.h> /* PATH_MAX */
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <libgen.h> /* basename et al */
+#include <sys/wait.h>
+#endif
#include <stdlib.h> /* NULL */
#include <string.h> /* strerror */
#include <unistd.h> /* readlink */
#include <dirent.h>
-#include <sys/wait.h>
#include <rte_string_fns.h> /* strlcpy */
diff --git a/app/test/test.c b/app/test/test.c
index 5194131026..e69cae3eea 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
@@ -63,7 +62,9 @@ do_recursive_call(void)
const char *env_var;
int (*action_fn)(void);
} actions[] = {
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "run_secondary_instances", test_mp_secondary },
+#endif
#ifdef RTE_LIB_PDUMP
#ifdef RTE_NET_RING
{ "run_pdump_server_tests", test_pdump },
@@ -82,7 +83,9 @@ do_recursive_call(void)
{ "test_file_prefix", no_action },
{ "test_no_huge_flag", no_action },
#ifdef RTE_LIB_TIMER
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "timer_secondary_spawn_wait", test_timer_secondary },
+#endif
#endif
};
diff --git a/app/test/test_byteorder.c b/app/test/test_byteorder.c
index 03c08d9abf..de14ed539e 100644
--- a/app/test/test_byteorder.c
+++ b/app/test/test_byteorder.c
@@ -46,7 +46,7 @@ test_byteorder(void)
return -1;
res_u16 = rte_bswap16(0x1337);
- printf("const %"PRIx16" -> %"PRIx16"\n", 0x1337, res_u16);
+ printf("const %"PRIx16" -> %"PRIx16"\n", (uint16_t)0x1337, res_u16);
if (res_u16 != 0x3713)
return -1;
diff --git a/app/test/test_cmdline_ipaddr.c b/app/test/test_cmdline_ipaddr.c
index 2a1ee120fc..f540063508 100644
--- a/app/test/test_cmdline_ipaddr.c
+++ b/app/test/test_cmdline_ipaddr.c
@@ -1,12 +1,9 @@
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2010-2014 Intel Corporation
*/
-
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
-#include <netinet/in.h>
-#include <sys/socket.h>
#include <rte_string_fns.h>
@@ -15,7 +12,7 @@
#include "test_cmdline.h"
-#define IP4(a,b,c,d) {((uint32_t)(((a) & 0xff)) | \
+#define IP4(a,b,c,d) {.s_addr = (uint32_t)(((a) & 0xff) | \
(((b) & 0xff) << 8) | \
(((c) & 0xff) << 16) | \
((d) & 0xff) << 24)}
@@ -25,7 +22,11 @@
/* create IPv6 address, swapping bytes where needed */
#ifndef s6_addr16
-# define s6_addr16 __u6_addr.__u6_addr16
+#ifdef RTE_EXEC_ENV_WINDOWS
+#define s6_addr16 u.Word
+#else
+#define s6_addr16 __u6_addr.__u6_addr16
+#endif
#endif
#define IP6(a,b,c,d,e,f,g,h) .ipv6 = \
{.s6_addr16 = \
@@ -166,8 +167,6 @@ const char * ipaddr_garbage_network6_strs[] = {
};
#define IPv6_GARBAGE_PREFIX 64
-
-
const char * ipaddr_invalid_strs[] = {
/** IPv4 **/
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index f50ccdb599..fcd58cb76a 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
@@ -22,6 +21,12 @@
#include "test_cmdline.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
+#define NULL_INPUT "/dev/null"
+#else
+#define NULL_INPUT "NUL"
+#endif
+
/****************************************************************/
/* static functions required for some tests */
static void
@@ -156,10 +161,10 @@ test_cmdline_socket_fns(void)
cl = cmdline_stdin_new(&ctx, NULL);
if (cl != NULL)
goto error;
- cl = cmdline_file_new(NULL, "prompt", "/dev/null");
+ cl = cmdline_file_new(NULL, "prompt", NULL_INPUT);
if (cl != NULL)
goto error;
- cl = cmdline_file_new(&ctx, NULL, "/dev/null");
+ cl = cmdline_file_new(&ctx, NULL, NULL_INPUT);
if (cl != NULL)
goto error;
cl = cmdline_file_new(&ctx, "prompt", NULL);
@@ -171,7 +176,7 @@ test_cmdline_socket_fns(void)
cmdline_free(cl);
return -1;
}
- cl = cmdline_file_new(&ctx, "prompt", "/dev/null");
+ cl = cmdline_file_new(&ctx, "prompt", NULL_INPUT);
if (cl == NULL) {
printf("Error: failed to open /dev/null for reading!");
return -1;
diff --git a/app/test/test_crc.c b/app/test/test_crc.c
index bf1d344359..0ed080e482 100644
--- a/app/test/test_crc.c
+++ b/app/test/test_crc.c
@@ -14,7 +14,6 @@
#define CRC32_VEC_LEN2 348
#define CRC16_VEC_LEN1 12
#define CRC16_VEC_LEN2 2
-#define LINE_LEN 75
/* CRC test vector */
static const uint8_t crc_vec[CRC_VEC_LEN] = {
diff --git a/app/test/test_memcpy_perf.c b/app/test/test_memcpy_perf.c
index c711e36ba7..3727c160e6 100644
--- a/app/test/test_memcpy_perf.c
+++ b/app/test/test_memcpy_perf.c
@@ -6,10 +6,11 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include <sys/time.h>
+#include <time.h>
#include <rte_common.h>
#include <rte_cycles.h>
+#include <rte_os_shim.h>
#include <rte_random.h>
#include <rte_malloc.h>
@@ -271,7 +272,7 @@ static int
perf_test(void)
{
int ret;
- struct timeval tv_begin, tv_end;
+ struct timespec tv_begin, tv_end;
double time_aligned, time_unaligned;
double time_aligned_const, time_unaligned_const;
@@ -298,32 +299,32 @@ perf_test(void)
printf("\n================================= %2dB aligned =================================",
ALIGNMENT_UNIT);
/* Do aligned tests where size is a variable */
- gettimeofday(&tv_begin, NULL);
+ timespec_get(&tv_begin, TIME_UTC);
perf_test_variable_aligned();
- gettimeofday(&tv_end, NULL);
+ timespec_get(&tv_end, TIME_UTC);
time_aligned = (double)(tv_end.tv_sec - tv_begin.tv_sec)
- + ((double)tv_end.tv_usec - tv_begin.tv_usec)/1000000;
+ + ((double)tv_end.tv_nsec - tv_begin.tv_nsec) / NS_PER_S;
printf("\n------- ----------------- ----------------- ----------------- -----------------");
/* Do aligned tests where size is a compile-time constant */
- gettimeofday(&tv_begin, NULL);
+ timespec_get(&tv_begin, TIME_UTC);
perf_test_constant_aligned();
- gettimeofday(&tv_end, NULL);
+ timespec_get(&tv_end, TIME_UTC);
time_aligned_const = (double)(tv_end.tv_sec - tv_begin.tv_sec)
- + ((double)tv_end.tv_usec - tv_begin.tv_usec)/1000000;
+ + ((double)tv_end.tv_nsec - tv_begin.tv_nsec) / NS_PER_S;
printf("\n================================== Unaligned ==================================");
/* Do unaligned tests where size is a variable */
- gettimeofday(&tv_begin, NULL);
+ timespec_get(&tv_begin, TIME_UTC);
perf_test_variable_unaligned();
- gettimeofday(&tv_end, NULL);
+ timespec_get(&tv_end, TIME_UTC);
time_unaligned = (double)(tv_end.tv_sec - tv_begin.tv_sec)
- + ((double)tv_end.tv_usec - tv_begin.tv_usec)/1000000;
+ + ((double)tv_end.tv_nsec - tv_begin.tv_nsec) / NS_PER_S;
printf("\n------- ----------------- ----------------- ----------------- -----------------");
/* Do unaligned tests where size is a compile-time constant */
- gettimeofday(&tv_begin, NULL);
+ timespec_get(&tv_begin, TIME_UTC);
perf_test_constant_unaligned();
- gettimeofday(&tv_end, NULL);
+ timespec_get(&tv_end, TIME_UTC);
time_unaligned_const = (double)(tv_end.tv_sec - tv_begin.tv_sec)
- + ((double)tv_end.tv_usec - tv_begin.tv_usec)/1000000;
+ + ((double)tv_end.tv_nsec - tv_begin.tv_nsec) / NS_PER_S;
printf("\n======= ================= ================= ================= =================\n\n");
printf("Test Execution Time (seconds):\n");
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 0aa9dc1b1c..25611bfe9b 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -296,6 +296,7 @@ reset_count(void)
idle = 0;
}
+#ifndef RTE_EXEC_ENV_WINDOWS
static void
stats_display(uint16_t port_id)
{
@@ -325,6 +326,7 @@ signal_handler(int signum)
if (signum == SIGUSR2)
stats_display(0);
}
+#endif
struct rte_mbuf **tx_burst;
@@ -638,7 +640,7 @@ exec_burst(uint32_t flags, int lcore)
i = (i >= conf->nb_ports - 1) ? 0 : (i + 1);
}
- sleep(5);
+ rte_delay_us(5 * US_PER_S);
/* only when polling second */
if (flags == SC_BURST_XMIT_FIRST)
@@ -669,8 +671,10 @@ test_pmd_perf(void)
printf("Start PMD RXTX cycles cost test.\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
signal(SIGUSR1, signal_handler);
signal(SIGUSR2, signal_handler);
+#endif
nb_ports = rte_eth_dev_count_avail();
if (nb_ports < NB_ETHPORTS_USED) {
diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h
index 2825a9dce6..62f046a91a 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -360,7 +360,7 @@ test_mt1(int (*test)(void *))
/* signal worker to start test */
__atomic_store_n(&wrk_cmd, WRK_CMD_RUN, __ATOMIC_RELEASE);
- usleep(run_time * US_PER_S);
+ rte_delay_us(run_time * US_PER_S);
/* signal worker to start test */
__atomic_store_n(&wrk_cmd, WRK_CMD_STOP, __ATOMIC_RELEASE);
diff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c
index 18b93db8ef..73eee293a1 100644
--- a/app/test/test_telemetry_data.c
+++ b/app/test/test_telemetry_data.c
@@ -4,7 +4,9 @@
#include <string.h>
#include <sys/socket.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/un.h>
+#endif
#include <unistd.h>
#include <limits.h>
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v14 03/11] app/test: fix incorrect errno variable
2021-12-08 18:59 ` [PATCH v14 00/11] app/test: enable subset of tests " Jie Zhou
2021-12-08 18:59 ` [PATCH v14 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-12-08 18:59 ` [PATCH v14 02/11] app/test: remove POSIX-specific code Jie Zhou
@ 2021-12-08 18:59 ` Jie Zhou
2021-12-08 18:59 ` [PATCH v14 04/11] app/test: skip interrupt tests on Windows Jie Zhou
` (9 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 18:59 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Fix incorrect errno variable used in memory autotest.
Use rte_errno instead.
Fixes: 086d426406bd ("app/test: fix memory autotests on FreeBSD")
Cc: bruce.richardson@intel.com
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/test_memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index dbf6871e71..140ac3f3cf 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -63,7 +63,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
/* we're able to get memseg fd - try getting its offset */
ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
if (ret < 0) {
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
return -1;
}
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v14 04/11] app/test: skip interrupt tests on Windows
2021-12-08 18:59 ` [PATCH v14 00/11] app/test: enable subset of tests " Jie Zhou
` (2 preceding siblings ...)
2021-12-08 18:59 ` [PATCH v14 03/11] app/test: fix incorrect errno variable Jie Zhou
@ 2021-12-08 18:59 ` Jie Zhou
2021-12-09 7:49 ` Jerin Jacob
2021-12-08 18:59 ` [PATCH v14 05/11] app/test: skip two logs_autotest cases " Jie Zhou
` (8 subsequent siblings)
12 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 18:59 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Even though test_interrupts.c can compile on Windows, skip interrupt
tests for now since majority of eal_interrupt on Windows are stubs.
Will remove the skip after interrupt being fully enabled on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/test_interrupts.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
index 2a05399f96..eec9b2805b 100644
--- a/app/test/test_interrupts.c
+++ b/app/test/test_interrupts.c
@@ -12,6 +12,15 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_interrupt(void)
+{
+ printf("Interrupt on Windows is not fully supported yet, skipping test\n");
+ return TEST_SKIPPED;
+}
+#else
+
#define TEST_INTERRUPT_CHECK_INTERVAL 100 /* ms */
/* predefined interrupt handle types */
@@ -590,5 +599,6 @@ test_interrupt(void)
return ret;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v14 05/11] app/test: skip two logs_autotest cases on Windows
2021-12-08 18:59 ` [PATCH v14 00/11] app/test: enable subset of tests " Jie Zhou
` (3 preceding siblings ...)
2021-12-08 18:59 ` [PATCH v14 04/11] app/test: skip interrupt tests on Windows Jie Zhou
@ 2021-12-08 18:59 ` Jie Zhou
2021-12-08 18:59 ` [PATCH v14 06/11] app/test: differentiate a strerror on different OS Jie Zhou
` (7 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 18:59 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
DPDK logs_autotest on Windows failed at "dynamic log types" tests.
The failures are on 2 test cases for rte_log_set_level_regexp API,
due to regular expression is not supported on Windows in DPDK yet
and regcomp/regexec are just stubs on Windows (in regex.h).
In app\test\test_logs.c, ifndef these two test cases, and for the
rte_log_set_level_pattern validation case following these two cases,
differentiate the expected log level passed into macro CHECK_LEVELS
Now logs_autotest completes for all dynamic log types and static log types.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/test_logs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/test/test_logs.c b/app/test/test_logs.c
index 7abb6eeca2..7c001c1ab3 100644
--- a/app/test/test_logs.c
+++ b/app/test/test_logs.c
@@ -113,6 +113,7 @@ test_logs(void)
rte_log_set_level(logtype1, RTE_LOG_ERR);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#ifndef RTE_EXEC_ENV_WINDOWS
rte_log_set_level_regexp("type$", RTE_LOG_EMERG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
@@ -121,7 +122,10 @@ test_logs(void)
rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_EMERG, RTE_LOG_EMERG);
-
+#else
+ ret = rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
+ CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#endif
/* set logtype level low to so we can test global level */
rte_log_set_level_pattern("logtype*", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_DEBUG, RTE_LOG_DEBUG, RTE_LOG_DEBUG);
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v14 06/11] app/test: differentiate a strerror on different OS
2021-12-08 18:59 ` [PATCH v14 00/11] app/test: enable subset of tests " Jie Zhou
` (4 preceding siblings ...)
2021-12-08 18:59 ` [PATCH v14 05/11] app/test: skip two logs_autotest cases " Jie Zhou
@ 2021-12-08 18:59 ` Jie Zhou
2021-12-08 19:07 ` Dmitry Kozlyuk
2021-12-08 18:59 ` [PATCH v14 07/11] app/test: remove two alarm_autotest cases Jie Zhou
` (6 subsequent siblings)
12 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 18:59 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
On Windows, strerror returns just "Unknown error" for errnum greater
than MAX_ERRNO, while linux and freebsd returns "Unknown error <num>",
which is the current expectation for errno_autotest. Differentiate
the error string on Windows to remove a "duplicate error code" failure.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_errno.c | 12 +++++++++++-
lib/eal/common/eal_common_errno.c | 4 ++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/app/test/test_errno.c b/app/test/test_errno.c
index 3ff0456a58..0db4fbc8b3 100644
--- a/app/test/test_errno.c
+++ b/app/test/test_errno.c
@@ -18,13 +18,19 @@ test_errno(void)
{
const char *rte_retval;
const char *libc_retval;
+
+#ifndef RTE_EXEC_ENV_WINDOWS
#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD has a colon in the string, unlike linux */
const char unknown_code_result[] = "Unknown error: %d";
#else
const char unknown_code_result[] = "Unknown error %d";
#endif
- char expected_libc_retval[sizeof(unknown_code_result)+3];
+ char expected_libc_retval[sizeof(unknown_code_result) + 3];
+#else
+ /* Windows doesn't return error number for error greater than MAX_errno*/
+ static const char expected_libc_retval[] = "Unknown error";
+#endif
/* use a small selection of standard errors for testing */
int std_errs[] = {EAGAIN, EBADF, EACCES, EINTR, EINVAL};
@@ -54,11 +60,13 @@ test_errno(void)
rte_retval, libc_retval);
if (strcmp(rte_retval, libc_retval) == 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
/* generate appropriate error string for unknown error number
* and then check that this is what we got back. If not, we have
* a duplicate error number that conflicts with errno.h */
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, rte_errs[i]);
+#endif
if ((strcmp(expected_libc_retval, libc_retval) != 0) &&
(strcmp("", libc_retval) != 0)){
printf("Error, duplicate error code %d\n", rte_errs[i]);
@@ -69,8 +77,10 @@ test_errno(void)
/* ensure that beyond RTE_MAX_ERRNO, we always get an unknown code */
rte_retval = rte_strerror(RTE_MAX_ERRNO + 1);
libc_retval = strerror(RTE_MAX_ERRNO + 1);
+#ifndef RTE_EXEC_ENV_WINDOWS
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, RTE_MAX_ERRNO + 1);
+#endif
printf("rte_strerror: '%s', strerror: '%s'\n",
rte_retval, libc_retval);
if ((strcmp(rte_retval, libc_retval) != 0) ||
diff --git a/lib/eal/common/eal_common_errno.c b/lib/eal/common/eal_common_errno.c
index f86802705a..7507c746ec 100644
--- a/lib/eal/common/eal_common_errno.c
+++ b/lib/eal/common/eal_common_errno.c
@@ -37,7 +37,11 @@ rte_strerror(int errnum)
/* since some implementations of strerror_r throw an error
* themselves if errnum is too big, we handle that case here */
if (errnum >= RTE_MAX_ERRNO)
+#ifdef RTE_EXEC_ENV_WINDOWS
+ snprintf(ret, RETVAL_SZ, "Unknown error");
+#else
snprintf(ret, RETVAL_SZ, "Unknown error%s %d", sep, errnum);
+#endif
else
switch (errnum){
case E_RTE_SECONDARY:
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v14 07/11] app/test: remove two alarm_autotest cases
2021-12-08 18:59 ` [PATCH v14 00/11] app/test: enable subset of tests " Jie Zhou
` (5 preceding siblings ...)
2021-12-08 18:59 ` [PATCH v14 06/11] app/test: differentiate a strerror on different OS Jie Zhou
@ 2021-12-08 18:59 ` Jie Zhou
2021-12-08 18:59 ` [PATCH v14 08/11] app/test: resolve name collision Jie Zhou
` (5 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 18:59 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Remove two alarm_autotest test cases which do bogus range check
on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/test_alarm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_alarm.c b/app/test/test_alarm.c
index b4034339b8..70e97a3109 100644
--- a/app/test/test_alarm.c
+++ b/app/test/test_alarm.c
@@ -10,6 +10,7 @@
#include "test.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
static volatile int flag;
static void
@@ -18,6 +19,7 @@ test_alarm_callback(void *cb_arg)
flag = 1;
printf("Callback setting flag - OK. [cb_arg = %p]\n", cb_arg);
}
+#endif
static int
test_alarm(void)
@@ -27,6 +29,7 @@ test_alarm(void)
return 0;
#endif
+#ifndef RTE_EXEC_ENV_WINDOWS
/* check if it will fail to set alarm with wrong us value */
printf("check if it will fail to set alarm with wrong ms values\n");
if (rte_eal_alarm_set(0, test_alarm_callback,
@@ -39,6 +42,7 @@ test_alarm(void)
printf("should not be successful with (UINT64_MAX-1) us value\n");
return -1;
}
+#endif
/* check if it will fail to set alarm with null callback parameter */
printf("check if it will fail to set alarm with null callback parameter\n");
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v14 08/11] app/test: resolve name collision
2021-12-08 18:59 ` [PATCH v14 00/11] app/test: enable subset of tests " Jie Zhou
` (6 preceding siblings ...)
2021-12-08 18:59 ` [PATCH v14 07/11] app/test: remove two alarm_autotest cases Jie Zhou
@ 2021-12-08 18:59 ` Jie Zhou
2021-12-08 19:45 ` Dmitry Kozlyuk
2021-12-08 18:59 ` [PATCH v14 09/11] app/test: add test stubs for not supported ones Jie Zhou
` (4 subsequent siblings)
12 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 18:59 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Add OP_ prefix to resolve name collision to enable hash_perf test
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
app/test/test_hash_perf.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/app/test/test_hash_perf.c b/app/test/test_hash_perf.c
index 76cdac5d53..7e98ec3964 100644
--- a/app/test/test_hash_perf.c
+++ b/app/test/test_hash_perf.c
@@ -30,10 +30,10 @@
#define BURST_SIZE 16
enum operations {
- ADD = 0,
- LOOKUP,
- LOOKUP_MULTI,
- DELETE,
+ OP_ADD = 0,
+ OP_LOOKUP,
+ OP_LOOKUP_MULTI,
+ OP_DELETE,
NUM_OPERATIONS
};
@@ -308,7 +308,7 @@ timed_adds(unsigned int with_hash, unsigned int with_data,
const uint64_t end_tsc = rte_rdtsc();
const uint64_t time_taken = end_tsc - start_tsc;
- cycles[table_index][ADD][with_hash][with_data] = time_taken/keys_to_add;
+ cycles[table_index][OP_ADD][with_hash][with_data] = time_taken/keys_to_add;
return 0;
}
@@ -385,7 +385,7 @@ timed_lookups(unsigned int with_hash, unsigned int with_data,
const uint64_t end_tsc = rte_rdtsc();
const uint64_t time_taken = end_tsc - start_tsc;
- cycles[table_index][LOOKUP][with_hash][with_data] = time_taken/num_lookups;
+ cycles[table_index][OP_LOOKUP][with_hash][with_data] = time_taken/num_lookups;
return 0;
}
@@ -511,7 +511,7 @@ timed_lookups_multi(unsigned int with_hash, unsigned int with_data,
const uint64_t end_tsc = rte_rdtsc();
const uint64_t time_taken = end_tsc - start_tsc;
- cycles[table_index][LOOKUP_MULTI][with_hash][with_data] =
+ cycles[table_index][OP_LOOKUP_MULTI][with_hash][with_data] =
time_taken/num_lookups;
return 0;
@@ -550,7 +550,7 @@ timed_deletes(unsigned int with_hash, unsigned int with_data,
const uint64_t end_tsc = rte_rdtsc();
const uint64_t time_taken = end_tsc - start_tsc;
- cycles[table_index][DELETE][with_hash][with_data] = time_taken/keys_to_add;
+ cycles[table_index][OP_DELETE][with_hash][with_data] = time_taken/keys_to_add;
return 0;
}
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v14 09/11] app/test: add test stubs for not supported ones
2021-12-08 18:59 ` [PATCH v14 00/11] app/test: enable subset of tests " Jie Zhou
` (7 preceding siblings ...)
2021-12-08 18:59 ` [PATCH v14 08/11] app/test: resolve name collision Jie Zhou
@ 2021-12-08 18:59 ` Jie Zhou
2021-12-09 19:47 ` Tyler Retzlaff
2021-12-08 18:59 ` [PATCH v14 10/11] app/test: replace .sh script with .py script Jie Zhou
` (3 subsequent siblings)
12 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 18:59 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Add test stubs for 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>
---
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 | 12 ++++
app/test/test_graph.c | 18 ++++-
app/test/test_graph_perf.c | 16 ++++-
app/test/test_hash_perf.c | 12 ++++
app/test/test_ipfrag.c | 16 ++++-
app/test/test_ipsec.c | 15 +++-
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 | 12 ++++
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 | 12 ++++
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 | 4 +-
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, 880 insertions(+), 72 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 <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 /*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 46bcb51f86..055df252ba 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -14,11 +14,22 @@
#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 +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 10b48cdadb..f83c844e42 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 <time.h>
#include <rte_common.h>
@@ -15739,3 +15741,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 9d19a6d6d9..680ced4dbe 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 <rte_bus_vdev.h>
#include <rte_common.h>
#include <rte_hexdump.h>
@@ -2429,3 +2431,5 @@ REGISTER_TEST_COMMAND(cryptodev_octeontx2_asym_autotest,
test_cryptodev_octeontx2_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 <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 /*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 <rte_common.h>
#include <rte_cryptodev.h>
#include <rte_esp.h>
@@ -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 <time.h>
#include <rte_common.h>
@@ -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 <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 /*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 <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 @@ 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 <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 /*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 <string.h>
#include <stdarg.h>
+
+#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 <libgen.h>
#include <stdlib.h>
#include <errno.h>
@@ -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 <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 /*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 <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 /*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..8f5fd78723 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 <string.h>
#include <rte_common.h>
#include <rte_mempool.h>
#include <rte_mbuf.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_cryptodev.h>
#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 /*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 <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 /*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 <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 /*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 <math.h>
@@ -10,6 +11,17 @@
#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 +33,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 +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 843d9766b0..fee2ecaa22 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 <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
@@ -1048,7 +1058,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);
@@ -1058,3 +1072,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 <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 +33,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 +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 <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 /*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 <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 /*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 <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);
diff --git a/app/test/test_fib_perf.c b/app/test/test_fib_perf.c
index 86b2f832b8..ec7f20e102 100644
--- a/app/test/test_fib_perf.c
+++ b/app/test/test_fib_perf.c
@@ -12,11 +12,22 @@
#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 /*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 <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 /*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..2924308dda 100644
--- a/app/test/test_func_reentrancy.c
+++ b/app/test/test_func_reentrancy.c
@@ -40,6 +40,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_func_reentrancy(void)
+{
+ printf("reentrancy not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
typedef int (*case_func_t)(void* arg);
typedef void (*case_clean_t)(unsigned lcore_id);
@@ -511,4 +521,6 @@ test_func_reentrancy(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(func_reentrancy_autotest, test_func_reentrancy);
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 <assert.h>
#include <inttypes.h>
#include <signal.h>
@@ -9,14 +11,23 @@
#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 +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 <inttypes.h>
#include <signal.h>
#include <stdio.h>
@@ -9,14 +11,22 @@
#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 +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..a3e9f43967 100644
--- a/app/test/test_hash_perf.c
+++ b/app/test/test_hash_perf.c
@@ -17,6 +17,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_hash_perf(void)
+{
+ printf("hash_perf not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#define MAX_ENTRIES (1 << 19)
#define KEYS_TO_ADD (MAX_ENTRIES)
#define ADD_PERCENT 0.75 /* 75% table utilization */
@@ -749,4 +759,6 @@ test_hash_perf(void)
return 0;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(hash_perf_autotest, test_hash_perf);
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 <time.h>
@@ -8,13 +9,22 @@
#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 +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..ed4d166f0d 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 <time.h>
@@ -13,15 +14,25 @@
#include <rte_bus_vdev.h>
#include <rte_ip.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_crypto.h>
#include <rte_cryptodev.h>
#include <rte_lcore.h>
+
#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 /*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 <stdio.h>
#include <rte_ip.h>
@@ -8,10 +9,20 @@
#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 +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 <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 +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 40ab0d5c4c..8f4e92f6ca 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 <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>
diff --git a/app/test/test_lcores.c b/app/test/test_lcores.c
index 35c47d5372..2277ae597f 100644
--- a/app/test/test_lcores.c
+++ b/app/test/test_lcores.c
@@ -11,6 +11,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_lcores(void)
+{
+ printf("lcore not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
struct thread_context {
enum { INIT, ERROR, DONE } state;
bool lcore_id_any;
@@ -411,4 +421,6 @@ test_lcores(void)
return TEST_SUCCESS;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(lcores_autotest, test_lcores);
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 <stdio.h>
#include <stdint.h>
@@ -10,7 +21,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 +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 <stdio.h>
#include <stdint.h>
@@ -8,9 +9,18 @@
#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 +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 <stdio.h>
#include <stdint.h>
@@ -12,7 +23,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 +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 <stdio.h>
#include <stdint.h>
#include <stdlib.h>
@@ -15,7 +25,6 @@
#include <rte_ip.h>
#include <rte_lpm.h>
-#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 <stdio.h>
#include <stdint.h>
@@ -8,7 +9,9 @@
#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>
@@ -23,11 +26,8 @@
#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 +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 <string.h>
#include <stdarg.h>
@@ -33,8 +34,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 +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 <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 /*!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 40aa4c8627..85f3a126b9 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 <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 +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 <stdio.h>
#include <inttypes.h>
@@ -11,9 +12,18 @@
#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 +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 <rte_os_shim.h>
#include <rte_random.h>
#include <rte_malloc.h>
-
#include <rte_memcpy.h>
#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 <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 /*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 <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -12,8 +38,6 @@
#include <time.h>
#include <math.h>
-#include "test.h"
-
#include <rte_pie.h>
#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 <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 /*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..9209fb2658 100644
--- a/app/test/test_rcu_qsbr_perf.c
+++ b/app/test/test_rcu_qsbr_perf.c
@@ -15,6 +15,16 @@
#include "test.h"
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_rcu_qsbr_main(void)
+{
+ printf("rcu_qsbr_main not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
/* Check condition and return an error if true. */
static uint16_t enabled_core_ids[RTE_MAX_LCORE];
static unsigned int num_cores;
@@ -687,4 +697,6 @@ test_rcu_qsbr_main(void)
return -1;
}
+#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
+
REGISTER_TEST_COMMAND(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
diff --git a/app/test/test_red.c b/app/test/test_red.c
index 05936cfee8..524f9c9b6d 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 <stdlib.h>
#include <stdio.h>
@@ -8,12 +9,34 @@
#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 +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 <stdio.h>
#include <unistd.h>
@@ -9,12 +10,20 @@
#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 +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 <medvedkinv@gmail.com>
* 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 +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 <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,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 <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 +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 060cf1ffa8..6c1d8602d2 100644
--- a/app/test/test_security.c
+++ b/app/test/test_security.c
@@ -1,12 +1,14 @@
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
*/
+#include "test.h"
#include <rte_errno.h>
#include <rte_log.h>
#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_ether.h>
+
#include <rte_security.h>
#include <rte_security_driver.h>
@@ -20,7 +22,7 @@
#endif
#include <rte_test.h>
-#include "test.h"
+
/**
* Security
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 <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 +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 <rte_ip.h>
#include <rte_string_fns.h>
#include <rte_hexdump.h>
@@ -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 <string.h>
#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 aabf4375db..45dc7682d8 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 <string.h>
#include <rte_pipeline.h>
#include <rte_log.h>
@@ -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 <string.h>
#include <rte_byteorder.h>
#include <rte_table_lpm_ipv6.h>
@@ -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 <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 +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.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v14 10/11] app/test: replace .sh script with .py script
2021-12-08 18:59 ` [PATCH v14 00/11] app/test: enable subset of tests " Jie Zhou
` (8 preceding siblings ...)
2021-12-08 18:59 ` [PATCH v14 09/11] app/test: add test stubs for not supported ones Jie Zhou
@ 2021-12-08 18:59 ` Jie Zhou
2021-12-08 19:00 ` [PATCH v14 11/11] app/test: enable unit test on Windows Jie Zhou
` (2 subsequent siblings)
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 18:59 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
- Add python script to check if system supports hugepages
- Remove corresponding .sh script
- Replace calling of .sh with corresponding .py in meson.build
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/has-hugepage.sh | 11 -----------
app/test/has_hugepage.py | 26 ++++++++++++++++++++++++++
app/test/meson.build | 2 +-
3 files changed, 27 insertions(+), 12 deletions(-)
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh
deleted file mode 100755
index d600fad319..0000000000
--- a/app/test/has-hugepage.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright 2020 Mellanox Technologies, Ltd
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /proc/sys/vm/nr_hugepages || echo 0
-elif [ "$(uname)" = "FreeBSD" ] ; then
- echo 1 # assume FreeBSD always has hugepages
-else
- echo 0
-fi
diff --git a/app/test/has_hugepage.py b/app/test/has_hugepage.py
new file mode 100644
index 0000000000..f8e7087d1c
--- /dev/null
+++ b/app/test/has_hugepage.py
@@ -0,0 +1,26 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2021 Microsoft Corporation
+"""This script checks if the system supports huge pages"""
+
+import platform
+import ctypes
+
+os_name = platform.system()
+if os_name == "Linux":
+ try:
+ with open("/proc/sys/vm/nr_hugepages") as file_o:
+ content = file_o.read()
+ print(content)
+ except:
+ print("0")
+
+elif os_name == "FreeBSD":
+ # Assume FreeBSD always has hugepages enabled
+ print("1")
+elif os_name == "Windows":
+ if ctypes.windll.kernel32.GetLargePageMinimum() > 0:
+ print("1")
+ else:
+ print("0")
+else:
+ print("0")
diff --git a/app/test/meson.build b/app/test/meson.build
index 2b480adfba..97ee83029e 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -492,7 +492,7 @@ dpdk_test = executable('dpdk-test',
driver_install_path),
install: true)
-has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
+has_hugepage = run_command(py3, 'has_hugepage.py').stdout().strip() != '0'
message('hugepage availability: @0@'.format(has_hugepage))
# some perf tests (eg: memcpy perf autotest)take very long
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v14 11/11] app/test: enable unit test on Windows
2021-12-08 18:59 ` [PATCH v14 00/11] app/test: enable subset of tests " Jie Zhou
` (9 preceding siblings ...)
2021-12-08 18:59 ` [PATCH v14 10/11] app/test: replace .sh script with .py script Jie Zhou
@ 2021-12-08 19:00 ` Jie Zhou
2021-12-09 19:49 ` [PATCH v14 00/11] app/test: enable subset of tests " Tyler Retzlaff
2022-01-26 5:10 ` [PATCH v15 " Jie Zhou
12 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2021-12-08 19:00 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Enable a subset of unit tests for Windows CI
- For driver tests, driver owners should enable corresponding tests when
enabling driver for Windows. For example, the cryptodev tests will be
enabled by "patch-18949: app/test: enable crypto unit tests on Windows"
(which depends on this patchset to be merged).
- For dump tests, currently the tests hang on Windows which require
further investigation.
- For telemetry tests, it has POSIX socket specific codes which require
replacement for Windows. Will investigate and work on a separate patch.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
app/test/meson.build | 111 ++++++++++++++++++++++---------------------
1 file changed, 58 insertions(+), 53 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index 97ee83029e..fcf38729e7 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,12 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if is_windows
- build = false
- reason = 'not supported on Windows'
- subdir_done()
-endif
-
if not get_option('tests')
subdir_done()
endif
@@ -158,32 +152,14 @@ test_sources = files(
)
test_deps = [
- 'acl',
'bus_pci',
'bus_vdev',
- 'bpf',
'cfgfile',
'cmdline',
- 'cryptodev',
- 'distributor',
'dmadev',
- 'efd',
'ethdev',
- 'eventdev',
- 'fib',
- 'flow_classify',
- 'graph',
'hash',
- 'ipsec',
- 'lpm',
- 'member',
- 'node',
- 'pipeline',
- 'port',
- 'rawdev',
'rcu',
- 'reorder',
- 'rib',
'ring',
'security',
'stack',
@@ -334,39 +310,68 @@ perf_test_names = [
]
driver_test_names = [
- 'cryptodev_aesni_mb_autotest',
- 'cryptodev_aesni_gcm_autotest',
- 'cryptodev_cn9k_autotest',
- 'cryptodev_cn10k_autotest',
- 'cryptodev_dpaa_sec_autotest',
- 'cryptodev_dpaa2_sec_autotest',
- 'cryptodev_null_autotest',
- 'cryptodev_octeontx2_autotest',
- 'cryptodev_openssl_autotest',
- 'cryptodev_openssl_asym_autotest',
- 'cryptodev_qat_autotest',
- 'cryptodev_sw_armv8_autotest',
- 'cryptodev_sw_kasumi_autotest',
- 'cryptodev_sw_mvsam_autotest',
- 'cryptodev_sw_snow3g_autotest',
- 'cryptodev_sw_zuc_autotest',
- 'dmadev_autotest',
- 'eventdev_selftest_octeontx',
- 'eventdev_selftest_sw',
- 'rawdev_autotest',
]
dump_test_names = [
- 'dump_struct_sizes',
- 'dump_mempool',
- 'dump_malloc_stats',
- 'dump_devargs',
- 'dump_log_types',
- 'dump_ring',
- 'dump_physmem',
- 'dump_memzone',
]
+if not is_windows
+ test_deps += [
+ 'acl',
+ 'bpf',
+ 'cryptodev',
+ 'distributor',
+ 'efd',
+ 'eventdev',
+ 'fib',
+ 'flow_classify',
+ 'graph',
+ 'ipsec',
+ 'lpm',
+ 'member',
+ 'node',
+ 'pipeline',
+ 'port',
+ 'rawdev',
+ 'reorder',
+ 'rib',
+ ]
+
+ driver_test_names += [
+ 'cryptodev_aesni_mb_autotest',
+ 'cryptodev_aesni_gcm_autotest',
+ 'cryptodev_cn9k_autotest',
+ 'cryptodev_cn10k_autotest',
+ 'cryptodev_dpaa_sec_autotest',
+ 'cryptodev_dpaa2_sec_autotest',
+ 'cryptodev_null_autotest',
+ 'cryptodev_octeontx2_autotest',
+ 'cryptodev_openssl_autotest',
+ 'cryptodev_openssl_asym_autotest',
+ 'cryptodev_qat_autotest',
+ 'cryptodev_sw_armv8_autotest',
+ 'cryptodev_sw_kasumi_autotest',
+ 'cryptodev_sw_mvsam_autotest',
+ 'cryptodev_sw_snow3g_autotest',
+ 'cryptodev_sw_zuc_autotest',
+ 'dmadev_autotest',
+ 'eventdev_selftest_octeontx',
+ 'eventdev_selftest_sw',
+ 'rawdev_autotest',
+ ]
+
+ dump_test_names += [
+ 'dump_struct_sizes',
+ 'dump_mempool',
+ 'dump_malloc_stats',
+ 'dump_devargs',
+ 'dump_log_types',
+ 'dump_ring',
+ 'dump_physmem',
+ 'dump_memzone',
+ ]
+endif
+
# The following linkages are an exception to allow running the
# unit tests without requiring that the developer install the
# DPDK libraries. Explicit linkage of drivers (plugin libraries)
@@ -385,7 +390,7 @@ if dpdk_conf.has('RTE_LIB_METRICS')
test_sources += ['test_metrics.c']
fast_tests += [['metrics_autotest', true]]
endif
-if dpdk_conf.has('RTE_LIB_TELEMETRY')
+if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
endif
--
2.31.0.vfs.0.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v14 06/11] app/test: differentiate a strerror on different OS
2021-12-08 18:59 ` [PATCH v14 06/11] app/test: differentiate a strerror on different OS Jie Zhou
@ 2021-12-08 19:07 ` Dmitry Kozlyuk
0 siblings, 0 replies; 245+ messages in thread
From: Dmitry Kozlyuk @ 2021-12-08 19:07 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
2021-12-08 10:59 (UTC-0800), Jie Zhou:
> On Windows, strerror returns just "Unknown error" for errnum greater
> than MAX_ERRNO, while linux and freebsd returns "Unknown error <num>",
> which is the current expectation for errno_autotest. Differentiate
> the error string on Windows to remove a "duplicate error code" failure.
>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v14 08/11] app/test: resolve name collision
2021-12-08 18:59 ` [PATCH v14 08/11] app/test: resolve name collision Jie Zhou
@ 2021-12-08 19:45 ` Dmitry Kozlyuk
0 siblings, 0 replies; 245+ messages in thread
From: Dmitry Kozlyuk @ 2021-12-08 19:45 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
2021-12-08 10:59 (UTC-0800), Jie Zhou:
> Add OP_ prefix to resolve name collision to enable hash_perf test
"name collision with Windows system headers"
>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v14 04/11] app/test: skip interrupt tests on Windows
2021-12-08 18:59 ` [PATCH v14 04/11] app/test: skip interrupt tests on Windows Jie Zhou
@ 2021-12-09 7:49 ` Jerin Jacob
2021-12-09 13:15 ` Aaron Conole
0 siblings, 1 reply; 245+ messages in thread
From: Jerin Jacob @ 2021-12-09 7:49 UTC (permalink / raw)
To: Jie Zhou
Cc: dpdk-dev, Dmitry Kozlyuk, Richardson, Bruce, roretzla,
Narcisa Ana Maria Vasile, Dmitry Malloy (MESHCHANINOV),
Pallavi Kadam, talshn, Thomas Monjalon, Aaron Conole
On Thu, Dec 9, 2021 at 12:30 AM Jie Zhou <jizh@linux.microsoft.com> wrote:
>
> Even though test_interrupts.c can compile on Windows, skip interrupt
> tests for now since majority of eal_interrupt on Windows are stubs.
> Will remove the skip after interrupt being fully enabled on Windows.
>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
>
> ---
> app/test/test_interrupts.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
> index 2a05399f96..eec9b2805b 100644
> --- a/app/test/test_interrupts.c
> +++ b/app/test/test_interrupts.c
> @@ -12,6 +12,15 @@
>
> #include "test.h"
>
> +#ifdef RTE_EXEC_ENV_WINDOWS
Across the series,
Instead of adding conditional compilation everywhere, Why not disable
specific file
for compilation for windows?
Purpose of EAL to abstract the differences in execution environment
and application
should not know that.
> +static int
> +test_interrupt(void)
> +{
> + printf("Interrupt on Windows is not fully supported yet, skipping test\n");
> + return TEST_SKIPPED;
> +}
> +#else
> +
> #define TEST_INTERRUPT_CHECK_INTERVAL 100 /* ms */
>
> /* predefined interrupt handle types */
> @@ -590,5 +599,6 @@ test_interrupt(void)
>
> return ret;
> }
> +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
>
> REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
> --
> 2.31.0.vfs.0.1
>
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v14 04/11] app/test: skip interrupt tests on Windows
2021-12-09 7:49 ` Jerin Jacob
@ 2021-12-09 13:15 ` Aaron Conole
2021-12-09 16:17 ` Bruce Richardson
0 siblings, 1 reply; 245+ messages in thread
From: Aaron Conole @ 2021-12-09 13:15 UTC (permalink / raw)
To: Jerin Jacob
Cc: Jie Zhou, dpdk-dev, Dmitry Kozlyuk, Richardson, Bruce, roretzla,
Narcisa Ana Maria Vasile, Dmitry Malloy (MESHCHANINOV),
Pallavi Kadam, talshn, Thomas Monjalon
Jerin Jacob <jerinjacobk@gmail.com> writes:
> On Thu, Dec 9, 2021 at 12:30 AM Jie Zhou <jizh@linux.microsoft.com> wrote:
>>
>> Even though test_interrupts.c can compile on Windows, skip interrupt
>> tests for now since majority of eal_interrupt on Windows are stubs.
>> Will remove the skip after interrupt being fully enabled on Windows.
>>
>> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
>> Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
>>
>> ---
>> app/test/test_interrupts.c | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
>> index 2a05399f96..eec9b2805b 100644
>> --- a/app/test/test_interrupts.c
>> +++ b/app/test/test_interrupts.c
>> @@ -12,6 +12,15 @@
>>
>> #include "test.h"
>>
>> +#ifdef RTE_EXEC_ENV_WINDOWS
>
> Across the series,
> Instead of adding conditional compilation everywhere, Why not disable
> specific file
> for compilation for windows?
> Purpose of EAL to abstract the differences in execution environment
> and application
> should not know that.
I think this was done because there would be two test lists in the meson
unit test file. But this is the second comment about these ifdef's, and
maybe we should revisit that discussion. Is there a different way to
accomplish not running the tests which are not appropriate for windows
builds, while not having two overlapping lists of unit tests in the
meson build file?
>> +static int
>> +test_interrupt(void)
>> +{
>> + printf("Interrupt on Windows is not fully supported yet, skipping test\n");
>> + return TEST_SKIPPED;
>> +}
>> +#else
>> +
>> #define TEST_INTERRUPT_CHECK_INTERVAL 100 /* ms */
>>
>> /* predefined interrupt handle types */
>> @@ -590,5 +599,6 @@ test_interrupt(void)
>>
>> return ret;
>> }
>> +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
>>
>> REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
>> --
>> 2.31.0.vfs.0.1
>>
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v14 04/11] app/test: skip interrupt tests on Windows
2021-12-09 13:15 ` Aaron Conole
@ 2021-12-09 16:17 ` Bruce Richardson
2021-12-09 16:19 ` Richardson, Bruce
2021-12-09 16:39 ` Bruce Richardson
0 siblings, 2 replies; 245+ messages in thread
From: Bruce Richardson @ 2021-12-09 16:17 UTC (permalink / raw)
To: Aaron Conole
Cc: Jerin Jacob, Jie Zhou, dpdk-dev, Dmitry Kozlyuk, roretzla,
Narcisa Ana Maria Vasile, Dmitry Malloy (MESHCHANINOV),
Pallavi Kadam, talshn, Thomas Monjalon
On Thu, Dec 09, 2021 at 08:15:01AM -0500, Aaron Conole wrote:
> Jerin Jacob <jerinjacobk@gmail.com> writes:
>
> > On Thu, Dec 9, 2021 at 12:30 AM Jie Zhou <jizh@linux.microsoft.com> wrote:
> >>
> >> Even though test_interrupts.c can compile on Windows, skip interrupt
> >> tests for now since majority of eal_interrupt on Windows are stubs.
> >> Will remove the skip after interrupt being fully enabled on Windows.
> >>
> >> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> >> Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> >>
> >> ---
> >> app/test/test_interrupts.c | 10 ++++++++++
> >> 1 file changed, 10 insertions(+)
> >>
> >> diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
> >> index 2a05399f96..eec9b2805b 100644
> >> --- a/app/test/test_interrupts.c
> >> +++ b/app/test/test_interrupts.c
> >> @@ -12,6 +12,15 @@
> >>
> >> #include "test.h"
> >>
> >> +#ifdef RTE_EXEC_ENV_WINDOWS
> >
> > Across the series,
> > Instead of adding conditional compilation everywhere, Why not disable
> > specific file
> > for compilation for windows?
> > Purpose of EAL to abstract the differences in execution environment
> > and application
> > should not know that.
>
> I think this was done because there would be two test lists in the meson
> unit test file. But this is the second comment about these ifdef's, and
> maybe we should revisit that discussion. Is there a different way to
> accomplish not running the tests which are not appropriate for windows
> builds, while not having two overlapping lists of unit tests in the
> meson build file?
>
I'm wondering if a reasonable compromise solution might be to have the
build system expose a usable RTE_EXEC_ENV symbol that can be used in C-code
if statements rather than just in ifdefs. That would allow us to easily add
e.g.
if (RTE_EXEC_ENV == rte_env_linux)
return TEST_SKIPPED;
into each test function needing it. Two lines of C-code is a lot easier to
add and manage than #ifdefs covering the whole file, or alternative lists
in meson.
/Bruce
^ permalink raw reply [flat|nested] 245+ messages in thread
* RE: [PATCH v14 04/11] app/test: skip interrupt tests on Windows
2021-12-09 16:17 ` Bruce Richardson
@ 2021-12-09 16:19 ` Richardson, Bruce
2021-12-09 16:39 ` Bruce Richardson
1 sibling, 0 replies; 245+ messages in thread
From: Richardson, Bruce @ 2021-12-09 16:19 UTC (permalink / raw)
To: Richardson, Bruce, Aaron Conole
Cc: Jerin Jacob, Jie Zhou, dpdk-dev, Dmitry Kozlyuk, roretzla,
Narcisa Ana Maria Vasile, Dmitry Malloy (MESHCHANINOV),
Kadam, Pallavi, talshn, Thomas Monjalon
> -----Original Message-----
> From: Bruce Richardson <bruce.richardson@intel.com>
> Sent: Thursday, December 9, 2021 4:17 PM
> To: Aaron Conole <aconole@redhat.com>
> Cc: Jerin Jacob <jerinjacobk@gmail.com>; Jie Zhou
> <jizh@linux.microsoft.com>; dpdk-dev <dev@dpdk.org>; Dmitry Kozlyuk
> <dmitry.kozliuk@gmail.com>; roretzla@microsoft.com; Narcisa Ana Maria
> Vasile <navasile@linux.microsoft.com>; Dmitry Malloy (MESHCHANINOV)
> <dmitrym@microsoft.com>; Kadam, Pallavi <pallavi.kadam@intel.com>;
> talshn@nvidia.com; Thomas Monjalon <thomas@monjalon.net>
> Subject: Re: [PATCH v14 04/11] app/test: skip interrupt tests on Windows
>
> On Thu, Dec 09, 2021 at 08:15:01AM -0500, Aaron Conole wrote:
> > Jerin Jacob <jerinjacobk@gmail.com> writes:
> >
> > > On Thu, Dec 9, 2021 at 12:30 AM Jie Zhou <jizh@linux.microsoft.com>
> wrote:
> > >>
> > >> Even though test_interrupts.c can compile on Windows, skip interrupt
> > >> tests for now since majority of eal_interrupt on Windows are stubs.
> > >> Will remove the skip after interrupt being fully enabled on Windows.
> > >>
> > >> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > >> Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> > >>
> > >> ---
> > >> app/test/test_interrupts.c | 10 ++++++++++
> > >> 1 file changed, 10 insertions(+)
> > >>
> > >> diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
> > >> index 2a05399f96..eec9b2805b 100644
> > >> --- a/app/test/test_interrupts.c
> > >> +++ b/app/test/test_interrupts.c
> > >> @@ -12,6 +12,15 @@
> > >>
> > >> #include "test.h"
> > >>
> > >> +#ifdef RTE_EXEC_ENV_WINDOWS
> > >
> > > Across the series,
> > > Instead of adding conditional compilation everywhere, Why not disable
> > > specific file
> > > for compilation for windows?
> > > Purpose of EAL to abstract the differences in execution environment
> > > and application
> > > should not know that.
> >
> > I think this was done because there would be two test lists in the meson
> > unit test file. But this is the second comment about these ifdef's, and
> > maybe we should revisit that discussion. Is there a different way to
> > accomplish not running the tests which are not appropriate for windows
> > builds, while not having two overlapping lists of unit tests in the
> > meson build file?
> >
> I'm wondering if a reasonable compromise solution might be to have the
> build system expose a usable RTE_EXEC_ENV symbol that can be used in C-
> code
> if statements rather than just in ifdefs. That would allow us to easily
> add
> e.g.
>
> if (RTE_EXEC_ENV == rte_env_linux)
> return TEST_SKIPPED;
or even " == rte_env_windows" for this case! 😊
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v14 04/11] app/test: skip interrupt tests on Windows
2021-12-09 16:17 ` Bruce Richardson
2021-12-09 16:19 ` Richardson, Bruce
@ 2021-12-09 16:39 ` Bruce Richardson
2021-12-10 9:23 ` Dmitry Kozlyuk
1 sibling, 1 reply; 245+ messages in thread
From: Bruce Richardson @ 2021-12-09 16:39 UTC (permalink / raw)
To: Aaron Conole
Cc: Jerin Jacob, Jie Zhou, dpdk-dev, Dmitry Kozlyuk, roretzla,
Narcisa Ana Maria Vasile, Dmitry Malloy (MESHCHANINOV),
Pallavi Kadam, talshn, Thomas Monjalon
On Thu, Dec 09, 2021 at 04:17:08PM +0000, Bruce Richardson wrote:
> On Thu, Dec 09, 2021 at 08:15:01AM -0500, Aaron Conole wrote:
> > Jerin Jacob <jerinjacobk@gmail.com> writes:
> >
> > > On Thu, Dec 9, 2021 at 12:30 AM Jie Zhou <jizh@linux.microsoft.com> wrote:
> > >>
> > >> Even though test_interrupts.c can compile on Windows, skip interrupt
> > >> tests for now since majority of eal_interrupt on Windows are stubs.
> > >> Will remove the skip after interrupt being fully enabled on Windows.
> > >>
> > >> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > >> Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> > >>
> > >> ---
> > >> app/test/test_interrupts.c | 10 ++++++++++
> > >> 1 file changed, 10 insertions(+)
> > >>
> > >> diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
> > >> index 2a05399f96..eec9b2805b 100644
> > >> --- a/app/test/test_interrupts.c
> > >> +++ b/app/test/test_interrupts.c
> > >> @@ -12,6 +12,15 @@
> > >>
> > >> #include "test.h"
> > >>
> > >> +#ifdef RTE_EXEC_ENV_WINDOWS
> > >
> > > Across the series,
> > > Instead of adding conditional compilation everywhere, Why not disable
> > > specific file
> > > for compilation for windows?
> > > Purpose of EAL to abstract the differences in execution environment
> > > and application
> > > should not know that.
> >
> > I think this was done because there would be two test lists in the meson
> > unit test file. But this is the second comment about these ifdef's, and
> > maybe we should revisit that discussion. Is there a different way to
> > accomplish not running the tests which are not appropriate for windows
> > builds, while not having two overlapping lists of unit tests in the
> > meson build file?
> >
> I'm wondering if a reasonable compromise solution might be to have the
> build system expose a usable RTE_EXEC_ENV symbol that can be used in C-code
> if statements rather than just in ifdefs. That would allow us to easily add
> e.g.
>
> if (RTE_EXEC_ENV == rte_env_linux)
> return TEST_SKIPPED;
>
> into each test function needing it. Two lines of C-code is a lot easier to
> add and manage than #ifdefs covering the whole file, or alternative lists
> in meson.
>
Quick patch to allow C-code comparisons:
diff --git a/lib/eal/meson.build b/lib/eal/meson.build
index 1722924f67..b5b9fa14b4 100644
--- a/lib/eal/meson.build
+++ b/lib/eal/meson.build
@@ -10,6 +10,12 @@ if not is_windows
subdir('unix')
endif
+exec_envs = {'freebsd': 0, 'linux': 1, 'windows': 2}
+foreach env, id:exec_envs
+ dpdk_conf.set('RTE_ENV_' + env.to_upper(), id)
+endforeach
+dpdk_conf.set('RTE_EXEC_ENV', exec_envs[exec_env])
+
dpdk_conf.set('RTE_EXEC_ENV_' + exec_env.to_upper(), 1)
subdir(exec_env)
A slightly simpler patch would just expose the environment as a string as
e.g. "linux", but I think numeric ids just make the code better rather than
having string comparisons. Alternatively, this could also be done via
C-code with ifdefs in EAL, but as it stands this meson change allows:
if (RTE_EXEC_ENV == RTE_ENV_WINDOWS)
...
or:
switch (RTE_EXEC_ENV) {
case RTE_ENV_LINUX: ... ; break;
case RTE_ENV_FREEBSD: ... ; break;
case RTE_ENV_WINDOWS: ... ; break;
}
Thoughts?
/Bruce
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v14 02/11] app/test: remove POSIX-specific code
2021-12-08 18:59 ` [PATCH v14 02/11] app/test: remove POSIX-specific code Jie Zhou
@ 2021-12-09 19:46 ` Tyler Retzlaff
0 siblings, 0 replies; 245+ messages in thread
From: Tyler Retzlaff @ 2021-12-09 19:46 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, dmitry.kozliuk, bruce.richardson, roretzla, navasile,
dmitrym, pallavi.kadam, talshn, thomas, aconole
On Wed, Dec 08, 2021 at 10:59:51AM -0800, Jie Zhou wrote:
> - Replace POSIX-specific code with DPDK equivalents or
> conditionally disable it on Windows
> - Use NUL on Windows as /dev/null for Unix
> - Exclude tests not supported on Windows yet
> * multi-process
> * PMD performance statistics display on signal
>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
>
> ---
> app/test/commands.c | 2 --
> app/test/packet_burst_generator.c | 1 +
> app/test/process.h | 4 +++-
> app/test/test.c | 5 ++++-
> app/test/test_byteorder.c | 2 +-
> app/test/test_cmdline_ipaddr.c | 13 ++++++-------
> app/test/test_cmdline_lib.c | 13 +++++++++----
> app/test/test_crc.c | 1 -
> app/test/test_memcpy_perf.c | 29 +++++++++++++++--------------
> app/test/test_pmd_perf.c | 6 +++++-
> app/test/test_ring_stress_impl.h | 2 +-
> app/test/test_telemetry_data.c | 2 ++
> 12 files changed, 47 insertions(+), 33 deletions(-)
>
> diff --git a/app/test/commands.c b/app/test/commands.c
> index 2dced3bc44..887cabad64 100644
> --- a/app/test/commands.c
> +++ b/app/test/commands.c
> @@ -8,8 +8,6 @@
> #include <stdint.h>
> #include <string.h>
> #include <stdlib.h>
> -#include <netinet/in.h>
> -#include <termios.h>
> #include <inttypes.h>
> #include <errno.h>
> #include <sys/queue.h>
> diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
> index 8ac24577ba..6b42b9b83b 100644
> --- a/app/test/packet_burst_generator.c
> +++ b/app/test/packet_burst_generator.c
> @@ -5,6 +5,7 @@
> #include <rte_byteorder.h>
> #include <rte_mbuf.h>
> #include <rte_ip.h>
> +#include <rte_os_shim.h>
>
> #include "packet_burst_generator.h"
>
> diff --git a/app/test/process.h b/app/test/process.h
> index 5b10cf64df..1f073b9c5c 100644
> --- a/app/test/process.h
> +++ b/app/test/process.h
> @@ -7,12 +7,14 @@
>
> #include <errno.h> /* errno */
> #include <limits.h> /* PATH_MAX */
> +#ifndef RTE_EXEC_ENV_WINDOWS
> #include <libgen.h> /* basename et al */
> +#include <sys/wait.h>
> +#endif
> #include <stdlib.h> /* NULL */
> #include <string.h> /* strerror */
> #include <unistd.h> /* readlink */
> #include <dirent.h>
> -#include <sys/wait.h>
>
> #include <rte_string_fns.h> /* strlcpy */
>
> diff --git a/app/test/test.c b/app/test/test.c
> index 5194131026..e69cae3eea 100644
> --- a/app/test/test.c
> +++ b/app/test/test.c
> @@ -8,7 +8,6 @@
> #include <stdarg.h>
> #include <stdlib.h>
> #include <errno.h>
> -#include <termios.h>
> #include <ctype.h>
> #include <sys/queue.h>
>
> @@ -63,7 +62,9 @@ do_recursive_call(void)
> const char *env_var;
> int (*action_fn)(void);
> } actions[] = {
> +#ifndef RTE_EXEC_ENV_WINDOWS
> { "run_secondary_instances", test_mp_secondary },
> +#endif
> #ifdef RTE_LIB_PDUMP
> #ifdef RTE_NET_RING
> { "run_pdump_server_tests", test_pdump },
> @@ -82,7 +83,9 @@ do_recursive_call(void)
> { "test_file_prefix", no_action },
> { "test_no_huge_flag", no_action },
> #ifdef RTE_LIB_TIMER
> +#ifndef RTE_EXEC_ENV_WINDOWS
> { "timer_secondary_spawn_wait", test_timer_secondary },
> +#endif
> #endif
> };
>
> diff --git a/app/test/test_byteorder.c b/app/test/test_byteorder.c
> index 03c08d9abf..de14ed539e 100644
> --- a/app/test/test_byteorder.c
> +++ b/app/test/test_byteorder.c
> @@ -46,7 +46,7 @@ test_byteorder(void)
> return -1;
>
> res_u16 = rte_bswap16(0x1337);
> - printf("const %"PRIx16" -> %"PRIx16"\n", 0x1337, res_u16);
> + printf("const %"PRIx16" -> %"PRIx16"\n", (uint16_t)0x1337, res_u16);
> if (res_u16 != 0x3713)
> return -1;
>
> diff --git a/app/test/test_cmdline_ipaddr.c b/app/test/test_cmdline_ipaddr.c
> index 2a1ee120fc..f540063508 100644
> --- a/app/test/test_cmdline_ipaddr.c
> +++ b/app/test/test_cmdline_ipaddr.c
> @@ -1,12 +1,9 @@
> /* SPDX-License-Identifier: BSD-3-Clause
> * Copyright(c) 2010-2014 Intel Corporation
> */
> -
> #include <stdio.h>
> #include <string.h>
> #include <inttypes.h>
> -#include <netinet/in.h>
> -#include <sys/socket.h>
>
> #include <rte_string_fns.h>
>
> @@ -15,7 +12,7 @@
>
> #include "test_cmdline.h"
>
> -#define IP4(a,b,c,d) {((uint32_t)(((a) & 0xff)) | \
> +#define IP4(a,b,c,d) {.s_addr = (uint32_t)(((a) & 0xff) | \
> (((b) & 0xff) << 8) | \
> (((c) & 0xff) << 16) | \
> ((d) & 0xff) << 24)}
> @@ -25,7 +22,11 @@
>
> /* create IPv6 address, swapping bytes where needed */
> #ifndef s6_addr16
> -# define s6_addr16 __u6_addr.__u6_addr16
> +#ifdef RTE_EXEC_ENV_WINDOWS
> +#define s6_addr16 u.Word
> +#else
> +#define s6_addr16 __u6_addr.__u6_addr16
> +#endif
> #endif
> #define IP6(a,b,c,d,e,f,g,h) .ipv6 = \
> {.s6_addr16 = \
> @@ -166,8 +167,6 @@ const char * ipaddr_garbage_network6_strs[] = {
> };
> #define IPv6_GARBAGE_PREFIX 64
>
> -
> -
> const char * ipaddr_invalid_strs[] = {
> /** IPv4 **/
>
> diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
> index f50ccdb599..fcd58cb76a 100644
> --- a/app/test/test_cmdline_lib.c
> +++ b/app/test/test_cmdline_lib.c
> @@ -8,7 +8,6 @@
> #include <stdarg.h>
> #include <stdlib.h>
> #include <errno.h>
> -#include <termios.h>
> #include <ctype.h>
> #include <sys/queue.h>
>
> @@ -22,6 +21,12 @@
>
> #include "test_cmdline.h"
>
> +#ifndef RTE_EXEC_ENV_WINDOWS
> +#define NULL_INPUT "/dev/null"
> +#else
> +#define NULL_INPUT "NUL"
> +#endif
> +
> /****************************************************************/
> /* static functions required for some tests */
> static void
> @@ -156,10 +161,10 @@ test_cmdline_socket_fns(void)
> cl = cmdline_stdin_new(&ctx, NULL);
> if (cl != NULL)
> goto error;
> - cl = cmdline_file_new(NULL, "prompt", "/dev/null");
> + cl = cmdline_file_new(NULL, "prompt", NULL_INPUT);
> if (cl != NULL)
> goto error;
> - cl = cmdline_file_new(&ctx, NULL, "/dev/null");
> + cl = cmdline_file_new(&ctx, NULL, NULL_INPUT);
> if (cl != NULL)
> goto error;
> cl = cmdline_file_new(&ctx, "prompt", NULL);
> @@ -171,7 +176,7 @@ test_cmdline_socket_fns(void)
> cmdline_free(cl);
> return -1;
> }
> - cl = cmdline_file_new(&ctx, "prompt", "/dev/null");
> + cl = cmdline_file_new(&ctx, "prompt", NULL_INPUT);
> if (cl == NULL) {
> printf("Error: failed to open /dev/null for reading!");
> return -1;
> diff --git a/app/test/test_crc.c b/app/test/test_crc.c
> index bf1d344359..0ed080e482 100644
> --- a/app/test/test_crc.c
> +++ b/app/test/test_crc.c
> @@ -14,7 +14,6 @@
> #define CRC32_VEC_LEN2 348
> #define CRC16_VEC_LEN1 12
> #define CRC16_VEC_LEN2 2
> -#define LINE_LEN 75
>
> /* CRC test vector */
> static const uint8_t crc_vec[CRC_VEC_LEN] = {
> diff --git a/app/test/test_memcpy_perf.c b/app/test/test_memcpy_perf.c
> index c711e36ba7..3727c160e6 100644
> --- a/app/test/test_memcpy_perf.c
> +++ b/app/test/test_memcpy_perf.c
> @@ -6,10 +6,11 @@
> #include <stdio.h>
> #include <string.h>
> #include <stdlib.h>
> -#include <sys/time.h>
> +#include <time.h>
>
> #include <rte_common.h>
> #include <rte_cycles.h>
> +#include <rte_os_shim.h>
> #include <rte_random.h>
> #include <rte_malloc.h>
>
> @@ -271,7 +272,7 @@ static int
> perf_test(void)
> {
> int ret;
> - struct timeval tv_begin, tv_end;
> + struct timespec tv_begin, tv_end;
> double time_aligned, time_unaligned;
> double time_aligned_const, time_unaligned_const;
>
> @@ -298,32 +299,32 @@ perf_test(void)
> printf("\n================================= %2dB aligned =================================",
> ALIGNMENT_UNIT);
> /* Do aligned tests where size is a variable */
> - gettimeofday(&tv_begin, NULL);
> + timespec_get(&tv_begin, TIME_UTC);
> perf_test_variable_aligned();
> - gettimeofday(&tv_end, NULL);
> + timespec_get(&tv_end, TIME_UTC);
> time_aligned = (double)(tv_end.tv_sec - tv_begin.tv_sec)
> - + ((double)tv_end.tv_usec - tv_begin.tv_usec)/1000000;
> + + ((double)tv_end.tv_nsec - tv_begin.tv_nsec) / NS_PER_S;
> printf("\n------- ----------------- ----------------- ----------------- -----------------");
> /* Do aligned tests where size is a compile-time constant */
> - gettimeofday(&tv_begin, NULL);
> + timespec_get(&tv_begin, TIME_UTC);
> perf_test_constant_aligned();
> - gettimeofday(&tv_end, NULL);
> + timespec_get(&tv_end, TIME_UTC);
> time_aligned_const = (double)(tv_end.tv_sec - tv_begin.tv_sec)
> - + ((double)tv_end.tv_usec - tv_begin.tv_usec)/1000000;
> + + ((double)tv_end.tv_nsec - tv_begin.tv_nsec) / NS_PER_S;
> printf("\n================================== Unaligned ==================================");
> /* Do unaligned tests where size is a variable */
> - gettimeofday(&tv_begin, NULL);
> + timespec_get(&tv_begin, TIME_UTC);
> perf_test_variable_unaligned();
> - gettimeofday(&tv_end, NULL);
> + timespec_get(&tv_end, TIME_UTC);
> time_unaligned = (double)(tv_end.tv_sec - tv_begin.tv_sec)
> - + ((double)tv_end.tv_usec - tv_begin.tv_usec)/1000000;
> + + ((double)tv_end.tv_nsec - tv_begin.tv_nsec) / NS_PER_S;
> printf("\n------- ----------------- ----------------- ----------------- -----------------");
> /* Do unaligned tests where size is a compile-time constant */
> - gettimeofday(&tv_begin, NULL);
> + timespec_get(&tv_begin, TIME_UTC);
> perf_test_constant_unaligned();
> - gettimeofday(&tv_end, NULL);
> + timespec_get(&tv_end, TIME_UTC);
> time_unaligned_const = (double)(tv_end.tv_sec - tv_begin.tv_sec)
> - + ((double)tv_end.tv_usec - tv_begin.tv_usec)/1000000;
> + + ((double)tv_end.tv_nsec - tv_begin.tv_nsec) / NS_PER_S;
> printf("\n======= ================= ================= ================= =================\n\n");
>
> printf("Test Execution Time (seconds):\n");
> diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
> index 0aa9dc1b1c..25611bfe9b 100644
> --- a/app/test/test_pmd_perf.c
> +++ b/app/test/test_pmd_perf.c
> @@ -296,6 +296,7 @@ reset_count(void)
> idle = 0;
> }
>
> +#ifndef RTE_EXEC_ENV_WINDOWS
> static void
> stats_display(uint16_t port_id)
> {
> @@ -325,6 +326,7 @@ signal_handler(int signum)
> if (signum == SIGUSR2)
> stats_display(0);
> }
> +#endif
>
> struct rte_mbuf **tx_burst;
>
> @@ -638,7 +640,7 @@ exec_burst(uint32_t flags, int lcore)
> i = (i >= conf->nb_ports - 1) ? 0 : (i + 1);
> }
>
> - sleep(5);
> + rte_delay_us(5 * US_PER_S);
>
> /* only when polling second */
> if (flags == SC_BURST_XMIT_FIRST)
> @@ -669,8 +671,10 @@ test_pmd_perf(void)
>
> printf("Start PMD RXTX cycles cost test.\n");
>
> +#ifndef RTE_EXEC_ENV_WINDOWS
> signal(SIGUSR1, signal_handler);
> signal(SIGUSR2, signal_handler);
> +#endif
>
> nb_ports = rte_eth_dev_count_avail();
> if (nb_ports < NB_ETHPORTS_USED) {
> diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h
> index 2825a9dce6..62f046a91a 100644
> --- a/app/test/test_ring_stress_impl.h
> +++ b/app/test/test_ring_stress_impl.h
> @@ -360,7 +360,7 @@ test_mt1(int (*test)(void *))
> /* signal worker to start test */
> __atomic_store_n(&wrk_cmd, WRK_CMD_RUN, __ATOMIC_RELEASE);
>
> - usleep(run_time * US_PER_S);
> + rte_delay_us(run_time * US_PER_S);
>
> /* signal worker to start test */
> __atomic_store_n(&wrk_cmd, WRK_CMD_STOP, __ATOMIC_RELEASE);
> diff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c
> index 18b93db8ef..73eee293a1 100644
> --- a/app/test/test_telemetry_data.c
> +++ b/app/test/test_telemetry_data.c
> @@ -4,7 +4,9 @@
>
> #include <string.h>
> #include <sys/socket.h>
> +#ifndef RTE_EXEC_ENV_WINDOWS
> #include <sys/un.h>
> +#endif
> #include <unistd.h>
> #include <limits.h>
>
> --
> 2.31.0.vfs.0.1
lgtm
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v14 09/11] app/test: add test stubs for not supported ones
2021-12-08 18:59 ` [PATCH v14 09/11] app/test: add test stubs for not supported ones Jie Zhou
@ 2021-12-09 19:47 ` Tyler Retzlaff
0 siblings, 0 replies; 245+ messages in thread
From: Tyler Retzlaff @ 2021-12-09 19:47 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, dmitry.kozliuk, bruce.richardson, roretzla, navasile,
dmitrym, pallavi.kadam, talshn, thomas, aconole
On Wed, Dec 08, 2021 at 10:59:58AM -0800, Jie Zhou wrote:
> Add test stubs for 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>
>
> ---
> 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 | 12 ++++
> app/test/test_graph.c | 18 ++++-
> app/test/test_graph_perf.c | 16 ++++-
> app/test/test_hash_perf.c | 12 ++++
> app/test/test_ipfrag.c | 16 ++++-
> app/test/test_ipsec.c | 15 +++-
> 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 | 12 ++++
> 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 | 12 ++++
> 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 | 4 +-
> 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, 880 insertions(+), 72 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 <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 /*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 46bcb51f86..055df252ba 100644
> --- a/app/test/test_bpf.c
> +++ b/app/test/test_bpf.c
> @@ -14,11 +14,22 @@
> #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 +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 10b48cdadb..f83c844e42 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 <time.h>
>
> #include <rte_common.h>
> @@ -15739,3 +15741,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 9d19a6d6d9..680ced4dbe 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 <rte_bus_vdev.h>
> #include <rte_common.h>
> #include <rte_hexdump.h>
> @@ -2429,3 +2431,5 @@ REGISTER_TEST_COMMAND(cryptodev_octeontx2_asym_autotest,
> test_cryptodev_octeontx2_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 <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 /*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 <rte_common.h>
> #include <rte_cryptodev.h>
> #include <rte_esp.h>
> @@ -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 <time.h>
>
> #include <rte_common.h>
> @@ -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 <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 /*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 <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 @@ 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 <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 /*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 <string.h>
> #include <stdarg.h>
> +
> +#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 <libgen.h>
> #include <stdlib.h>
> #include <errno.h>
> @@ -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 <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 /*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 <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 /*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..8f5fd78723 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 <string.h>
> #include <rte_common.h>
> #include <rte_mempool.h>
> #include <rte_mbuf.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_cryptodev.h>
> #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 /*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 <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 /*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 <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 /*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 <math.h>
>
> @@ -10,6 +11,17 @@
> #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 +33,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 +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 843d9766b0..fee2ecaa22 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 <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
> @@ -1048,7 +1058,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);
> @@ -1058,3 +1072,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 <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 +33,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 +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 <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 /*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 <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 /*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 <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);
> diff --git a/app/test/test_fib_perf.c b/app/test/test_fib_perf.c
> index 86b2f832b8..ec7f20e102 100644
> --- a/app/test/test_fib_perf.c
> +++ b/app/test/test_fib_perf.c
> @@ -12,11 +12,22 @@
> #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 /*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 <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 /*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..2924308dda 100644
> --- a/app/test/test_func_reentrancy.c
> +++ b/app/test/test_func_reentrancy.c
> @@ -40,6 +40,16 @@
>
> #include "test.h"
>
> +#ifdef RTE_EXEC_ENV_WINDOWS
> +static int
> +test_func_reentrancy(void)
> +{
> + printf("reentrancy not supported on Windows, skipping test\n");
> + return TEST_SKIPPED;
> +}
> +
> +#else
> +
> typedef int (*case_func_t)(void* arg);
> typedef void (*case_clean_t)(unsigned lcore_id);
>
> @@ -511,4 +521,6 @@ test_func_reentrancy(void)
> return 0;
> }
>
> +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
> +
> REGISTER_TEST_COMMAND(func_reentrancy_autotest, test_func_reentrancy);
> 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 <assert.h>
> #include <inttypes.h>
> #include <signal.h>
> @@ -9,14 +11,23 @@
> #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 +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 <inttypes.h>
> #include <signal.h>
> #include <stdio.h>
> @@ -9,14 +11,22 @@
> #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 +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..a3e9f43967 100644
> --- a/app/test/test_hash_perf.c
> +++ b/app/test/test_hash_perf.c
> @@ -17,6 +17,16 @@
>
> #include "test.h"
>
> +#ifdef RTE_EXEC_ENV_WINDOWS
> +static int
> +test_hash_perf(void)
> +{
> + printf("hash_perf not supported on Windows, skipping test\n");
> + return TEST_SKIPPED;
> +}
> +
> +#else
> +
> #define MAX_ENTRIES (1 << 19)
> #define KEYS_TO_ADD (MAX_ENTRIES)
> #define ADD_PERCENT 0.75 /* 75% table utilization */
> @@ -749,4 +759,6 @@ test_hash_perf(void)
> return 0;
> }
>
> +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
> +
> REGISTER_TEST_COMMAND(hash_perf_autotest, test_hash_perf);
> 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 <time.h>
>
> @@ -8,13 +9,22 @@
> #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 +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..ed4d166f0d 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 <time.h>
>
> @@ -13,15 +14,25 @@
> #include <rte_bus_vdev.h>
> #include <rte_ip.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_crypto.h>
> #include <rte_cryptodev.h>
> #include <rte_lcore.h>
> +
> #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 /*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 <stdio.h>
> #include <rte_ip.h>
> @@ -8,10 +9,20 @@
> #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 +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 <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 +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 40ab0d5c4c..8f4e92f6ca 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 <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>
> diff --git a/app/test/test_lcores.c b/app/test/test_lcores.c
> index 35c47d5372..2277ae597f 100644
> --- a/app/test/test_lcores.c
> +++ b/app/test/test_lcores.c
> @@ -11,6 +11,16 @@
>
> #include "test.h"
>
> +#ifdef RTE_EXEC_ENV_WINDOWS
> +static int
> +test_lcores(void)
> +{
> + printf("lcore not supported on Windows, skipping test\n");
> + return TEST_SKIPPED;
> +}
> +
> +#else
> +
> struct thread_context {
> enum { INIT, ERROR, DONE } state;
> bool lcore_id_any;
> @@ -411,4 +421,6 @@ test_lcores(void)
> return TEST_SUCCESS;
> }
>
> +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
> +
> REGISTER_TEST_COMMAND(lcores_autotest, test_lcores);
> 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 <stdio.h>
> #include <stdint.h>
> @@ -10,7 +21,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 +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 <stdio.h>
> #include <stdint.h>
> @@ -8,9 +9,18 @@
> #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 +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 <stdio.h>
> #include <stdint.h>
> @@ -12,7 +23,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 +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 <stdio.h>
> #include <stdint.h>
> #include <stdlib.h>
> @@ -15,7 +25,6 @@
> #include <rte_ip.h>
> #include <rte_lpm.h>
>
> -#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 <stdio.h>
> #include <stdint.h>
> @@ -8,7 +9,9 @@
> #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>
>
> @@ -23,11 +26,8 @@
> #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 +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 <string.h>
> #include <stdarg.h>
> @@ -33,8 +34,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 +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 <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 /*!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 40aa4c8627..85f3a126b9 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 <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 +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 <stdio.h>
> #include <inttypes.h>
> @@ -11,9 +12,18 @@
> #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 +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 <rte_os_shim.h>
> #include <rte_random.h>
> #include <rte_malloc.h>
> -
> #include <rte_memcpy.h>
>
> #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 <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 /*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 <stdlib.h>
> #include <stdio.h>
> #include <string.h>
> @@ -12,8 +38,6 @@
> #include <time.h>
> #include <math.h>
>
> -#include "test.h"
> -
> #include <rte_pie.h>
>
> #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 <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 /*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..9209fb2658 100644
> --- a/app/test/test_rcu_qsbr_perf.c
> +++ b/app/test/test_rcu_qsbr_perf.c
> @@ -15,6 +15,16 @@
>
> #include "test.h"
>
> +#ifdef RTE_EXEC_ENV_WINDOWS
> +static int
> +test_rcu_qsbr_main(void)
> +{
> + printf("rcu_qsbr_main not supported on Windows, skipping test\n");
> + return TEST_SKIPPED;
> +}
> +
> +#else
> +
> /* Check condition and return an error if true. */
> static uint16_t enabled_core_ids[RTE_MAX_LCORE];
> static unsigned int num_cores;
> @@ -687,4 +697,6 @@ test_rcu_qsbr_main(void)
> return -1;
> }
>
> +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
> +
> REGISTER_TEST_COMMAND(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
> diff --git a/app/test/test_red.c b/app/test/test_red.c
> index 05936cfee8..524f9c9b6d 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 <stdlib.h>
> #include <stdio.h>
> @@ -8,12 +9,34 @@
> #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 +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 <stdio.h>
> #include <unistd.h>
> @@ -9,12 +10,20 @@
> #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 +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 <medvedkinv@gmail.com>
> * 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 +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 <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,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 <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 +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 060cf1ffa8..6c1d8602d2 100644
> --- a/app/test/test_security.c
> +++ b/app/test/test_security.c
> @@ -1,12 +1,14 @@
> /* SPDX-License-Identifier: BSD-3-Clause
> * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
> */
> +#include "test.h"
>
> #include <rte_errno.h>
> #include <rte_log.h>
> #include <rte_memory.h>
> #include <rte_mempool.h>
> #include <rte_ether.h>
> +
> #include <rte_security.h>
> #include <rte_security_driver.h>
>
> @@ -20,7 +22,7 @@
> #endif
>
> #include <rte_test.h>
> -#include "test.h"
> +
>
> /**
> * Security
> 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 <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 +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 <rte_ip.h>
> #include <rte_string_fns.h>
> #include <rte_hexdump.h>
> @@ -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 <string.h>
> #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 aabf4375db..45dc7682d8 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 <string.h>
> #include <rte_pipeline.h>
> #include <rte_log.h>
> @@ -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 <string.h>
> #include <rte_byteorder.h>
> #include <rte_table_lpm_ipv6.h>
> @@ -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 <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 +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.31.0.vfs.0.1
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v14 00/11] app/test: enable subset of tests on Windows
2021-12-08 18:59 ` [PATCH v14 00/11] app/test: enable subset of tests " Jie Zhou
` (10 preceding siblings ...)
2021-12-08 19:00 ` [PATCH v14 11/11] app/test: enable unit test on Windows Jie Zhou
@ 2021-12-09 19:49 ` Tyler Retzlaff
2022-01-26 5:10 ` [PATCH v15 " Jie Zhou
12 siblings, 0 replies; 245+ messages in thread
From: Tyler Retzlaff @ 2021-12-09 19:49 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, dmitry.kozliuk, bruce.richardson, roretzla, navasile,
dmitrym, pallavi.kadam, talshn, thomas, aconole
On Wed, Dec 08, 2021 at 10:59:49AM -0800, Jie Zhou wrote:
> The goal of this patchset is to enable unit tests in CI for Windows.
> It mainly contains:
> - Replace POSIX specific codes
> - Fix some lib and tests per failures investigation
> - Add test stubs for not yet supported ones on Windows
> - Replace .sh script with .py script for meson.build
> - Enable build and run subset of unit tests on Windows
>
> Future work:
> - Work with CI lab to onboard unit tests for Windows to catch regression
> - Investigate issues hit at CI onboarding
> - Enable more tests
>
> ---
> V2 changes:
> - Fix compilation error on FreeBSD
> - Fix email mismatch issue
> - Add a missing space around "*"
>
> ---
> V3 changes:
> - Fix a misc c coding style issue
> - Revise some commit title and message body
> - Fix violations of PEP8 in new added Python scripts
> - Add error handling in get_coremask.py
> - Fix has_hugepage.py to check system support of hugepages
> instead of checking privileges
> - Fix test meson.build to run Python scripts using py3
> - Consolidate lists of source files, test dep, etc. across all
> platforms, with conditional extending on some platform(s)
>
> ---
> V4 changes:
> - Remove building of ip_frag, rib, and reorder libraries on Windows.
> These three libs usually can be built on Windows without change.
> However, in between the time of V3 and V4, there is regression in
> upstream caused build failures of these three libs. Will separately
> investigate and enable these libraries.
>
> - Remove previous patch#2 (Enable mempool/stack on Windows) from this
> patchset as it was separated out and merged as patch-19314.
>
> - Consolidate the source files, deps, tests lists across platforms as
> much as possible.
>
> ---
> V5 changes:
> - Remove a space between function name and open parenthesis '('
> - Add back a header mistakenly deleted
>
> ---
> V6 changes:
> - Fix inconsistent static vs. non-static declarations
>
> ---
> V7 changes:
> - Remove get_coremask.py as it is not needed any more in meson.build
> - Remove enablement of efd and lpm and their corresponding unit tests.
> The enablement of these two libs and their UTs will be in separate
> patches after this patch set.
>
> V8 changes:
> - Fix coding style issue of using C99 // comments
>
> ---
> V9 changes:
> - Fix has_hugepage.py with adding failure handling on Linux, using
> proper variable name to follow Python convention, and removing
> unnecessary comment.
> - Enable previously skipped test_cmdline_socket_fns test cases
> - Revise title and message, and add Fixes info for current Patch#3
> - Combine 2 patches (previous #2 and #3 in V8) into one and with
> more detailed message
>
> ---
> V10 changes:
> - Fix indentation
>
> ---
> V11 changes:
> - Remove mandatory dependency on bitratestats, latencystats,
> and metrics libs in test meson.build, which was reintroduced
> at rebase in V9.
>
> ---
> V12 changes:
> - Remove unnecessary print of a null string
> - Enable several previous disabled tests
> - Split Patch#9 in V11 into two patches for better structure
> - Reorder some of the patches for better structure
> - Document more details in commit message for issue tracking
>
> ---
> V13 changes:
> - Fix misc coding style issue
> - Fix build issue on Ubuntu 18.04
>
> ---
> V14 changes:
> - Explain the reason of skipping telemetry tests in commit log
>
> Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
>
the set looks good to me, let's get it in and if we need to make further
changes we can. integration of the set is blocking porting of other
tests.
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v14 04/11] app/test: skip interrupt tests on Windows
2021-12-09 16:39 ` Bruce Richardson
@ 2021-12-10 9:23 ` Dmitry Kozlyuk
2021-12-10 9:30 ` Bruce Richardson
0 siblings, 1 reply; 245+ messages in thread
From: Dmitry Kozlyuk @ 2021-12-10 9:23 UTC (permalink / raw)
To: Bruce Richardson
Cc: Aaron Conole, Jerin Jacob, Jie Zhou, dpdk-dev, roretzla,
Narcisa Ana Maria Vasile, Dmitry Malloy (MESHCHANINOV),
Pallavi Kadam, talshn, Thomas Monjalon
2021-12-09 16:39 (UTC+0000), Bruce Richardson:
> On Thu, Dec 09, 2021 at 04:17:08PM +0000, Bruce Richardson wrote:
> [...]
> > I'm wondering if a reasonable compromise solution might be to have the
> > build system expose a usable RTE_EXEC_ENV symbol that can be used in C-code
> > if statements rather than just in ifdefs. That would allow us to easily add
> > e.g.
> >
> > if (RTE_EXEC_ENV == rte_env_linux)
> > return TEST_SKIPPED;
> >
> > into each test function needing it. Two lines of C-code is a lot easier to
> > add and manage than #ifdefs covering the whole file, or alternative lists
> > in meson.
> >
> Quick patch to allow C-code comparisons:
>
> diff --git a/lib/eal/meson.build b/lib/eal/meson.build
> index 1722924f67..b5b9fa14b4 100644
> --- a/lib/eal/meson.build
> +++ b/lib/eal/meson.build
> @@ -10,6 +10,12 @@ if not is_windows
> subdir('unix')
> endif
>
> +exec_envs = {'freebsd': 0, 'linux': 1, 'windows': 2}
> +foreach env, id:exec_envs
> + dpdk_conf.set('RTE_ENV_' + env.to_upper(), id)
> +endforeach
> +dpdk_conf.set('RTE_EXEC_ENV', exec_envs[exec_env])
> +
> dpdk_conf.set('RTE_EXEC_ENV_' + exec_env.to_upper(), 1)
> subdir(exec_env)
>
> A slightly simpler patch would just expose the environment as a string as
> e.g. "linux", but I think numeric ids just make the code better rather than
> having string comparisons. Alternatively, this could also be done via
> C-code with ifdefs in EAL, but as it stands this meson change allows:
>
> if (RTE_EXEC_ENV == RTE_ENV_WINDOWS)
> ...
>
> or:
>
> switch (RTE_EXEC_ENV) {
> case RTE_ENV_LINUX: ... ; break;
> case RTE_ENV_FREEBSD: ... ; break;
> case RTE_ENV_WINDOWS: ... ; break;
> }
>
> Thoughts?
I like this.
Even outside of tests more code can be made to compile on all platforms
(e.g. ixgbe_wait_for_link_up).
Alternative naming: RTE_EXEC_ENV_IS_* (similar to RTE_CC_IS_*),
which does not allow switch statements, but shortens most practical cases.
Will Coverity understand that if a condition is always false,
variables beneath still may be used on another platform?
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v14 04/11] app/test: skip interrupt tests on Windows
2021-12-10 9:23 ` Dmitry Kozlyuk
@ 2021-12-10 9:30 ` Bruce Richardson
2022-01-17 18:37 ` Thomas Monjalon
0 siblings, 1 reply; 245+ messages in thread
From: Bruce Richardson @ 2021-12-10 9:30 UTC (permalink / raw)
To: Dmitry Kozlyuk
Cc: Aaron Conole, Jerin Jacob, Jie Zhou, dpdk-dev, roretzla,
Narcisa Ana Maria Vasile, Dmitry Malloy (MESHCHANINOV),
Pallavi Kadam, talshn, Thomas Monjalon
On Fri, Dec 10, 2021 at 12:23:59PM +0300, Dmitry Kozlyuk wrote:
> 2021-12-09 16:39 (UTC+0000), Bruce Richardson:
> > On Thu, Dec 09, 2021 at 04:17:08PM +0000, Bruce Richardson wrote:
> > [...]
> > > I'm wondering if a reasonable compromise solution might be to have the
> > > build system expose a usable RTE_EXEC_ENV symbol that can be used in C-code
> > > if statements rather than just in ifdefs. That would allow us to easily add
> > > e.g.
> > >
> > > if (RTE_EXEC_ENV == rte_env_linux)
> > > return TEST_SKIPPED;
> > >
> > > into each test function needing it. Two lines of C-code is a lot easier to
> > > add and manage than #ifdefs covering the whole file, or alternative lists
> > > in meson.
> > >
> > Quick patch to allow C-code comparisons:
> >
> > diff --git a/lib/eal/meson.build b/lib/eal/meson.build
> > index 1722924f67..b5b9fa14b4 100644
> > --- a/lib/eal/meson.build
> > +++ b/lib/eal/meson.build
> > @@ -10,6 +10,12 @@ if not is_windows
> > subdir('unix')
> > endif
> >
> > +exec_envs = {'freebsd': 0, 'linux': 1, 'windows': 2}
> > +foreach env, id:exec_envs
> > + dpdk_conf.set('RTE_ENV_' + env.to_upper(), id)
> > +endforeach
> > +dpdk_conf.set('RTE_EXEC_ENV', exec_envs[exec_env])
> > +
> > dpdk_conf.set('RTE_EXEC_ENV_' + exec_env.to_upper(), 1)
> > subdir(exec_env)
> >
> > A slightly simpler patch would just expose the environment as a string as
> > e.g. "linux", but I think numeric ids just make the code better rather than
> > having string comparisons. Alternatively, this could also be done via
> > C-code with ifdefs in EAL, but as it stands this meson change allows:
> >
> > if (RTE_EXEC_ENV == RTE_ENV_WINDOWS)
> > ...
> >
> > or:
> >
> > switch (RTE_EXEC_ENV) {
> > case RTE_ENV_LINUX: ... ; break;
> > case RTE_ENV_FREEBSD: ... ; break;
> > case RTE_ENV_WINDOWS: ... ; break;
> > }
> >
> > Thoughts?
>
> I like this.
> Even outside of tests more code can be made to compile on all platforms
> (e.g. ixgbe_wait_for_link_up).
> Alternative naming: RTE_EXEC_ENV_IS_* (similar to RTE_CC_IS_*),
> which does not allow switch statements, but shortens most practical cases.
Sure. I wonder if it is worthwhile implementing both, since it's not a
large amount of code.
> Will Coverity understand that if a condition is always false,
> variables beneath still may be used on another platform?
That I don't know, unfortunately. Perhaps some coverity experts can weigh
in.
/Bruce
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v14 04/11] app/test: skip interrupt tests on Windows
2021-12-10 9:30 ` Bruce Richardson
@ 2022-01-17 18:37 ` Thomas Monjalon
0 siblings, 0 replies; 245+ messages in thread
From: Thomas Monjalon @ 2022-01-17 18:37 UTC (permalink / raw)
To: Jie Zhou
Cc: Dmitry Kozlyuk, dev, Aaron Conole, Jerin Jacob, dpdk-dev,
roretzla, Narcisa Ana Maria Vasile, Dmitry Malloy (MESHCHANINOV),
Pallavi Kadam, talshn, Bruce Richardson
The proposal below is now merged.
Please Jie, use it in a v15 of this series.
10/12/2021 10:30, Bruce Richardson:
> On Fri, Dec 10, 2021 at 12:23:59PM +0300, Dmitry Kozlyuk wrote:
> > 2021-12-09 16:39 (UTC+0000), Bruce Richardson:
> > > On Thu, Dec 09, 2021 at 04:17:08PM +0000, Bruce Richardson wrote:
> > > [...]
> > > > I'm wondering if a reasonable compromise solution might be to have the
> > > > build system expose a usable RTE_EXEC_ENV symbol that can be used in C-code
> > > > if statements rather than just in ifdefs. That would allow us to easily add
> > > > e.g.
> > > >
> > > > if (RTE_EXEC_ENV == rte_env_linux)
> > > > return TEST_SKIPPED;
> > > >
> > > > into each test function needing it. Two lines of C-code is a lot easier to
> > > > add and manage than #ifdefs covering the whole file, or alternative lists
> > > > in meson.
> > > >
> > > Quick patch to allow C-code comparisons:
> > >
> > > diff --git a/lib/eal/meson.build b/lib/eal/meson.build
> > > index 1722924f67..b5b9fa14b4 100644
> > > --- a/lib/eal/meson.build
> > > +++ b/lib/eal/meson.build
> > > @@ -10,6 +10,12 @@ if not is_windows
> > > subdir('unix')
> > > endif
> > >
> > > +exec_envs = {'freebsd': 0, 'linux': 1, 'windows': 2}
> > > +foreach env, id:exec_envs
> > > + dpdk_conf.set('RTE_ENV_' + env.to_upper(), id)
> > > +endforeach
> > > +dpdk_conf.set('RTE_EXEC_ENV', exec_envs[exec_env])
> > > +
> > > dpdk_conf.set('RTE_EXEC_ENV_' + exec_env.to_upper(), 1)
> > > subdir(exec_env)
> > >
> > > A slightly simpler patch would just expose the environment as a string as
> > > e.g. "linux", but I think numeric ids just make the code better rather than
> > > having string comparisons. Alternatively, this could also be done via
> > > C-code with ifdefs in EAL, but as it stands this meson change allows:
> > >
> > > if (RTE_EXEC_ENV == RTE_ENV_WINDOWS)
> > > ...
> > >
> > > or:
> > >
> > > switch (RTE_EXEC_ENV) {
> > > case RTE_ENV_LINUX: ... ; break;
> > > case RTE_ENV_FREEBSD: ... ; break;
> > > case RTE_ENV_WINDOWS: ... ; break;
> > > }
> > >
> > > Thoughts?
> >
> > I like this.
> > Even outside of tests more code can be made to compile on all platforms
> > (e.g. ixgbe_wait_for_link_up).
> > Alternative naming: RTE_EXEC_ENV_IS_* (similar to RTE_CC_IS_*),
> > which does not allow switch statements, but shortens most practical cases.
>
> Sure. I wonder if it is worthwhile implementing both, since it's not a
> large amount of code.
>
> > Will Coverity understand that if a condition is always false,
> > variables beneath still may be used on another platform?
>
> That I don't know, unfortunately. Perhaps some coverity experts can weigh
> in.
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v15 00/11] app/test: enable subset of tests on Windows
2021-12-08 18:59 ` [PATCH v14 00/11] app/test: enable subset of tests " Jie Zhou
` (11 preceding siblings ...)
2021-12-09 19:49 ` [PATCH v14 00/11] app/test: enable subset of tests " Tyler Retzlaff
@ 2022-01-26 5:10 ` Jie Zhou
2022-01-26 5:10 ` [PATCH v15 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
` (11 more replies)
12 siblings, 12 replies; 245+ messages in thread
From: Jie Zhou @ 2022-01-26 5:10 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
The goal of this patchset is to enable unit tests in CI for Windows.
It mainly contains:
- Replace POSIX specific codes
- Fix some lib and tests per failures investigation
- Add test stubs for not yet supported ones on Windows
- Replace .sh script with .py script for meson.build
- Enable build and run subset of unit tests on Windows
Future work:
- Work with CI lab to onboard unit tests for Windows to catch regression
- Investigate issues hit at CI onboarding
- Enable more tests
---
V2 changes:
- Fix compilation error on FreeBSD
- Fix email mismatch issue
- Add a missing space around "*"
---
V3 changes:
- Fix a misc c coding style issue
- Revise some commit title and message body
- Fix violations of PEP8 in new added Python scripts
- Add error handling in get_coremask.py
- Fix has_hugepage.py to check system support of hugepages
instead of checking privileges
- Fix test meson.build to run Python scripts using py3
- Consolidate lists of source files, test dep, etc. across all
platforms, with conditional extending on some platform(s)
---
V4 changes:
- Remove building of ip_frag, rib, and reorder libraries on Windows.
These three libs usually can be built on Windows without change.
However, in between the time of V3 and V4, there is regression in
upstream caused build failures of these three libs. Will separately
investigate and enable these libraries.
- Remove previous patch#2 (Enable mempool/stack on Windows) from this
patchset as it was separated out and merged as patch-19314.
- Consolidate the source files, deps, tests lists across platforms as
much as possible.
---
V5 changes:
- Remove a space between function name and open parenthesis '('
- Add back a header mistakenly deleted
---
V6 changes:
- Fix inconsistent static vs. non-static declarations
---
V7 changes:
- Remove get_coremask.py as it is not needed any more in meson.build
- Remove enablement of efd and lpm and their corresponding unit tests.
The enablement of these two libs and their UTs will be in separate
patches after this patch set.
---
V8 changes:
- Fix coding style issue of using C99 // comments
---
V9 changes:
- Fix has_hugepage.py with adding failure handling on Linux, using
proper variable name to follow Python convention, and removing
unnecessary comment.
- Enable previously skipped test_cmdline_socket_fns test cases
- Revise title and message, and add Fixes info for current Patch#3
- Combine 2 patches (previous #2 and #3 in V8) into one and with
more detailed message
---
V10 changes:
- Fix indentation
---
V11 changes:
- Remove mandatory dependency on bitratestats, latencystats,
and metrics libs in test meson.build, which was reintroduced
at rebase in V9.
---
V12 changes:
- Remove unnecessary print of a null string
- Enable several previous disabled tests
- Split Patch#9 in V11 into two patches for better structure
- Reorder some of the patches for better structure
- Document more details in commit message for issue tracking
---
V13 changes:
- Fix misc coding style issue
- Fix build issue on Ubuntu 18.04
---
V14 changes:
- Explain the reason of skipping telemetry tests in commit log
---
V15 changes:
- Resolve rebase conflicts
- Leverage the new mechanism introduced by cadb255e25d6
("eal: add OS defines for C conditional checks"), which uses
regular if statement to skip tests on Windows, to avoid using
#ifdef conditional compilation directive as much as possible.
This part of change is mainly in Patch#4 and Patch#9.
Note: for the tests skipped in Patch#9, majority still use
#ifdef conditional compilation directive. The reason is that
those tests depend on libraries not supported on Windows yet,
thus no corresponding header files, and undefined APIs used
in test helper functions. Just adding the regular if statement
in the test main function is not sufficient.
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Jie Zhou (11):
eal/windows: return ENOTSUP for not supported API
app/test: remove POSIX-specific code
app/test: fix incorrect errno variable
app/test: skip interrupt tests on Windows
app/test: skip two logs_autotest cases on Windows
app/test: differentiate a strerror on different OS
app/test: remove two alarm_autotest cases
app/test: resolve name collision
app/test: skip tests that are not supported yet
app/test: replace .sh script with .py script
app/test: enable unit test on Windows
app/test/commands.c | 2 -
app/test/has-hugepage.sh | 11 ---
app/test/has_hugepage.py | 26 +++++++
app/test/meson.build | 78 ++++++++++----------
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +-
app/test/test.c | 5 +-
app/test/test_acl.c | 12 ++++
app/test/test_alarm.c | 4 ++
app/test/test_bpf.c | 15 +++-
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline_ipaddr.c | 13 ++--
app/test/test_cmdline_lib.c | 13 ++--
app/test/test_crc.c | 1 -
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_errno.c | 12 +++-
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 | 20 +++---
app/test/test_interrupts.c | 3 +
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_logs.c | 6 +-
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 | 30 ++++----
app/test/test_memory.c | 2 +-
app/test/test_mp_secondary.c | 12 ++++
app/test/test_pie.c | 30 +++++++-
app/test/test_pmd_perf.c | 6 +-
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_ring_stress_impl.h | 2 +-
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_telemetry_data.c | 2 +
app/test/test_timer_secondary.c | 13 ++++
app/test/test_trace.c | 32 +++++++--
lib/eal/common/eal_common_errno.c | 4 ++
lib/eal/windows/eal_memalloc.c | 6 +-
84 files changed, 1009 insertions(+), 185 deletions(-)
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
--
2.34.1.windows.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v15 01/11] eal/windows: return ENOTSUP for not supported API
2022-01-26 5:10 ` [PATCH v15 " Jie Zhou
@ 2022-01-26 5:10 ` Jie Zhou
2022-01-26 5:10 ` [PATCH v15 02/11] app/test: remove POSIX-specific code Jie Zhou
` (10 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2022-01-26 5:10 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
UT memory_autotest on Windows has 2 failed cases on eal APIs
eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2
APIs are not supported on Windows yet. Should return ENOTSUP such that
in test_memory.c these 2 ENOTSUP cases will not be marked as failures,
same as other ENOTSUP cases.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
lib/eal/windows/eal_memalloc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/eal/windows/eal_memalloc.c b/lib/eal/windows/eal_memalloc.c
index 55d6dcc71c..aa7589b81d 100644
--- a/lib/eal/windows/eal_memalloc.c
+++ b/lib/eal/windows/eal_memalloc.c
@@ -17,7 +17,7 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
RTE_SET_USED(list_idx);
RTE_SET_USED(seg_idx);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
@@ -28,7 +28,7 @@ eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
RTE_SET_USED(seg_idx);
RTE_SET_USED(offset);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
static int
@@ -428,7 +428,7 @@ eal_memalloc_sync_with_primary(void)
{
/* No multi-process support. */
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
--
2.34.1.windows.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v15 02/11] app/test: remove POSIX-specific code
2022-01-26 5:10 ` [PATCH v15 " Jie Zhou
2022-01-26 5:10 ` [PATCH v15 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
@ 2022-01-26 5:10 ` Jie Zhou
2022-01-26 5:10 ` [PATCH v15 03/11] app/test: fix incorrect errno variable Jie Zhou
` (9 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2022-01-26 5:10 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
- Replace POSIX-specific code with DPDK equivalents or
conditionally disable it on Windows
- Use NUL on Windows as /dev/null for Unix
- Exclude tests not supported on Windows yet
* multi-process
* PMD performance statistics display on signal
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>
---
app/test/commands.c | 2 --
app/test/packet_burst_generator.c | 1 +
app/test/process.h | 4 +++-
app/test/test.c | 5 ++++-
app/test/test_byteorder.c | 2 +-
app/test/test_cmdline_ipaddr.c | 13 ++++++-------
app/test/test_cmdline_lib.c | 13 +++++++++----
app/test/test_crc.c | 1 -
app/test/test_memcpy_perf.c | 29 +++++++++++++++--------------
app/test/test_pmd_perf.c | 6 +++++-
app/test/test_ring_stress_impl.h | 2 +-
app/test/test_telemetry_data.c | 2 ++
12 files changed, 47 insertions(+), 33 deletions(-)
diff --git a/app/test/commands.c b/app/test/commands.c
index 2dced3bc44..887cabad64 100644
--- a/app/test/commands.c
+++ b/app/test/commands.c
@@ -8,8 +8,6 @@
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
-#include <netinet/in.h>
-#include <termios.h>
#include <inttypes.h>
#include <errno.h>
#include <sys/queue.h>
diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index 8ac24577ba..6b42b9b83b 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -5,6 +5,7 @@
#include <rte_byteorder.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
+#include <rte_os_shim.h>
#include "packet_burst_generator.h"
diff --git a/app/test/process.h b/app/test/process.h
index 5b10cf64df..1f073b9c5c 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -7,12 +7,14 @@
#include <errno.h> /* errno */
#include <limits.h> /* PATH_MAX */
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <libgen.h> /* basename et al */
+#include <sys/wait.h>
+#endif
#include <stdlib.h> /* NULL */
#include <string.h> /* strerror */
#include <unistd.h> /* readlink */
#include <dirent.h>
-#include <sys/wait.h>
#include <rte_string_fns.h> /* strlcpy */
diff --git a/app/test/test.c b/app/test/test.c
index 5194131026..e69cae3eea 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
@@ -63,7 +62,9 @@ do_recursive_call(void)
const char *env_var;
int (*action_fn)(void);
} actions[] = {
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "run_secondary_instances", test_mp_secondary },
+#endif
#ifdef RTE_LIB_PDUMP
#ifdef RTE_NET_RING
{ "run_pdump_server_tests", test_pdump },
@@ -82,7 +83,9 @@ do_recursive_call(void)
{ "test_file_prefix", no_action },
{ "test_no_huge_flag", no_action },
#ifdef RTE_LIB_TIMER
+#ifndef RTE_EXEC_ENV_WINDOWS
{ "timer_secondary_spawn_wait", test_timer_secondary },
+#endif
#endif
};
diff --git a/app/test/test_byteorder.c b/app/test/test_byteorder.c
index 03c08d9abf..de14ed539e 100644
--- a/app/test/test_byteorder.c
+++ b/app/test/test_byteorder.c
@@ -46,7 +46,7 @@ test_byteorder(void)
return -1;
res_u16 = rte_bswap16(0x1337);
- printf("const %"PRIx16" -> %"PRIx16"\n", 0x1337, res_u16);
+ printf("const %"PRIx16" -> %"PRIx16"\n", (uint16_t)0x1337, res_u16);
if (res_u16 != 0x3713)
return -1;
diff --git a/app/test/test_cmdline_ipaddr.c b/app/test/test_cmdline_ipaddr.c
index 2a1ee120fc..f540063508 100644
--- a/app/test/test_cmdline_ipaddr.c
+++ b/app/test/test_cmdline_ipaddr.c
@@ -1,12 +1,9 @@
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2010-2014 Intel Corporation
*/
-
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
-#include <netinet/in.h>
-#include <sys/socket.h>
#include <rte_string_fns.h>
@@ -15,7 +12,7 @@
#include "test_cmdline.h"
-#define IP4(a,b,c,d) {((uint32_t)(((a) & 0xff)) | \
+#define IP4(a,b,c,d) {.s_addr = (uint32_t)(((a) & 0xff) | \
(((b) & 0xff) << 8) | \
(((c) & 0xff) << 16) | \
((d) & 0xff) << 24)}
@@ -25,7 +22,11 @@
/* create IPv6 address, swapping bytes where needed */
#ifndef s6_addr16
-# define s6_addr16 __u6_addr.__u6_addr16
+#ifdef RTE_EXEC_ENV_WINDOWS
+#define s6_addr16 u.Word
+#else
+#define s6_addr16 __u6_addr.__u6_addr16
+#endif
#endif
#define IP6(a,b,c,d,e,f,g,h) .ipv6 = \
{.s6_addr16 = \
@@ -166,8 +167,6 @@ const char * ipaddr_garbage_network6_strs[] = {
};
#define IPv6_GARBAGE_PREFIX 64
-
-
const char * ipaddr_invalid_strs[] = {
/** IPv4 **/
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index f50ccdb599..fcd58cb76a 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <ctype.h>
#include <sys/queue.h>
@@ -22,6 +21,12 @@
#include "test_cmdline.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
+#define NULL_INPUT "/dev/null"
+#else
+#define NULL_INPUT "NUL"
+#endif
+
/****************************************************************/
/* static functions required for some tests */
static void
@@ -156,10 +161,10 @@ test_cmdline_socket_fns(void)
cl = cmdline_stdin_new(&ctx, NULL);
if (cl != NULL)
goto error;
- cl = cmdline_file_new(NULL, "prompt", "/dev/null");
+ cl = cmdline_file_new(NULL, "prompt", NULL_INPUT);
if (cl != NULL)
goto error;
- cl = cmdline_file_new(&ctx, NULL, "/dev/null");
+ cl = cmdline_file_new(&ctx, NULL, NULL_INPUT);
if (cl != NULL)
goto error;
cl = cmdline_file_new(&ctx, "prompt", NULL);
@@ -171,7 +176,7 @@ test_cmdline_socket_fns(void)
cmdline_free(cl);
return -1;
}
- cl = cmdline_file_new(&ctx, "prompt", "/dev/null");
+ cl = cmdline_file_new(&ctx, "prompt", NULL_INPUT);
if (cl == NULL) {
printf("Error: failed to open /dev/null for reading!");
return -1;
diff --git a/app/test/test_crc.c b/app/test/test_crc.c
index bf1d344359..0ed080e482 100644
--- a/app/test/test_crc.c
+++ b/app/test/test_crc.c
@@ -14,7 +14,6 @@
#define CRC32_VEC_LEN2 348
#define CRC16_VEC_LEN1 12
#define CRC16_VEC_LEN2 2
-#define LINE_LEN 75
/* CRC test vector */
static const uint8_t crc_vec[CRC_VEC_LEN] = {
diff --git a/app/test/test_memcpy_perf.c b/app/test/test_memcpy_perf.c
index c711e36ba7..3727c160e6 100644
--- a/app/test/test_memcpy_perf.c
+++ b/app/test/test_memcpy_perf.c
@@ -6,10 +6,11 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include <sys/time.h>
+#include <time.h>
#include <rte_common.h>
#include <rte_cycles.h>
+#include <rte_os_shim.h>
#include <rte_random.h>
#include <rte_malloc.h>
@@ -271,7 +272,7 @@ static int
perf_test(void)
{
int ret;
- struct timeval tv_begin, tv_end;
+ struct timespec tv_begin, tv_end;
double time_aligned, time_unaligned;
double time_aligned_const, time_unaligned_const;
@@ -298,32 +299,32 @@ perf_test(void)
printf("\n================================= %2dB aligned =================================",
ALIGNMENT_UNIT);
/* Do aligned tests where size is a variable */
- gettimeofday(&tv_begin, NULL);
+ timespec_get(&tv_begin, TIME_UTC);
perf_test_variable_aligned();
- gettimeofday(&tv_end, NULL);
+ timespec_get(&tv_end, TIME_UTC);
time_aligned = (double)(tv_end.tv_sec - tv_begin.tv_sec)
- + ((double)tv_end.tv_usec - tv_begin.tv_usec)/1000000;
+ + ((double)tv_end.tv_nsec - tv_begin.tv_nsec) / NS_PER_S;
printf("\n------- ----------------- ----------------- ----------------- -----------------");
/* Do aligned tests where size is a compile-time constant */
- gettimeofday(&tv_begin, NULL);
+ timespec_get(&tv_begin, TIME_UTC);
perf_test_constant_aligned();
- gettimeofday(&tv_end, NULL);
+ timespec_get(&tv_end, TIME_UTC);
time_aligned_const = (double)(tv_end.tv_sec - tv_begin.tv_sec)
- + ((double)tv_end.tv_usec - tv_begin.tv_usec)/1000000;
+ + ((double)tv_end.tv_nsec - tv_begin.tv_nsec) / NS_PER_S;
printf("\n================================== Unaligned ==================================");
/* Do unaligned tests where size is a variable */
- gettimeofday(&tv_begin, NULL);
+ timespec_get(&tv_begin, TIME_UTC);
perf_test_variable_unaligned();
- gettimeofday(&tv_end, NULL);
+ timespec_get(&tv_end, TIME_UTC);
time_unaligned = (double)(tv_end.tv_sec - tv_begin.tv_sec)
- + ((double)tv_end.tv_usec - tv_begin.tv_usec)/1000000;
+ + ((double)tv_end.tv_nsec - tv_begin.tv_nsec) / NS_PER_S;
printf("\n------- ----------------- ----------------- ----------------- -----------------");
/* Do unaligned tests where size is a compile-time constant */
- gettimeofday(&tv_begin, NULL);
+ timespec_get(&tv_begin, TIME_UTC);
perf_test_constant_unaligned();
- gettimeofday(&tv_end, NULL);
+ timespec_get(&tv_end, TIME_UTC);
time_unaligned_const = (double)(tv_end.tv_sec - tv_begin.tv_sec)
- + ((double)tv_end.tv_usec - tv_begin.tv_usec)/1000000;
+ + ((double)tv_end.tv_nsec - tv_begin.tv_nsec) / NS_PER_S;
printf("\n======= ================= ================= ================= =================\n\n");
printf("Test Execution Time (seconds):\n");
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 0aa9dc1b1c..25611bfe9b 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -296,6 +296,7 @@ reset_count(void)
idle = 0;
}
+#ifndef RTE_EXEC_ENV_WINDOWS
static void
stats_display(uint16_t port_id)
{
@@ -325,6 +326,7 @@ signal_handler(int signum)
if (signum == SIGUSR2)
stats_display(0);
}
+#endif
struct rte_mbuf **tx_burst;
@@ -638,7 +640,7 @@ exec_burst(uint32_t flags, int lcore)
i = (i >= conf->nb_ports - 1) ? 0 : (i + 1);
}
- sleep(5);
+ rte_delay_us(5 * US_PER_S);
/* only when polling second */
if (flags == SC_BURST_XMIT_FIRST)
@@ -669,8 +671,10 @@ test_pmd_perf(void)
printf("Start PMD RXTX cycles cost test.\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
signal(SIGUSR1, signal_handler);
signal(SIGUSR2, signal_handler);
+#endif
nb_ports = rte_eth_dev_count_avail();
if (nb_ports < NB_ETHPORTS_USED) {
diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h
index 2825a9dce6..62f046a91a 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -360,7 +360,7 @@ test_mt1(int (*test)(void *))
/* signal worker to start test */
__atomic_store_n(&wrk_cmd, WRK_CMD_RUN, __ATOMIC_RELEASE);
- usleep(run_time * US_PER_S);
+ rte_delay_us(run_time * US_PER_S);
/* signal worker to start test */
__atomic_store_n(&wrk_cmd, WRK_CMD_STOP, __ATOMIC_RELEASE);
diff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c
index 18b93db8ef..73eee293a1 100644
--- a/app/test/test_telemetry_data.c
+++ b/app/test/test_telemetry_data.c
@@ -4,7 +4,9 @@
#include <string.h>
#include <sys/socket.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/un.h>
+#endif
#include <unistd.h>
#include <limits.h>
--
2.34.1.windows.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v15 03/11] app/test: fix incorrect errno variable
2022-01-26 5:10 ` [PATCH v15 " Jie Zhou
2022-01-26 5:10 ` [PATCH v15 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
2022-01-26 5:10 ` [PATCH v15 02/11] app/test: remove POSIX-specific code Jie Zhou
@ 2022-01-26 5:10 ` Jie Zhou
2022-01-26 5:10 ` [PATCH v15 04/11] app/test: skip interrupt tests on Windows Jie Zhou
` (8 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2022-01-26 5:10 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Fix incorrect errno variable used in memory autotest.
Use rte_errno instead.
Fixes: 086d426406bd ("app/test: fix memory autotests on FreeBSD")
Cc: bruce.richardson@intel.com
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/test_memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index dbf6871e71..140ac3f3cf 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -63,7 +63,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
/* we're able to get memseg fd - try getting its offset */
ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
if (ret < 0) {
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
return -1;
}
--
2.34.1.windows.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v15 04/11] app/test: skip interrupt tests on Windows
2022-01-26 5:10 ` [PATCH v15 " Jie Zhou
` (2 preceding siblings ...)
2022-01-26 5:10 ` [PATCH v15 03/11] app/test: fix incorrect errno variable Jie Zhou
@ 2022-01-26 5:10 ` Jie Zhou
2022-01-26 5:10 ` [PATCH v15 05/11] app/test: skip two logs_autotest cases " Jie Zhou
` (7 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2022-01-26 5:10 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Even though test_interrupts.c can compile on Windows, skip interrupt
tests for now since majority of eal_interrupt on Windows are stubs.
Will remove the skip after interrupt being fully enabled on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/test_interrupts.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
index 2a05399f96..e47a786b36 100644
--- a/app/test/test_interrupts.c
+++ b/app/test/test_interrupts.c
@@ -429,6 +429,9 @@ test_interrupt(void)
int ret = -1;
struct rte_intr_handle *test_intr_handle;
+ if (RTE_EXEC_ENV_IS_WINDOWS)
+ return TEST_SKIPPED;
+
if (test_interrupt_init() < 0) {
printf("fail to initialize for testing interrupt\n");
goto out;
--
2.34.1.windows.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v15 05/11] app/test: skip two logs_autotest cases on Windows
2022-01-26 5:10 ` [PATCH v15 " Jie Zhou
` (3 preceding siblings ...)
2022-01-26 5:10 ` [PATCH v15 04/11] app/test: skip interrupt tests on Windows Jie Zhou
@ 2022-01-26 5:10 ` Jie Zhou
2022-02-08 9:49 ` Thomas Monjalon
2022-01-26 5:10 ` [PATCH v15 06/11] app/test: differentiate a strerror on different OS Jie Zhou
` (6 subsequent siblings)
11 siblings, 1 reply; 245+ messages in thread
From: Jie Zhou @ 2022-01-26 5:10 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
DPDK logs_autotest on Windows failed at "dynamic log types" tests.
The failures are on 2 test cases for rte_log_set_level_regexp API,
due to regular expression is not supported on Windows in DPDK yet
and regcomp/regexec are just stubs on Windows (in regex.h).
In app\test\test_logs.c, ifndef these two test cases, and for the
rte_log_set_level_pattern validation case following these two cases,
differentiate the expected log level passed into macro CHECK_LEVELS
Now logs_autotest completes for all dynamic log types and static log types.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/test_logs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/test/test_logs.c b/app/test/test_logs.c
index 7abb6eeca2..7c001c1ab3 100644
--- a/app/test/test_logs.c
+++ b/app/test/test_logs.c
@@ -113,6 +113,7 @@ test_logs(void)
rte_log_set_level(logtype1, RTE_LOG_ERR);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#ifndef RTE_EXEC_ENV_WINDOWS
rte_log_set_level_regexp("type$", RTE_LOG_EMERG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
@@ -121,7 +122,10 @@ test_logs(void)
rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_EMERG, RTE_LOG_EMERG);
-
+#else
+ ret = rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
+ CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
+#endif
/* set logtype level low to so we can test global level */
rte_log_set_level_pattern("logtype*", RTE_LOG_DEBUG);
CHECK_LEVELS(RTE_LOG_DEBUG, RTE_LOG_DEBUG, RTE_LOG_DEBUG);
--
2.34.1.windows.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v15 06/11] app/test: differentiate a strerror on different OS
2022-01-26 5:10 ` [PATCH v15 " Jie Zhou
` (4 preceding siblings ...)
2022-01-26 5:10 ` [PATCH v15 05/11] app/test: skip two logs_autotest cases " Jie Zhou
@ 2022-01-26 5:10 ` Jie Zhou
2022-01-26 5:10 ` [PATCH v15 07/11] app/test: remove two alarm_autotest cases Jie Zhou
` (5 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2022-01-26 5:10 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
On Windows, strerror returns just "Unknown error" for errnum greater
than MAX_ERRNO, while linux and freebsd returns "Unknown error <num>",
which is the current expectation for errno_autotest. Differentiate
the error string on Windows to remove a "duplicate error code" failure.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/test_errno.c | 12 +++++++++++-
lib/eal/common/eal_common_errno.c | 4 ++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/app/test/test_errno.c b/app/test/test_errno.c
index 3ff0456a58..0db4fbc8b3 100644
--- a/app/test/test_errno.c
+++ b/app/test/test_errno.c
@@ -18,13 +18,19 @@ test_errno(void)
{
const char *rte_retval;
const char *libc_retval;
+
+#ifndef RTE_EXEC_ENV_WINDOWS
#ifdef RTE_EXEC_ENV_FREEBSD
/* BSD has a colon in the string, unlike linux */
const char unknown_code_result[] = "Unknown error: %d";
#else
const char unknown_code_result[] = "Unknown error %d";
#endif
- char expected_libc_retval[sizeof(unknown_code_result)+3];
+ char expected_libc_retval[sizeof(unknown_code_result) + 3];
+#else
+ /* Windows doesn't return error number for error greater than MAX_errno*/
+ static const char expected_libc_retval[] = "Unknown error";
+#endif
/* use a small selection of standard errors for testing */
int std_errs[] = {EAGAIN, EBADF, EACCES, EINTR, EINVAL};
@@ -54,11 +60,13 @@ test_errno(void)
rte_retval, libc_retval);
if (strcmp(rte_retval, libc_retval) == 0)
return -1;
+#ifndef RTE_EXEC_ENV_WINDOWS
/* generate appropriate error string for unknown error number
* and then check that this is what we got back. If not, we have
* a duplicate error number that conflicts with errno.h */
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, rte_errs[i]);
+#endif
if ((strcmp(expected_libc_retval, libc_retval) != 0) &&
(strcmp("", libc_retval) != 0)){
printf("Error, duplicate error code %d\n", rte_errs[i]);
@@ -69,8 +77,10 @@ test_errno(void)
/* ensure that beyond RTE_MAX_ERRNO, we always get an unknown code */
rte_retval = rte_strerror(RTE_MAX_ERRNO + 1);
libc_retval = strerror(RTE_MAX_ERRNO + 1);
+#ifndef RTE_EXEC_ENV_WINDOWS
snprintf(expected_libc_retval, sizeof(expected_libc_retval),
unknown_code_result, RTE_MAX_ERRNO + 1);
+#endif
printf("rte_strerror: '%s', strerror: '%s'\n",
rte_retval, libc_retval);
if ((strcmp(rte_retval, libc_retval) != 0) ||
diff --git a/lib/eal/common/eal_common_errno.c b/lib/eal/common/eal_common_errno.c
index f86802705a..7507c746ec 100644
--- a/lib/eal/common/eal_common_errno.c
+++ b/lib/eal/common/eal_common_errno.c
@@ -37,7 +37,11 @@ rte_strerror(int errnum)
/* since some implementations of strerror_r throw an error
* themselves if errnum is too big, we handle that case here */
if (errnum >= RTE_MAX_ERRNO)
+#ifdef RTE_EXEC_ENV_WINDOWS
+ snprintf(ret, RETVAL_SZ, "Unknown error");
+#else
snprintf(ret, RETVAL_SZ, "Unknown error%s %d", sep, errnum);
+#endif
else
switch (errnum){
case E_RTE_SECONDARY:
--
2.34.1.windows.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v15 07/11] app/test: remove two alarm_autotest cases
2022-01-26 5:10 ` [PATCH v15 " Jie Zhou
` (5 preceding siblings ...)
2022-01-26 5:10 ` [PATCH v15 06/11] app/test: differentiate a strerror on different OS Jie Zhou
@ 2022-01-26 5:10 ` Jie Zhou
2022-01-26 5:10 ` [PATCH v15 08/11] app/test: resolve name collision Jie Zhou
` (4 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2022-01-26 5:10 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Remove two alarm_autotest test cases which do bogus range check
on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/test_alarm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_alarm.c b/app/test/test_alarm.c
index b4034339b8..70e97a3109 100644
--- a/app/test/test_alarm.c
+++ b/app/test/test_alarm.c
@@ -10,6 +10,7 @@
#include "test.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
static volatile int flag;
static void
@@ -18,6 +19,7 @@ test_alarm_callback(void *cb_arg)
flag = 1;
printf("Callback setting flag - OK. [cb_arg = %p]\n", cb_arg);
}
+#endif
static int
test_alarm(void)
@@ -27,6 +29,7 @@ test_alarm(void)
return 0;
#endif
+#ifndef RTE_EXEC_ENV_WINDOWS
/* check if it will fail to set alarm with wrong us value */
printf("check if it will fail to set alarm with wrong ms values\n");
if (rte_eal_alarm_set(0, test_alarm_callback,
@@ -39,6 +42,7 @@ test_alarm(void)
printf("should not be successful with (UINT64_MAX-1) us value\n");
return -1;
}
+#endif
/* check if it will fail to set alarm with null callback parameter */
printf("check if it will fail to set alarm with null callback parameter\n");
--
2.34.1.windows.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v15 08/11] app/test: resolve name collision
2022-01-26 5:10 ` [PATCH v15 " Jie Zhou
` (6 preceding siblings ...)
2022-01-26 5:10 ` [PATCH v15 07/11] app/test: remove two alarm_autotest cases Jie Zhou
@ 2022-01-26 5:10 ` Jie Zhou
2022-01-26 5:10 ` [PATCH v15 09/11] app/test: skip tests that are not supported yet Jie Zhou
` (3 subsequent siblings)
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2022-01-26 5:10 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Add OP_ prefix to resolve name collision to enable hash_perf test
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/test_hash_perf.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/app/test/test_hash_perf.c b/app/test/test_hash_perf.c
index 76cdac5d53..7e98ec3964 100644
--- a/app/test/test_hash_perf.c
+++ b/app/test/test_hash_perf.c
@@ -30,10 +30,10 @@
#define BURST_SIZE 16
enum operations {
- ADD = 0,
- LOOKUP,
- LOOKUP_MULTI,
- DELETE,
+ OP_ADD = 0,
+ OP_LOOKUP,
+ OP_LOOKUP_MULTI,
+ OP_DELETE,
NUM_OPERATIONS
};
@@ -308,7 +308,7 @@ timed_adds(unsigned int with_hash, unsigned int with_data,
const uint64_t end_tsc = rte_rdtsc();
const uint64_t time_taken = end_tsc - start_tsc;
- cycles[table_index][ADD][with_hash][with_data] = time_taken/keys_to_add;
+ cycles[table_index][OP_ADD][with_hash][with_data] = time_taken/keys_to_add;
return 0;
}
@@ -385,7 +385,7 @@ timed_lookups(unsigned int with_hash, unsigned int with_data,
const uint64_t end_tsc = rte_rdtsc();
const uint64_t time_taken = end_tsc - start_tsc;
- cycles[table_index][LOOKUP][with_hash][with_data] = time_taken/num_lookups;
+ cycles[table_index][OP_LOOKUP][with_hash][with_data] = time_taken/num_lookups;
return 0;
}
@@ -511,7 +511,7 @@ timed_lookups_multi(unsigned int with_hash, unsigned int with_data,
const uint64_t end_tsc = rte_rdtsc();
const uint64_t time_taken = end_tsc - start_tsc;
- cycles[table_index][LOOKUP_MULTI][with_hash][with_data] =
+ cycles[table_index][OP_LOOKUP_MULTI][with_hash][with_data] =
time_taken/num_lookups;
return 0;
@@ -550,7 +550,7 @@ timed_deletes(unsigned int with_hash, unsigned int with_data,
const uint64_t end_tsc = rte_rdtsc();
const uint64_t time_taken = end_tsc - start_tsc;
- cycles[table_index][DELETE][with_hash][with_data] = time_taken/keys_to_add;
+ cycles[table_index][OP_DELETE][with_hash][with_data] = time_taken/keys_to_add;
return 0;
}
--
2.34.1.windows.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v15 09/11] app/test: skip tests that are not supported yet
2022-01-26 5:10 ` [PATCH v15 " Jie Zhou
` (7 preceding siblings ...)
2022-01-26 5:10 ` [PATCH v15 08/11] app/test: resolve name collision Jie Zhou
@ 2022-01-26 5:10 ` Jie Zhou
2022-02-08 10:58 ` Thomas Monjalon
2022-02-08 11:39 ` Thomas Monjalon
2022-01-26 5:10 ` [PATCH v15 10/11] app/test: replace .sh script with .py script Jie Zhou
` (2 subsequent siblings)
11 siblings, 2 replies; 245+ messages in thread
From: Jie Zhou @ 2022-01-26 5:10 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
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>
---
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 <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 /*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 <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 +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 <time.h>
#include <rte_common.h>
@@ -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 <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 /*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 <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 /*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 <rte_common.h>
#include <rte_cryptodev.h>
#include <rte_esp.h>
@@ -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 <time.h>
#include <rte_common.h>
@@ -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 <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 /*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 <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 @@ 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 <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 /*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 <string.h>
#include <stdarg.h>
+
+#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 <libgen.h>
#include <stdlib.h>
#include <errno.h>
@@ -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 <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 /*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 <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 /*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 <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 /*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 <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 /*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 <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 /*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 <math.h>
@@ -10,6 +11,17 @@
#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 +33,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 +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 <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 +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 <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 +33,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 +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 <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 /*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 <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 /*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 <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);
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 <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 /*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 <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 /*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 <assert.h>
#include <inttypes.h>
#include <signal.h>
@@ -9,14 +11,23 @@
#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 +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 <inttypes.h>
#include <signal.h>
#include <stdio.h>
@@ -9,14 +11,22 @@
#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 +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 <time.h>
@@ -8,13 +9,22 @@
#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 +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 <time.h>
@@ -12,16 +13,25 @@
#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 +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 <stdio.h>
#include <rte_ip.h>
@@ -8,10 +9,20 @@
#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 +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 <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 +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 <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>
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 <stdio.h>
#include <stdint.h>
@@ -10,7 +21,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 +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 <stdio.h>
#include <stdint.h>
@@ -8,9 +9,18 @@
#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 +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 <stdio.h>
#include <stdint.h>
@@ -12,7 +23,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 +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 <stdio.h>
#include <stdint.h>
#include <stdlib.h>
@@ -15,7 +25,6 @@
#include <rte_ip.h>
#include <rte_lpm.h>
-#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 <stdio.h>
#include <stdint.h>
@@ -8,7 +9,9 @@
#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>
@@ -23,11 +26,8 @@
#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 +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 <string.h>
#include <stdarg.h>
@@ -33,8 +34,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 +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 <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 /*!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 <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 +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 <stdio.h>
#include <inttypes.h>
@@ -11,9 +12,18 @@
#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 +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 <rte_os_shim.h>
#include <rte_random.h>
#include <rte_malloc.h>
-
#include <rte_memcpy.h>
#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 <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 /*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 <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -12,8 +38,6 @@
#include <time.h>
#include <math.h>
-#include "test.h"
-
#include <rte_pie.h>
#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 <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 /*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 <stdlib.h>
#include <stdio.h>
@@ -8,12 +9,34 @@
#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 +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 <stdio.h>
#include <unistd.h>
@@ -9,12 +10,20 @@
#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 +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 <medvedkinv@gmail.com>
* 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 +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 <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,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 <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 +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 <rte_errno.h>
#include <rte_log.h>
#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_ether.h>
+
#include <rte_security.h>
#include <rte_security_driver.h>
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 <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 +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 <rte_ip.h>
#include <rte_string_fns.h>
#include <rte_hexdump.h>
@@ -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 <string.h>
#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 <string.h>
#include <rte_pipeline.h>
#include <rte_log.h>
@@ -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 <string.h>
#include <rte_byteorder.h>
#include <rte_table_lpm_ipv6.h>
@@ -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 <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 +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
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v15 10/11] app/test: replace .sh script with .py script
2022-01-26 5:10 ` [PATCH v15 " Jie Zhou
` (8 preceding siblings ...)
2022-01-26 5:10 ` [PATCH v15 09/11] app/test: skip tests that are not supported yet Jie Zhou
@ 2022-01-26 5:10 ` Jie Zhou
2022-02-03 11:15 ` Thomas Monjalon
2022-02-08 12:03 ` Thomas Monjalon
2022-01-26 5:10 ` [PATCH v15 11/11] app/test: enable unit test on Windows Jie Zhou
2022-02-08 13:20 ` [PATCH v15 00/11] app/test: enable subset of tests " Thomas Monjalon
11 siblings, 2 replies; 245+ messages in thread
From: Jie Zhou @ 2022-01-26 5:10 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
- Add python script to check if system supports hugepages
- Remove corresponding .sh script
- Replace calling of .sh with corresponding .py in meson.build
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/has-hugepage.sh | 11 -----------
app/test/has_hugepage.py | 26 ++++++++++++++++++++++++++
app/test/meson.build | 2 +-
3 files changed, 27 insertions(+), 12 deletions(-)
delete mode 100755 app/test/has-hugepage.sh
create mode 100644 app/test/has_hugepage.py
diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh
deleted file mode 100755
index d600fad319..0000000000
--- a/app/test/has-hugepage.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright 2020 Mellanox Technologies, Ltd
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /proc/sys/vm/nr_hugepages || echo 0
-elif [ "$(uname)" = "FreeBSD" ] ; then
- echo 1 # assume FreeBSD always has hugepages
-else
- echo 0
-fi
diff --git a/app/test/has_hugepage.py b/app/test/has_hugepage.py
new file mode 100644
index 0000000000..f8e7087d1c
--- /dev/null
+++ b/app/test/has_hugepage.py
@@ -0,0 +1,26 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2021 Microsoft Corporation
+"""This script checks if the system supports huge pages"""
+
+import platform
+import ctypes
+
+os_name = platform.system()
+if os_name == "Linux":
+ try:
+ with open("/proc/sys/vm/nr_hugepages") as file_o:
+ content = file_o.read()
+ print(content)
+ except:
+ print("0")
+
+elif os_name == "FreeBSD":
+ # Assume FreeBSD always has hugepages enabled
+ print("1")
+elif os_name == "Windows":
+ if ctypes.windll.kernel32.GetLargePageMinimum() > 0:
+ print("1")
+ else:
+ print("0")
+else:
+ print("0")
diff --git a/app/test/meson.build b/app/test/meson.build
index 725a218f4a..4de0dcd7a7 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -457,7 +457,7 @@ dpdk_test = executable('dpdk-test',
driver_install_path),
install: true)
-has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
+has_hugepage = run_command(py3, 'has_hugepage.py').stdout().strip() != '0'
message('hugepage availability: @0@'.format(has_hugepage))
# some perf tests (eg: memcpy perf autotest)take very long
--
2.34.1.windows.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* [PATCH v15 11/11] app/test: enable unit test on Windows
2022-01-26 5:10 ` [PATCH v15 " Jie Zhou
` (9 preceding siblings ...)
2022-01-26 5:10 ` [PATCH v15 10/11] app/test: replace .sh script with .py script Jie Zhou
@ 2022-01-26 5:10 ` Jie Zhou
2022-02-08 13:20 ` [PATCH v15 00/11] app/test: enable subset of tests " Thomas Monjalon
11 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2022-01-26 5:10 UTC (permalink / raw)
To: dev
Cc: dmitry.kozliuk, bruce.richardson, roretzla, navasile, dmitrym,
pallavi.kadam, talshn, thomas, aconole
Enable a subset of unit tests for Windows CI
- For driver tests, driver owners should enable corresponding tests when
enabling driver for Windows. For example, the cryptodev tests will be
enabled by "patch-18949: app/test: enable crypto unit tests on Windows"
(which depends on this patchset to be merged).
- For dump tests, currently the tests hang on Windows which require
further investigation.
- For telemetry tests, it has POSIX socket specific codes which require
replacement for Windows. Will investigate and work on a separate patch.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
app/test/meson.build | 76 ++++++++++++++++++++++----------------------
1 file changed, 38 insertions(+), 38 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index 4de0dcd7a7..9d12057f29 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,12 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if is_windows
- build = false
- reason = 'not supported on Windows'
- subdir_done()
-endif
-
if not get_option('tests')
subdir_done()
endif
@@ -294,38 +288,44 @@ perf_test_names = [
'thash_perf_autotest',
]
-driver_test_names = [
- 'cryptodev_aesni_mb_autotest',
- 'cryptodev_aesni_gcm_autotest',
- 'cryptodev_cn9k_autotest',
- 'cryptodev_cn10k_autotest',
- 'cryptodev_dpaa_sec_autotest',
- 'cryptodev_dpaa2_sec_autotest',
- 'cryptodev_null_autotest',
- 'cryptodev_openssl_autotest',
- 'cryptodev_openssl_asym_autotest',
- 'cryptodev_qat_autotest',
- 'cryptodev_sw_armv8_autotest',
- 'cryptodev_sw_kasumi_autotest',
- 'cryptodev_sw_mvsam_autotest',
- 'cryptodev_sw_snow3g_autotest',
- 'cryptodev_sw_zuc_autotest',
- 'dmadev_autotest',
- 'eventdev_selftest_octeontx',
- 'eventdev_selftest_sw',
- 'rawdev_autotest',
-]
+driver_test_names = []
-dump_test_names = [
- 'dump_struct_sizes',
- 'dump_mempool',
- 'dump_malloc_stats',
- 'dump_devargs',
- 'dump_log_types',
- 'dump_ring',
- 'dump_physmem',
- 'dump_memzone',
-]
+dump_test_names = []
+
+if not is_windows
+ driver_test_names += [
+ 'cryptodev_aesni_mb_autotest',
+ 'cryptodev_aesni_gcm_autotest',
+ 'cryptodev_cn9k_autotest',
+ 'cryptodev_cn10k_autotest',
+ 'cryptodev_dpaa_sec_autotest',
+ 'cryptodev_dpaa2_sec_autotest',
+ 'cryptodev_null_autotest',
+ 'cryptodev_openssl_autotest',
+ 'cryptodev_openssl_asym_autotest',
+ 'cryptodev_qat_autotest',
+ 'cryptodev_sw_armv8_autotest',
+ 'cryptodev_sw_kasumi_autotest',
+ 'cryptodev_sw_mvsam_autotest',
+ 'cryptodev_sw_snow3g_autotest',
+ 'cryptodev_sw_zuc_autotest',
+ 'dmadev_autotest',
+ 'eventdev_selftest_octeontx',
+ 'eventdev_selftest_sw',
+ 'rawdev_autotest',
+ ]
+
+ dump_test_names += [
+ 'dump_struct_sizes',
+ 'dump_mempool',
+ 'dump_malloc_stats',
+ 'dump_devargs',
+ 'dump_log_types',
+ 'dump_ring',
+ 'dump_physmem',
+ 'dump_memzone',
+ ]
+endif
# The following linkages are an exception to allow running the
# unit tests without requiring that the developer install the
@@ -349,7 +349,7 @@ if dpdk_conf.has('RTE_LIB_METRICS')
test_sources += ['test_metrics.c']
fast_tests += [['metrics_autotest', true]]
endif
-if dpdk_conf.has('RTE_LIB_TELEMETRY')
+if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
endif
--
2.34.1.windows.1
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v15 10/11] app/test: replace .sh script with .py script
2022-01-26 5:10 ` [PATCH v15 10/11] app/test: replace .sh script with .py script Jie Zhou
@ 2022-02-03 11:15 ` Thomas Monjalon
2022-02-03 18:54 ` Jie Zhou
2022-02-08 12:03 ` Thomas Monjalon
1 sibling, 1 reply; 245+ messages in thread
From: Thomas Monjalon @ 2022-02-03 11:15 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, dmitry.kozliuk, bruce.richardson, roretzla, navasile,
dmitrym, pallavi.kadam, talshn, aconole
26/01/2022 06:10, Jie Zhou:
> - Add python script to check if system supports hugepages
> - Remove corresponding .sh script
> - Replace calling of .sh with corresponding .py in meson.build
>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> ---
> app/test/has-hugepage.sh | 11 -----------
> app/test/has_hugepage.py | 26 ++++++++++++++++++++++++++
The file MAINTAINERS should be updated with the new file name.
I will do it before merging if the rest is OK.
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v15 10/11] app/test: replace .sh script with .py script
2022-02-03 11:15 ` Thomas Monjalon
@ 2022-02-03 18:54 ` Jie Zhou
0 siblings, 0 replies; 245+ messages in thread
From: Jie Zhou @ 2022-02-03 18:54 UTC (permalink / raw)
To: Thomas Monjalon
Cc: dev, dmitry.kozliuk, bruce.richardson, roretzla, navasile,
dmitrym, pallavi.kadam, talshn, aconole
O Thu, Feb 03, 2022 at 12:15:19PM +0100, Thomas Monjalon wrote:
> 26/01/2022 06:10, Jie Zhou:
> > - Add python script to check if system supports hugepages
> > - Remove corresponding .sh script
> > - Replace calling of .sh with corresponding .py in meson.build
> >
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> > ---
> > app/test/has-hugepage.sh | 11 -----------
> > app/test/has_hugepage.py | 26 ++++++++++++++++++++++++++
>
> The file MAINTAINERS should be updated with the new file name.
> I will do it before merging if the rest is OK.
>
Thanks Thomas. If you prefer me to submit a follow up patch to update the maintainers file, just please let me know.
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v15 05/11] app/test: skip two logs_autotest cases on Windows
2022-01-26 5:10 ` [PATCH v15 05/11] app/test: skip two logs_autotest cases " Jie Zhou
@ 2022-02-08 9:49 ` Thomas Monjalon
0 siblings, 0 replies; 245+ messages in thread
From: Thomas Monjalon @ 2022-02-08 9:49 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, dmitry.kozliuk, bruce.richardson, roretzla, navasile,
dmitrym, pallavi.kadam, talshn, aconole
26/01/2022 06:10, Jie Zhou:
> --- a/app/test/test_logs.c
> +++ b/app/test/test_logs.c
> @@ -121,7 +122,10 @@ test_logs(void)
>
> rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
> CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_EMERG, RTE_LOG_EMERG);
> -
> +#else
> + ret = rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG);
> + CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR);
> +#endif
ret is not used, I'll remove it.
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v15 09/11] app/test: skip tests that are not supported yet
2022-01-26 5:10 ` [PATCH v15 09/11] app/test: skip tests that are not supported yet Jie Zhou
@ 2022-02-08 10:58 ` Thomas Monjalon
2022-02-08 11:39 ` Thomas Monjalon
1 sibling, 0 replies; 245+ messages in thread
From: Thomas Monjalon @ 2022-02-08 10:58 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, dmitry.kozliuk, bruce.richardson, roretzla, navasile,
dmitrym, pallavi.kadam, talshn, aconole
26/01/2022 06:10, Jie Zhou:
> +#ifdef RTE_EXEC_ENV_WINDOWS
> +static int
> +test_missing_c_flag(void)
> +{
> + printf("emissing_c_flag not supported on Windows, skipping test\n");
Typo here, will change to missing_c_flag
[...]
> +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/
I think such comment would be more explicit as /* !RTE_EXEC_ENV_WINDOWS */
when closing a block which is not compiled on Windows.
I will change accordingly.
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v15 09/11] app/test: skip tests that are not supported yet
2022-01-26 5:10 ` [PATCH v15 09/11] app/test: skip tests that are not supported yet Jie Zhou
2022-02-08 10:58 ` Thomas Monjalon
@ 2022-02-08 11:39 ` Thomas Monjalon
1 sibling, 0 replies; 245+ messages in thread
From: Thomas Monjalon @ 2022-02-08 11:39 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, dmitry.kozliuk, bruce.richardson, roretzla, navasile,
dmitrym, pallavi.kadam, talshn, aconole
The changes below are not for skipping test.
I guess I can squash it in the name collision patch.
26/01/2022 06:10, Jie Zhou:
> --- 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;
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v15 10/11] app/test: replace .sh script with .py script
2022-01-26 5:10 ` [PATCH v15 10/11] app/test: replace .sh script with .py script Jie Zhou
2022-02-03 11:15 ` Thomas Monjalon
@ 2022-02-08 12:03 ` Thomas Monjalon
1 sibling, 0 replies; 245+ messages in thread
From: Thomas Monjalon @ 2022-02-08 12:03 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, dmitry.kozliuk, bruce.richardson, roretzla, navasile,
dmitrym, pallavi.kadam, talshn, aconole
26/01/2022 06:10, Jie Zhou:
> + try:
> + with open("/proc/sys/vm/nr_hugepages") as file_o:
> + content = file_o.read()
> + print(content)
> + except:
> + print("0")
flake8 says this line is over-indented, I will fix.
There is another warning that I won't fix:
app/test/has_hugepage.py:14:5: E722 do not use bare 'except'
^ permalink raw reply [flat|nested] 245+ messages in thread
* Re: [PATCH v15 00/11] app/test: enable subset of tests on Windows
2022-01-26 5:10 ` [PATCH v15 " Jie Zhou
` (10 preceding siblings ...)
2022-01-26 5:10 ` [PATCH v15 11/11] app/test: enable unit test on Windows Jie Zhou
@ 2022-02-08 13:20 ` Thomas Monjalon
11 siblings, 0 replies; 245+ messages in thread
From: Thomas Monjalon @ 2022-02-08 13:20 UTC (permalink / raw)
To: Jie Zhou
Cc: dev, dmitry.kozliuk, bruce.richardson, roretzla, navasile,
dmitrym, pallavi.kadam, talshn, aconole
26/01/2022 06:10, Jie Zhou:
> The goal of this patchset is to enable unit tests in CI for Windows.
> It mainly contains:
> - Replace POSIX specific codes
> - Fix some lib and tests per failures investigation
> - Add test stubs for not yet supported ones on Windows
> - Replace .sh script with .py script for meson.build
> - Enable build and run subset of unit tests on Windows
Applied with some minor fixes, thanks.
> Future work:
> - Work with CI lab to onboard unit tests for Windows to catch regression
> - Investigate issues hit at CI onboarding
> - Enable more tests
Yes please follow-up to enable all tests, thank you.
^ permalink raw reply [flat|nested] 245+ messages in thread
end of thread, other threads:[~2022-02-08 13:20 UTC | newest]
Thread overview: 245+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 6:17 [dpdk-dev] [PATCH v1 00/13] app/test: enable subset of tests on Windows Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 01/13] lib: build libraries that some tests depend on Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 02/13] driver/mempool: build mempool stack on Windows Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 03/13] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 04/13] app/test: remove unnecessary headers Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 05/13] app/test: replace POSIX specific code Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 06/13] app/test: exclude ENOTSUP as failure Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 07/13] app/test: skip interrupt tests on Windows Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 08/13] app/test: temporarily "skip" one cmdline test case Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 09/13] app/test: skip two logs_autotest cases on Windows Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 10/13] app/test: differentiate a strerror on different OS Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 11/13] app/test: remove two alarm_autotest cases Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 12/13] app/test: replace .sh scripts with .py scripts Jie Zhou
2021-08-18 6:17 ` [dpdk-dev] [PATCH v1 13/13] app/test: enable subset of unit tests on Windows Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 00/13] app/test: enable subset of " Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 01/13] lib: build libraries that some tests depend on Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 02/13] driver/mempool: build mempool stack on Windows Jie Zhou
2021-08-28 22:43 ` Dmitry Kozlyuk
2021-08-31 17:06 ` Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 03/13] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-08-28 22:44 ` Dmitry Kozlyuk
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 04/13] app/test: remove unnecessary headers Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 05/13] app/test: replace POSIX specific code Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 06/13] app/test: exclude ENOTSUP as failure Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 07/13] app/test: skip interrupt tests on Windows Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 08/13] app/test: temporarily "skip" one cmdline test case Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 09/13] app/test: skip two logs_autotest cases on Windows Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 10/13] app/test: differentiate a strerror on different OS Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 11/13] app/test: remove two alarm_autotest cases Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 12/13] app/test: replace .sh scripts with .py scripts Jie Zhou
2021-08-28 22:17 ` Dmitry Kozlyuk
2021-08-31 16:58 ` Jie Zhou
2021-08-18 17:13 ` [dpdk-dev] [PATCH v2 13/13] app/test: enable subset of unit tests on Windows Jie Zhou
2021-08-28 22:18 ` Dmitry Kozlyuk
2021-08-31 17:01 ` Jie Zhou
2021-08-31 17:39 ` Dmitry Kozlyuk
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 00/13] app/test: enable subset of " Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 01/13] lib: build libraries that some tests depend on Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 02/13] mempool/stack: build on Windows Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 03/13] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 04/13] app/test: remove unnecessary headers Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 05/13] app/test: replace POSIX specific code Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 06/13] app/test: exclude ENOTSUP as failure Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 07/13] app/test: skip interrupt tests on Windows Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 08/13] app/test: temporarily "skip" one cmdline test case Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 09/13] app/test: skip two logs_autotest cases on Windows Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 10/13] app/test: differentiate a strerror on different OS Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 11/13] app/test: remove two alarm_autotest cases Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 12/13] app/test: replace .sh scripts with .py scripts Jie Zhou
2021-09-04 4:19 ` [dpdk-dev] [PATCH v3 13/13] app/test: enable subset of unit tests on Windows Jie Zhou
2021-09-07 13:43 ` Aaron Conole
2021-09-08 22:14 ` Jie Zhou
2021-09-23 7:35 ` Dmitry Kozlyuk
2021-09-30 23:57 ` Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 00/12] app/test: enable subset of " Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 01/12] lib: build libraries that some tests depend on Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 02/12] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 03/12] app/test: remove unnecessary headers Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 04/12] app/test: replace POSIX specific code Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 05/12] app/test: exclude ENOTSUP as failure Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 06/12] app/test: skip interrupt tests on Windows Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 07/12] app/test: temporarily "skip" one cmdline test case Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 08/12] app/test: skip two logs_autotest cases on Windows Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 09/12] app/test: differentiate a strerror on different OS Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 10/12] app/test: remove two alarm_autotest cases Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 11/12] app/test: replace .sh scripts with .py scripts Jie Zhou
2021-10-14 3:30 ` [dpdk-dev] [PATCH v4 12/12] app/test: enable subset of unit tests on Windows Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 00/12] app/test: enable subset of " Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 01/12] lib: build libraries that some tests depend on Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 02/12] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 03/12] app/test: remove unnecessary headers Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 04/12] app/test: replace POSIX specific code Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 05/12] app/test: exclude ENOTSUP as failure Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 06/12] app/test: skip interrupt tests on Windows Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 07/12] app/test: temporarily "skip" one cmdline test case Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 08/12] app/test: skip two logs_autotest cases on Windows Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 09/12] app/test: differentiate a strerror on different OS Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 10/12] app/test: remove two alarm_autotest cases Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 11/12] app/test: replace .sh scripts with .py scripts Jie Zhou
2021-10-14 4:52 ` [dpdk-dev] [PATCH v5 12/12] app/test: enable subset of unit tests on Windows Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 00/12] app/test: enable subset of " Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 01/12] lib: build libraries that some tests depend on Jie Zhou
2021-10-25 15:38 ` Thomas Monjalon
2021-10-26 0:47 ` Jie Zhou
2021-10-26 8:44 ` Thomas Monjalon
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 02/12] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 03/12] app/test: remove unnecessary headers Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 04/12] app/test: replace POSIX specific code Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 05/12] app/test: exclude ENOTSUP as failure Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 06/12] app/test: skip interrupt tests on Windows Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 07/12] app/test: temporarily "skip" one cmdline test case Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 08/12] app/test: skip two logs_autotest cases on Windows Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 09/12] app/test: differentiate a strerror on different OS Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 10/12] app/test: remove two alarm_autotest cases Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 11/12] app/test: replace .sh scripts with .py scripts Jie Zhou
2021-10-14 16:21 ` [dpdk-dev] [PATCH v6 12/12] app/test: enable subset of unit tests on Windows Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 00/11] app/test: enable subset of " Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 02/11] app/test: remove unnecessary headers Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 03/11] app/test: replace POSIX specific code Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 04/11] app/test: exclude ENOTSUP as failure Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 05/11] app/test: skip interrupt tests on Windows Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 06/11] app/test: temporarily "skip" one cmdline test case Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 07/11] app/test: skip two logs_autotest cases on Windows Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 08/11] app/test: differentiate a strerror on different OS Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 09/11] app/test: remove two alarm_autotest cases Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 10/11] app/test: replace .sh scripts with .py scripts Jie Zhou
2021-10-26 2:26 ` [dpdk-dev] [PATCH v7 11/11] app/test: enable subset of unit tests on Windows Jie Zhou
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 00/11] app/test: enable subset of " Jie Zhou
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 02/11] app/test: remove unnecessary headers Jie Zhou
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 03/11] app/test: replace POSIX specific code Jie Zhou
2021-11-23 22:02 ` Dmitry Kozlyuk
2021-12-01 1:05 ` Jie Zhou
2021-12-01 7:19 ` Dmitry Kozlyuk
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 04/11] app/test: exclude ENOTSUP as failure Jie Zhou
2021-11-23 22:02 ` Dmitry Kozlyuk
2021-12-01 0:31 ` Jie Zhou
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 05/11] app/test: skip interrupt tests on Windows Jie Zhou
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 06/11] app/test: temporarily "skip" one cmdline test case Jie Zhou
2021-11-23 22:02 ` Dmitry Kozlyuk
2021-12-01 0:30 ` Jie Zhou
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 07/11] app/test: skip two logs_autotest cases on Windows Jie Zhou
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 08/11] app/test: differentiate a strerror on different OS Jie Zhou
2021-10-26 2:45 ` [dpdk-dev] [PATCH v8 09/11] app/test: remove two alarm_autotest cases Jie Zhou
2021-10-26 2:46 ` [dpdk-dev] [PATCH v8 10/11] app/test: replace .sh scripts with .py scripts Jie Zhou
2021-11-23 22:15 ` Dmitry Kozlyuk
2021-12-01 0:29 ` Jie Zhou
2021-10-26 2:46 ` [dpdk-dev] [PATCH v8 11/11] app/test: enable subset of unit tests on Windows Jie Zhou
2021-12-01 18:05 ` [PATCH v9 0/9] app/test: enable subset of " Jie Zhou
2021-12-01 18:05 ` [PATCH v9 1/9] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-12-01 18:05 ` [PATCH v9 2/9] app/test: remove POSIX-specific code Jie Zhou
2021-12-01 18:05 ` [PATCH v9 3/9] app/test: fix incorrect errno variable Jie Zhou
2021-12-01 18:05 ` [PATCH v9 4/9] app/test: skip interrupt tests on Windows Jie Zhou
2021-12-01 18:05 ` [PATCH v9 5/9] app/test: skip two logs_autotest cases " Jie Zhou
2021-12-01 18:05 ` [PATCH v9 6/9] app/test: differentiate a strerror on different OS Jie Zhou
2021-12-01 18:05 ` [PATCH v9 7/9] app/test: remove two alarm_autotest cases Jie Zhou
2021-12-01 18:05 ` [PATCH v9 8/9] app/test: replace .sh script with .py script Jie Zhou
2021-12-01 18:05 ` [PATCH v9 9/9] app/test: enable subset of unit tests on Windows Jie Zhou
2021-12-01 18:45 ` Stephen Hemminger
2021-12-01 18:52 ` Jie Zhou
2021-12-01 18:58 ` [EXTERNAL] " Tyler Retzlaff
2021-12-01 18:43 ` [PATCH v10 0/9] app/test: enable subset of " Jie Zhou
2021-12-01 18:43 ` [PATCH v10 1/9] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-12-01 18:43 ` [PATCH v10 2/9] app/test: remove POSIX-specific code Jie Zhou
2021-12-04 1:05 ` Dmitry Kozlyuk
2021-12-01 18:43 ` [PATCH v10 3/9] app/test: fix incorrect errno variable Jie Zhou
2021-12-01 18:44 ` [PATCH v10 4/9] app/test: skip interrupt tests on Windows Jie Zhou
2021-12-01 18:44 ` [PATCH v10 5/9] app/test: skip two logs_autotest cases " Jie Zhou
2021-12-01 18:44 ` [PATCH v10 6/9] app/test: differentiate a strerror on different OS Jie Zhou
2021-12-01 18:44 ` [PATCH v10 7/9] app/test: remove two alarm_autotest cases Jie Zhou
2021-12-01 18:44 ` [PATCH v10 8/9] app/test: replace .sh script with .py script Jie Zhou
2021-12-01 18:44 ` [PATCH v10 9/9] app/test: enable subset of unit tests on Windows Jie Zhou
2021-12-02 9:17 ` David Marchand
2021-12-02 23:23 ` Jie Zhou
2021-12-03 0:06 ` [PATCH v11 0/9] app/test: enable subset of " Jie Zhou
2021-12-03 0:06 ` [PATCH v11 1/9] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-12-03 0:06 ` [PATCH v11 2/9] app/test: remove POSIX-specific code Jie Zhou
2021-12-03 0:06 ` [PATCH v11 3/9] app/test: fix incorrect errno variable Jie Zhou
2021-12-04 1:05 ` Dmitry Kozlyuk
2021-12-03 0:06 ` [PATCH v11 4/9] app/test: skip interrupt tests on Windows Jie Zhou
2021-12-04 1:06 ` Dmitry Kozlyuk
2021-12-03 0:06 ` [PATCH v11 5/9] app/test: skip two logs_autotest cases " Jie Zhou
2021-12-04 1:16 ` Dmitry Kozlyuk
2021-12-03 0:06 ` [PATCH v11 6/9] app/test: differentiate a strerror on different OS Jie Zhou
2021-12-04 1:33 ` Dmitry Kozlyuk
2021-12-06 17:25 ` Jie Zhou
2021-12-03 0:06 ` [PATCH v11 7/9] app/test: remove two alarm_autotest cases Jie Zhou
2021-12-04 1:06 ` Dmitry Kozlyuk
2021-12-03 0:06 ` [PATCH v11 8/9] app/test: replace .sh script with .py script Jie Zhou
2021-12-04 1:06 ` Dmitry Kozlyuk
2021-12-03 0:06 ` [PATCH v11 9/9] app/test: enable subset of unit tests on Windows Jie Zhou
2021-12-04 0:07 ` [PATCH v11 0/9] app/test: enable subset of " Kadam, Pallavi
2021-12-07 21:24 ` [PATCH v12 00/11] " Jie Zhou
2021-12-07 21:24 ` [PATCH v12 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-12-07 21:24 ` [PATCH v12 02/11] app/test: remove POSIX-specific code Jie Zhou
2021-12-07 21:24 ` [PATCH v12 03/11] app/test: fix incorrect errno variable Jie Zhou
2021-12-07 21:24 ` [PATCH v12 04/11] app/test: skip interrupt tests on Windows Jie Zhou
2021-12-07 21:24 ` [PATCH v12 05/11] app/test: skip two logs_autotest cases " Jie Zhou
2021-12-07 21:24 ` [PATCH v12 06/11] app/test: differentiate a strerror on different OS Jie Zhou
2021-12-07 21:24 ` [PATCH v12 07/11] app/test: remove two alarm_autotest cases Jie Zhou
2021-12-07 21:24 ` [PATCH v12 08/11] app/test: resolve name collision Jie Zhou
2021-12-07 21:24 ` [PATCH v12 09/11] app/test: add test stubs for not supported ones Jie Zhou
2021-12-07 21:24 ` [PATCH v12 10/11] app/test: replace .sh script with .py script Jie Zhou
2021-12-07 21:24 ` [PATCH v12 11/11] app/test: enable unit test for Windows Jie Zhou
2021-12-08 1:50 ` [PATCH v13 00/11] app/test: enable subset of tests on Windows Jie Zhou
2021-12-08 1:50 ` [PATCH v13 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-12-08 1:50 ` [PATCH v13 02/11] app/test: remove POSIX-specific code Jie Zhou
2021-12-08 1:50 ` [PATCH v13 03/11] app/test: fix incorrect errno variable Jie Zhou
2021-12-08 1:50 ` [PATCH v13 04/11] app/test: skip interrupt tests on Windows Jie Zhou
2021-12-08 1:50 ` [PATCH v13 05/11] app/test: skip two logs_autotest cases " Jie Zhou
2021-12-08 1:50 ` [PATCH v13 06/11] app/test: differentiate a strerror on different OS Jie Zhou
2021-12-08 1:50 ` [PATCH v13 07/11] app/test: remove two alarm_autotest cases Jie Zhou
2021-12-08 1:50 ` [PATCH v13 08/11] app/test: resolve name collision Jie Zhou
2021-12-08 1:51 ` [PATCH v13 09/11] app/test: add test stubs for not supported ones Jie Zhou
2021-12-08 1:51 ` [PATCH v13 10/11] app/test: replace .sh script with .py script Jie Zhou
2021-12-08 1:51 ` [PATCH v13 11/11] app/test: enable unit test on Windows Jie Zhou
2021-12-08 16:57 ` Bruce Richardson
2021-12-08 18:19 ` Jie Zhou
2021-12-08 18:23 ` Bruce Richardson
2021-12-08 18:29 ` Jie Zhou
2021-12-08 18:59 ` [PATCH v14 00/11] app/test: enable subset of tests " Jie Zhou
2021-12-08 18:59 ` [PATCH v14 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
2021-12-08 18:59 ` [PATCH v14 02/11] app/test: remove POSIX-specific code Jie Zhou
2021-12-09 19:46 ` Tyler Retzlaff
2021-12-08 18:59 ` [PATCH v14 03/11] app/test: fix incorrect errno variable Jie Zhou
2021-12-08 18:59 ` [PATCH v14 04/11] app/test: skip interrupt tests on Windows Jie Zhou
2021-12-09 7:49 ` Jerin Jacob
2021-12-09 13:15 ` Aaron Conole
2021-12-09 16:17 ` Bruce Richardson
2021-12-09 16:19 ` Richardson, Bruce
2021-12-09 16:39 ` Bruce Richardson
2021-12-10 9:23 ` Dmitry Kozlyuk
2021-12-10 9:30 ` Bruce Richardson
2022-01-17 18:37 ` Thomas Monjalon
2021-12-08 18:59 ` [PATCH v14 05/11] app/test: skip two logs_autotest cases " Jie Zhou
2021-12-08 18:59 ` [PATCH v14 06/11] app/test: differentiate a strerror on different OS Jie Zhou
2021-12-08 19:07 ` Dmitry Kozlyuk
2021-12-08 18:59 ` [PATCH v14 07/11] app/test: remove two alarm_autotest cases Jie Zhou
2021-12-08 18:59 ` [PATCH v14 08/11] app/test: resolve name collision Jie Zhou
2021-12-08 19:45 ` Dmitry Kozlyuk
2021-12-08 18:59 ` [PATCH v14 09/11] app/test: add test stubs for not supported ones Jie Zhou
2021-12-09 19:47 ` Tyler Retzlaff
2021-12-08 18:59 ` [PATCH v14 10/11] app/test: replace .sh script with .py script Jie Zhou
2021-12-08 19:00 ` [PATCH v14 11/11] app/test: enable unit test on Windows Jie Zhou
2021-12-09 19:49 ` [PATCH v14 00/11] app/test: enable subset of tests " Tyler Retzlaff
2022-01-26 5:10 ` [PATCH v15 " Jie Zhou
2022-01-26 5:10 ` [PATCH v15 01/11] eal/windows: return ENOTSUP for not supported API Jie Zhou
2022-01-26 5:10 ` [PATCH v15 02/11] app/test: remove POSIX-specific code Jie Zhou
2022-01-26 5:10 ` [PATCH v15 03/11] app/test: fix incorrect errno variable Jie Zhou
2022-01-26 5:10 ` [PATCH v15 04/11] app/test: skip interrupt tests on Windows Jie Zhou
2022-01-26 5:10 ` [PATCH v15 05/11] app/test: skip two logs_autotest cases " Jie Zhou
2022-02-08 9:49 ` Thomas Monjalon
2022-01-26 5:10 ` [PATCH v15 06/11] app/test: differentiate a strerror on different OS Jie Zhou
2022-01-26 5:10 ` [PATCH v15 07/11] app/test: remove two alarm_autotest cases Jie Zhou
2022-01-26 5:10 ` [PATCH v15 08/11] app/test: resolve name collision Jie Zhou
2022-01-26 5:10 ` [PATCH v15 09/11] app/test: skip tests that are not supported yet Jie Zhou
2022-02-08 10:58 ` Thomas Monjalon
2022-02-08 11:39 ` Thomas Monjalon
2022-01-26 5:10 ` [PATCH v15 10/11] app/test: replace .sh script with .py script Jie Zhou
2022-02-03 11:15 ` Thomas Monjalon
2022-02-03 18:54 ` Jie Zhou
2022-02-08 12:03 ` Thomas Monjalon
2022-01-26 5:10 ` [PATCH v15 11/11] app/test: enable unit test on Windows Jie Zhou
2022-02-08 13:20 ` [PATCH v15 00/11] app/test: enable subset of tests " Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).