Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows: testutils changes #1666

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

windows: testutils changes #1666

wants to merge 3 commits into from

Conversation

lmb
Copy link
Collaborator

@lmb lmb commented Feb 4, 2025

internal: add IsWindows constant

Add an IsWindows constant and move the existing OnLinux constant to a new
internal package. This avoids a circular dependency between testutils.

Signed-off-by: Lorenz Bauer <[email protected]>

internal/fdtrace: rename to testmain and add windows trace logging

The eBPF for Windows runtime logs traces and error messages to the Windows
event subsystem. Being able to correlate test failures with this trace is
very useful to diagnose problems.

On Windows, start an event tracing session before starting the tests, and
dump a summary to stderr after tests have finished.

The summary looks roughly like this:

      base       _get_map_descriptor_properties returned success
     entry-exit _ebpf_core_protocol_map_delete_element
   ! base       _ebpf_core_protocol_map_delete_element returned error  
Error=19

The exclamation mark in the first column indicates an error.

Signed-off-by: Lorenz Bauer <[email protected]>

internal/testutils: make feature test helpers platform agnostic

Signed-off-by: Lorenz Bauer <[email protected]>

@lmb lmb force-pushed the windows-testutils branch from ec85db8 to 69ef4f1 Compare February 5, 2025 08:34
lmb added 3 commits February 5, 2025 09:39
Add an IsWindows constant and move the existing OnLinux constant to
a new internal package. This avoids a circular dependency between
testutils.

Signed-off-by: Lorenz Bauer <[email protected]>
The eBPF for Windows runtime logs traces and error messages to the
Windows event subsystem. Being able to correlate test failures with
this trace is very useful to diagnose problems.

On Windows, start an event tracing session before starting the tests,
and dump a summary to stderr after tests have finished.

The summary looks roughly like this:

      base       _get_map_descriptor_properties returned success
      entry-exit _ebpf_core_protocol_map_delete_element
    ! base       _ebpf_core_protocol_map_delete_element returned error   Error=19

The exclamation mark in the first column indicates an error.

Signed-off-by: Lorenz Bauer <[email protected]>
@lmb lmb force-pushed the windows-testutils branch from 69ef4f1 to 115bad7 Compare February 5, 2025 08:39
@lmb lmb marked this pull request as ready for review February 5, 2025 08:46
@lmb lmb requested review from florianl, mmat11, rgo3 and a team as code owners February 5, 2025 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant