Repository navigation
shader: decode the RDNA 2 scanner's CLI output as UTF-8 - #845
Merged
Merged
Conversation
test_cli_scanner ran the scanner with text=True, so the parent decoded in the locale encoding. With PYTHONIOENCODING=utf-8 on a non-UTF-8 code page the scanner prints its block progress bar as UTF-8 and the decode failed, leaving stdout None. Run the scanner with PYTHONIOENCODING=utf-8 and decode as UTF-8, and require the block character so the test always covers that output. Fixes R0Y00#844 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Change
test_cli_scannerrunstools/scan_unsupported_shaders.pywithPYTHONIOENCODING=utf-8and decodes its output as UTF-8, instead oftext=Truein the locale encoding. WithPYTHONIOENCODING=utf-8on a non-UTF-8 Windows code page, the scanner printed its block progress bar as UTF-8 and the test failed to decode it (stdoutwasNone). The test now also requires\N{FULL BLOCK}, so it always covers that output. Test-only; the scanner is unchanged. Fixes #844.#704 and #531 also edit
tests/rdna2_tools_check.py, but nottest_cli_scanner.Verification
Commit
68d849aon Windows 10 22H2 (build 19045, ANSI code page 1250), Python 3.13.7.b358dc1)PYTHONIOENCODINGunsetPYTHONIOENCODING=utf-8FAILED (errors=1)PYTHONIOENCODING=utf-8:surrogateescapeFAILED (errors=1)PYTHONIOENCODING=cp1252PYTHONUTF8=1100% passed, both with
PYTHONIOENCODING=utf-8:surrogateescapeand with it unset. The whole file runs 72 tests:OK (skipped=1)both ways; the skip istest_llvm_comparison(LLVM_LIBnot set). Not run: Linux or macOS. There the locale is usually UTF-8 already, and the test now sets the child's encoding itself.Evidence and follow-up
Synthetic assembly input already in the test; no new fixture. Negative control: the base fails both UTF-8 rows above. The other
text=Truecalls in the file rundisasm_rdna2.pyandextract_shaders.py, which print only ASCII, so they are unchanged.Checklist
AI-assisted: prepared with Claude Code; the commands and results above were run on the author's PC.
🤖 Generated with Claude Code