Fix switch_stdout_to on Windows7#117386
Merged
bors merged 1 commit intorust-lang:masterfrom Nov 2, 2023
Merged
Conversation
Collaborator
|
(rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
a23678c to
eb2b545
Compare
This comment has been minimized.
This comment has been minimized.
The switch_stdout_to test was broken on Windows7, as the test infrastructure would refuse to delete the temporary test folder because the switch-stdout-output file we redirected the stdout to was still opened. To fix this issue, we make switch_stdout_to return the previous handle, and add a new switch_stdout_to call at the end of the test to return the stdio handles to their original state. The handle the second switch_stdout_to returns will be automatically closed, which should allow the temporary test folder to be deleted properly.
eb2b545 to
4971e99
Compare
Member
|
Looks good to me, thanks! @bors r+ rollup |
Collaborator
Collaborator
Collaborator
|
☀️ Test successful - checks-actions |
Collaborator
|
Finished benchmarking commit (46455dc): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 636.991s -> 639.997s (0.47%) |
bors-ferrocene bot
added a commit
to ferrocene/ferrocene
that referenced
this pull request
Nov 3, 2023
82: Automated pull from upstream `master` r=tshepang a=github-actions[bot] This PR pulls the following changes from the upstream repository: * rust-lang/rust#117313 * rust-lang/rust#117131 * rust-lang/rust#117134 * rust-lang/rust#117471 * rust-lang/rust#117521 * rust-lang/rust#117513 * rust-lang/rust#117512 * rust-lang/rust#117509 * rust-lang/rust#117495 * rust-lang/rust#117394 * rust-lang/rust#117466 * rust-lang/rust#117204 * rust-lang/rust#117386 * rust-lang/rust#117506 Co-authored-by: Nicholas Nethercote <n.nethercote@gmail.com> Co-authored-by: roblabla <unfiltered@roblab.la> Co-authored-by: Michael Goulet <michael@errs.io> Co-authored-by: massivebird <gdrakemail@gmail.com> Co-authored-by: bors <bors@rust-lang.org> Co-authored-by: Zalathar <Zalathar@users.noreply.github.com> Co-authored-by: lcnr <rust@lcnr.de> Co-authored-by: Joshua Liebow-Feeser <joshlf@users.noreply.github.com> Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
switch_stdout_totest was broken on Windows7, as deleting the temporary test folder would fail since theswitch-stdout-outputfile we redirected the stdout to is never closed, and it's impossible on Win7 to delete an opened file.To fix this issue, we make
switch_stdout_toreturn the previous handle. Using this, we add a newswitch_stdout_tocall at the end of the test to return the stdio handles to their original state, and recover the handle to the file we opened. This handle is automatically closed at the end of the function, which should allow the temporary test folder to be deleted properly.