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

Use abs path to testing binary #2344

Merged
merged 2 commits into from
Jan 9, 2025
Merged

Conversation

helsaawy
Copy link
Contributor

Use the full path to the functional.test.exe binary when sharing into the uVM for the TestHVSock_* test cases in
test\functional\hvsock_test.go to prevent vSMB share issues.

Otherwise, os.Args[0] will return the path that the tests were run with (e.g., .\functional.test.exe), which can cause vSMB to fail with The parameter is incorrect. (likely because it cannot find the current file).

@helsaawy helsaawy added the tests Pull requests that modify tests label Dec 17, 2024
@helsaawy helsaawy requested a review from a team as a code owner December 17, 2024 15:39
@helsaawy helsaawy marked this pull request as draft December 17, 2024 18:13
Use the full path to the `functional.test.exe` binary when sharing into
the uVM or container for the `TestHVSock_*` test cases in
`test\functional\hvsock_test.go` to prevent vSMB share issues.

Otherwise, `os.Args[0]` will return the path that the tests were run
with (e.g., `.\functional.test.exe`), which can cause vSMB to fail with
`The parameter is incorrect.` (likely because it cannot find the current
file).

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
@helsaawy helsaawy marked this pull request as ready for review December 18, 2024 15:47
Copy link
Contributor

@jiechen0826 jiechen0826 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just one nit comment.

test/internal/util/reexec_windows.go Outdated Show resolved Hide resolved
// reExecSelfShareUVM shares the current testing binary directly into the specified uVM,
//
// This assumes that binary will be run directly on a uVM, and not from within a container.
// For the later case, see [reExecSelfCmd].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

later

nit: typo

@yyatmsft
Copy link
Contributor

yyatmsft commented Jan 9, 2025

LGTM.

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
@helsaawy helsaawy merged commit 36c1161 into microsoft:main Jan 9, 2025
19 checks passed
@helsaawy helsaawy deleted the func-test-abs branch January 9, 2025 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Pull requests that modify tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants