Repository navigation
tests: HLASM, C# and Perl timing checks use the CPU-clock helper (Part of #8423) - #8580
Merged
Merged
Conversation
…t of #8423) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
|
No description provided. |
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.
Part of #8423
Checklist: partial [c:e628cc47] -- 24 other listed offenders in
WALL_CLOCK_OFFENDERSstill use raw wall-clock differences (see Sibling gaps).What changed
The shared helper (
tests/_timing.py), the harness/linearity wiring (#8523) and the gate with its shrink-only list (#8548) are already on main. This PR converts four listed offenders and shrinks the list by four:test_hlasm_strict.py: the EPLOC ReDoS payload test usesassert_cpu_below(was a rawperf_counter() < 5).test_hlasm_macro_uses.py: the local_best_of_threebecomescpu_best_of; the macro-use ReDoS test usesassert_cpu_below.test_csharp_strict.py: the two< 5.0sweeps (func_start, Mode B slicer) useassert_cpu_below. Correctness asserts stay separate from the timing.test_perl_heredoc_imports_6572.py: the hand-copied doubling-ratio_best_ofis replaced bylinear_assert.assert_linear.test_no_raw_wall_clock_timing_8423.py: the four entries are removed fromWALL_CLOCK_OFFENDERS.Tests only; no engine change, so no golden bless.
Class
A test that asserts "this is fast" from a raw wall-clock difference, in two forms: absolute
< N sbounds, and hand-copied doubling-ratio helpers.Sibling gaps (not fixed here; none needs a burned-estate program)
test_go_raw_string_imports_6572.py,test_go_semicolon_imports_6572.py,test_elixir_{heredoc,sigil,string}_imports_6572.py. Each is anassert_linearswap.test_c_kernel_vocab_8016.py,test_calls_out_{haskell_juxtaposition,rust_matches_depth,rust_select_arms}_6454.py,tests/core_engine/test_*_probe_4108.py,test_dense_source_750{1,4}.py,test_prefetch.py,test_cics_macro_level.py,tests/cobol_mainframe/test_{pic_run_lengths,translator_pic_runs}_7169.py,tests/security_auditing/test_secrets_shunt_4987.py,test_tls_bypass_*_6239.py.test_redos_poison.pyusestime.monotonicfor a subprocess stall watchdog, not an assertion. It likely needs an allow-list reason rather than a conversion.Verification
test_no_raw_wall_clock_timing_8423.pyandtest_wall_clock_gate_detector_8423.py: 615 passed in about 10 s.ruff format --checkclean on all 5 files.python tests/ruff_audit.py --ci: no new findings beyond the baseline.test_csharp_strict.pywas already on main, so I left it.Lessons for agents
cat >with no heredoc hangs Bash on stdin: write scratch and PR-body files with the Write tool (already listed inpython-test-traps.md).🤖 Generated with Claude Code