-
Notifications
You must be signed in to change notification settings - Fork 767
windows: testutils changes #1666
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
Conversation
69ef4f1
to
115bad7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of nits and questions, otherwise LGTM.
Can you refresh my memory on if we already have a guide to test windows changes as a Linux user? I would be intrigued to follow it once I find some cycles in the next couple of weeks.
return nil | ||
} | ||
|
||
wpr := exec.Command("wpr.exe", "-stop", file, "-instancename", ts.session) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the wpr.exe executable available by default on windows systems? There is at least one other shell-out in this PR, the same question applies there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question, I think wpr.exe
does ship with Windows:
PS C:\Users\lorenz> (get-command wpr.exe).Path
C:\Windows\system32\wpr.exe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wpr.exe does come out of the box: https://learn.microsoft.com/en-us/windows-hardware/test/wpt/introduction-to-wpr#wpr-command-line-and-user-interface
WPR.exe ships with Windows OS (Windows 8.1 or later) and you do not need additional installation.
Netsh seems to be the ip
equivalent: https://learn.microsoft.com/en-us/windows-server/networking/technologies/netsh/netsh
PS C:\Users\lorenz> (get-command netsh.exe).Path
C:\Windows\system32\netsh.exe
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 <lmb@isovalent.com>
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 <lmb@isovalent.com>
Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
115bad7
to
f00d38b
Compare
I have one written up on a local branch, but I don't want to merge it before I'm ready to pronounce basic Windows support to be there. |
internal: add IsWindows constant
internal/fdtrace: rename to testmain and add windows trace logging
internal/testutils: make feature test helpers platform agnostic