Skip to content

app/test: enable subset of tests on Windows

Jie Zhou dpdk-dev 15 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v15 Latest11 patches 7 repliesIn review
  2. v1411 patches 13 repliesSuperseded
  3. v1311 patches 4 repliesSuperseded
Earlier versions · 12
VersionPostedPatchesRepliesStatus
v1211 patches0 repliesSuperseded
v119 patches8 repliesSuperseded
v109 patches3 repliesSuperseded
v99 patches3 repliesSuperseded
v811 patches9 repliesSuperseded
v711 patches0 repliesSuperseded
v612 patches3 repliesSuperseded
v512 patches0 repliesSuperseded
v412 patches0 repliesSuperseded
v313 patches4 repliesSuperseded
v213 patches8 repliesSuperseded
v113 patches0 repliesSuperseded

Changes in v15 from the cover letter

- 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.

Patches in v15 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11eal/windows: return ENOTSUP for not supported APIlib/eal/windows/eal_memalloc.c+3 -30 replies
2/11app/test: remove POSIX-specific codeapp/test/commands.c app/test/packet_burst_generator.c app/test/process.h +9 more+47 -330 replies
3/11app/test: fix incorrect errno variableapp/test/test_memory.c+1 -10 replies
4/11app/test: skip interrupt tests on Windowsapp/test/test_interrupts.c+3 -00 replies
5/11app/test: skip two logs_autotest cases on Windowsapp/test/test_logs.c+5 -11 reply
6/11app/test: differentiate a strerror on different OSapp/test/test_errno.c lib/eal/common/eal_common_errno.c+15 -10 replies
7/11app/test: remove two alarm_autotest casesapp/test/test_alarm.c+4 -00 replies
8/11app/test: resolve name collisionapp/test/test_hash_perf.c+8 -80 replies
9/11app/test: skip tests that are not supported yetapp/test/test_acl.c app/test/test_bpf.c app/test/test_cryptodev.c +60 more+858 -882 replies
10/11app/test: replace .sh script with .py scriptapp/test/has-hugepage.sh app/test/has_hugepage.py app/test/meson.build+27 -123 replies
11/11app/test: enable unit test on Windowsapp/test/meson.build+38 -380 replies

Reviews trailers per patch

All 11 patches have a Reviewed-by or Acked-by.

PatchDmitry KozlyukTyler RetzlaffPallavi KadamBruce Richardson
SeriesT-b
1/11A-b
2/11A-b
3/11A-b
4/11A-b
5/11A-b
6/11A-b
7/11A-b
8/11A-b
9/11A-b
10/11A-b
11/11A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v15 thread

Cover letter [PATCH v15 00/11] app/test: enable subset of tests on Windows

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.

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
Signature · 1 line
2.34.1.windows.1