test: parameterize Phase 2 closure tests cross-engine (PR4 of 5)#393
Merged
Conversation
Refactor regression_inline_lambda.rs from a hard-coded --run-tree runner into a cross-engine harness. The new run_all helper iterates over tree, VM, and Cranelift; tests that depend on srt/grp/uniqby closure dispatch (still tree-bridged on VM/Cranelift until PR3c #391 lands) call run_tree_only with a TODO marker. Tests using map/flt/fld closures - 13 of 21 - flip directly to cross-engine. The remaining 8 srt cases keep tree-only coverage with a comment pointing at #391 as the unblock. All 21 tests still pass under cargo test --release --features cranelift.
❌ 4 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
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.
Summary
Phase 2 PR4 of 5. After #384 (VM closure support), #385 (Cranelift closure parity), and #387 (HOF native closure dispatch) all merged, the existing inline-lambda regression suite still ran exclusively on the tree walker. This PR parameterises the suite over tree, VM, and Cranelift so VM and JIT regressions get caught at the same surface the tree walker does.
No production code changes. Test infrastructure only.
What's in the diff
Commit 1 -
test: parameterize inline lambda regression suite over enginestests/regression_inline_lambda.rs: splitrun_okinto arun_engineprimitive plus two callers,run_all(default, iterates tree + VM + Cranelift) andrun_tree_only(escape hatch with required justification).run_all(map / flt / fld and grouped-expression / no-regression coverage).srtclosure dispatch stay tree-only with aTODO PR3c follow-upcomment pointing at feature: srt/grp/uniqby off tree-bridge (Phase 2 PR3c) #391 as the unblock. PR3c is in flight; once it lands the flip is a one-line swap.Commit 2 -
test: generalize closure capture coverage to all enginestests/coverage_vm_mod.rs: the twoclosure_capture_*_treetests were tree-only relics from the pre-feature: VM closure support (Phase 2 PR1) #384 era. Generalised toENGINES_ALL, dropped the_treesuffix.Examples skip cleanup
Grep of
examples/engine-skip:shows 12 hits. None of them are stale relative to this PR:closure-bind.ilo,uniqby.ilo,srt-by-key.ilo,grp-basics.ilo,sort-by-key.ilo- all gated on srt/grp/uniqby tree-bridge, waiting on feature: srt/grp/uniqby off tree-bridge (Phase 2 PR3c) #391.match-in-loop.ilo,list-ops.ilo,strings.ilo,data.ilo,builtins-as-hof.ilo- unrelated to closure capture.No examples were edited in this PR. Once #391 merges, a follow-up sweep can drop the relevant skips.
Test plan
cargo test --release --features cranelift --test regression_inline_lambda- 21 / 21 passcargo test --release --features cranelift --test coverage_vm_mod- all pass including the 2 generalised closure testscargo test --release --features craneliftfull suite - all greencargo fmt --checkcargo clippy --release --features cranelift --tests -- -D warningsFollow-ups
run_tree_onlycalls inregression_inline_lambda.rstorun_alland drop the TODO comments.closure-bind.ilo/srt-by-key.ilo/uniqby.ilo/grp-basics.ilo/sort-by-key.ilodrop theirengine-skiplines.