Skip to content

[Macros] Set binary I/O mode in MockPlugin in Windows#88409

Open
rintaro wants to merge 1 commit intoswiftlang:mainfrom
rintaro:macros-mockplugin-win-binaryio
Open

[Macros] Set binary I/O mode in MockPlugin in Windows#88409
rintaro wants to merge 1 commit intoswiftlang:mainfrom
rintaro:macros-mockplugin-win-binaryio

Conversation

@rintaro
Copy link
Copy Markdown
Member

@rintaro rintaro commented Apr 10, 2026

Explanation: In Windows, stdin/stdout is "text" mode by default, where 0x1A is considered EOF. libMockPlugin didn't set them to "binary" mode, so when a binary macro plugin message happens to contains it, the plugin exits silently and and the test fails. Set stdin/stdout "binary" mode instead.
Scope: Macro plugin testing
Risk: Low. libMockPlugin is a macro plugin testing tool and it only affects test cases.
Issue: rdar://174235365
Testing: Passes current test cases, and a known issue-reproducing case.
Reviewer: @hamishknight @compnerd

@rintaro rintaro requested a review from a team as a code owner April 10, 2026 08:34
@rintaro
Copy link
Copy Markdown
Member Author

rintaro commented Apr 10, 2026

@swift-ci Please smoke test

@rintaro
Copy link
Copy Markdown
Member Author

rintaro commented Apr 10, 2026

@swift-ci Please test

Copy link
Copy Markdown
Contributor

@hamishknight hamishknight left a comment

Choose a reason for hiding this comment

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

Thank you!

In Windows, stdin/stdout is "text" mode by default, but macro plugin
message is binary data.

rdar://174235365
@rintaro rintaro force-pushed the macros-mockplugin-win-binaryio branch from 4d3dd41 to 90866ee Compare April 10, 2026 11:26
@rintaro
Copy link
Copy Markdown
Member Author

rintaro commented Apr 10, 2026

@swift-ci Please smoke test

@hamishknight
Copy link
Copy Markdown
Contributor

@swift-ci please smoke test macOS

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