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

[test] Log to ETW for benchmarks; retry layer removal #1947

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

helsaawy
Copy link
Contributor

Write logs to ETW instead of stdout when running benchmarks to mimic actual deployments.
Add log level to Run-Test.ps1 helper script.

Add RemoveAll function that wraps and retries os.RemoveAll (waiting in between attempts) since the OS may take a while to remove locks on a directory after handles are closed.

Bug: defer uVM cleanup after creation (not start) during tests.

Write logs to ETW instead of stdout when running benchmarks to mimic
actual deployments.
Add log level to `Run-Test.ps1` helper script.

Add `RemoveAll` function that wraps and retries `os.RemoveAll` (waiting
in between attempts) since the OS may take a while to remove locks on a
directory after handles are closed.

Bug: defer uVM cleanup after creation (not start) during tests.

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
@helsaawy helsaawy requested a review from a team as a code owner October 24, 2023 19:55
tb.Cleanup(func() { cleanup(ctx) })
Start(ctx, tb, vm)
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the issue here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if Start fails, it wont get to the cleanup call afterwards, so the uVM wont be closed and removed
its not a big issue, but still notcorrect

@helsaawy helsaawy merged commit a32b15f into microsoft:main Oct 25, 2023
15 of 16 checks passed
@helsaawy helsaawy deleted the bench-info-test branch October 25, 2023 15:07
darracott pushed a commit to KenGordon/hcsshim that referenced this pull request Oct 30, 2023
Write logs to ETW instead of stdout when running benchmarks to mimic
actual deployments.
Add log level to `Run-Test.ps1` helper script.

Add `RemoveAll` function that wraps and retries `os.RemoveAll` (waiting
in between attempts) since the OS may take a while to remove locks on a
directory after handles are closed.

Bug: defer uVM cleanup after creation (not start) during tests.

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
Signed-off-by: Joe Powell <joepowell@microsoft.com>
princepereira pushed a commit to princepereira/hcsshim that referenced this pull request Aug 29, 2024
Write logs to ETW instead of stdout when running benchmarks to mimic
actual deployments.
Add log level to `Run-Test.ps1` helper script.

Add `RemoveAll` function that wraps and retries `os.RemoveAll` (waiting
in between attempts) since the OS may take a while to remove locks on a
directory after handles are closed.

Bug: defer uVM cleanup after creation (not start) during tests.

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
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.

3 participants