From eaa5095f2cd2f200b535609d679317bc183cf649 Mon Sep 17 00:00:00 2001 From: SillyProotSoda <103301261+ytsodacan@users.noreply.github.com> Date: Wed, 25 Nov 2026 15:30:59 +1100 Subject: [PATCH 1/3] Fix two repository checks that fail on main compute_heap_layout_census.py: set errors="replace" on stdout like the other tools. test_runner_calls_all_tests.py: list the new feature_scan test, which its runner already calls. --- tests/test_runner_calls_all_tests.py | 1 + tools/compute_heap_layout_census.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/tests/test_runner_calls_all_tests.py b/tests/test_runner_calls_all_tests.py index 4a0317f89d..b582c1e9ad 100644 --- a/tests/test_runner_calls_all_tests.py +++ b/tests/test_runner_calls_all_tests.py @@ -50,6 +50,7 @@ "test_a_failed_check_fails_only_its_own_test", "test_out_via_directory_alias_into_corpus_is_a_usage_error", "test_out_hard_link_to_carved_index_is_a_usage_error", + "test_out_named_like_the_optional_spirv_index", }, } diff --git a/tools/compute_heap_layout_census.py b/tools/compute_heap_layout_census.py index 1bc8967d83..bd34471815 100644 --- a/tools/compute_heap_layout_census.py +++ b/tools/compute_heap_layout_census.py @@ -152,6 +152,10 @@ def census(disasm, captured, per_program=False): if __name__ == "__main__": + try: # a redirected stdout is strict ANSI code page under -I; write '?' for what it cannot encode + sys.stdout.reconfigure(errors="replace") + except (AttributeError, ValueError, OSError): + pass parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("disasm", type=Path) parser.add_argument("--dispatch-log", action="append", default=[], type=Path) From 4b10cbe91edce03c1dd2becd57bc981e943a88ce Mon Sep 17 00:00:00 2001 From: SillyProotSoda <103301261+ytsodacan@users.noreply.github.com> Date: Thu, 26 Nov 2026 07:44:20 +1100 Subject: [PATCH 2/3] game_run_summary, stage_timeline: set errors="replace" on stdout --- tools/game_run_summary.py | 4 ++++ tools/stage_timeline.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/tools/game_run_summary.py b/tools/game_run_summary.py index 7dbec9c91b..796e4cba79 100644 --- a/tools/game_run_summary.py +++ b/tools/game_run_summary.py @@ -222,4 +222,8 @@ def main(argv=None) -> int: if __name__ == "__main__": + try: # a redirected stdout is strict ANSI code page under -I; write '?' for what it cannot encode + sys.stdout.reconfigure(errors="replace") + except (AttributeError, ValueError, OSError): + pass sys.exit(main()) diff --git a/tools/stage_timeline.py b/tools/stage_timeline.py index 9b37373f10..b54d81f8bc 100644 --- a/tools/stage_timeline.py +++ b/tools/stage_timeline.py @@ -97,4 +97,8 @@ def main(): if __name__ == "__main__": + try: # a redirected stdout is strict ANSI code page under -I; write '?' for what it cannot encode + sys.stdout.reconfigure(errors="replace") + except (AttributeError, ValueError, OSError): + pass sys.exit(main()) From d9bb374655c89a04f04544b05149166e31a9b598 Mon Sep 17 00:00:00 2001 From: Jan Trencansky Date: Wed, 25 Nov 2026 19:54:10 -0500 Subject: [PATCH 3/3] Fix the third red check, and guard the scripts that landed since (#1561 review) - test_tool_stdout_encoding: three scripts merged since this PR opened (check_compute_journal_overlay.py and compute_workers_win.py with #2098, corpus_watch.py with #817) get the same stdout guard as the tools here. - test_runtime_paths: the runtime workflow's two path filters now include tools/conformance/**, which runtime/CMakeLists.txt names. The change is #1673's (xel1uz), carried here since #1673 duplicates this PR. With it, test_tool_stdout_encoding, test_runner_calls_all_tests and test_runtime_paths all pass on main. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/runtime.yml | 2 ++ scripts/check_compute_journal_overlay.py | 5 +++++ scripts/compute_workers_win.py | 4 ++++ scripts/corpus_watch.py | 4 ++++ 4 files changed, 15 insertions(+) diff --git a/.github/workflows/runtime.yml b/.github/workflows/runtime.yml index 0f44ca7f3a..d7e6fd8a68 100644 --- a/.github/workflows/runtime.yml +++ b/.github/workflows/runtime.yml @@ -27,6 +27,7 @@ on: - "tools/cf_diff.py" - "tools/cf_ref.py" - "tools/cfg_structure.py" + - "tools/conformance/**" - "tools/cpu_ref.py" - "tools/f32_fuzz.py" - "tools/file_mode.py" @@ -78,6 +79,7 @@ on: - "tools/cf_diff.py" - "tools/cf_ref.py" - "tools/cfg_structure.py" + - "tools/conformance/**" - "tools/cpu_ref.py" - "tools/f32_fuzz.py" - "tools/file_mode.py" diff --git a/scripts/check_compute_journal_overlay.py b/scripts/check_compute_journal_overlay.py index c346436f9a..4ea23f84c0 100644 --- a/scripts/check_compute_journal_overlay.py +++ b/scripts/check_compute_journal_overlay.py @@ -11,6 +11,7 @@ import re import shutil import subprocess +import sys import tempfile import time @@ -95,6 +96,10 @@ def run(exe, root, device, strict): if __name__ == "__main__": + try: # a redirected stdout is strict ANSI code page under -I; write '?' for what it cannot encode + sys.stdout.reconfigure(errors="replace") + except (AttributeError, ValueError, OSError): + pass parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("executable", type=Path, help="built d3d12_compute_journal_test.exe") parser.add_argument("--device", help="optional LEONIDA_VK_DEVICE selector") diff --git a/scripts/compute_workers_win.py b/scripts/compute_workers_win.py index 04eab8adb3..1ab6915ca6 100644 --- a/scripts/compute_workers_win.py +++ b/scripts/compute_workers_win.py @@ -185,6 +185,10 @@ def child(): if __name__ == "__main__": + try: # a redirected stdout is strict ANSI code page under -I; write '?' for what it cannot encode + sys.stdout.reconfigure(errors="replace") + except (AttributeError, ValueError, OSError): + pass if sys.argv[1:] != ["--shard"]: raise SystemExit(2) child() diff --git a/scripts/corpus_watch.py b/scripts/corpus_watch.py index 8d12ea69f7..a09bf8ab9b 100644 --- a/scripts/corpus_watch.py +++ b/scripts/corpus_watch.py @@ -192,4 +192,8 @@ def run_once(): if __name__ == "__main__": + try: # a redirected stdout is strict ANSI code page under -I; write '?' for what it cannot encode + sys.stdout.reconfigure(errors="replace") + except (AttributeError, ValueError, OSError): + pass sys.exit(main())