Repository navigation
Record test/ruby whole on both executions (VM_ONLY 2, VM_FILE 0) - #287
Merged
Merged
Conversation
167 files, 179 minutes: VM_ONLY 2, EVAL_ONLY 1, VM_FILE 0. The two: an undef_method in an IO's singleton class (IO's own methods are not where reflection looks, on both executions) and a memory-leak test at its time limit (a def inside a block takes twice as long on the VM). #243's ten VM items: four pass, six remain the same on both.
284km
commented
Nov 25, 2026
284km
left a comment
Owner
Author
There was a problem hiding this comment.
Reviewed dd68ad5 (one loop note, no code). It records the full test/ruby comparison on main d586947: 167 files, 9,814 tests, MATCH 8,821 (evaluator) / 8,819 (VM), VM_ONLY 2, EVAL_ONLY 1, VM_FILE 0, with a cause for each of the three and the status of #243's ten VM items (four now pass; the remaining six are the same on both executions). No local paths or personal data. git merge-tree against main: clean. No mere-pr-review-watch inline comments. Merging.
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.
The first comparison of all of test/ruby on the evaluator and on the ISeq VM (MERE_RUBY_VM=1) since the comparison became a script (
unittest/vm_compare.sh, #265). The last by hand was on 2026-11-17 (note 552, section 15).The run
sh unittest/vm_compare.sh <ruby 4.0.10 source> rubyon main d586947 (#279), built with Mere 9dec2ff6, against ruby 4.0.10, on a shared machine (other sessions' corpus runs beside it).Compared test by test: VM_ONLY 2, EVAL_ONLY 1, VM_FILE 0. No file the evaluator completes is left incomplete by the VM. The first pass had VM_ONLY 4; two (
TestArraySubclass#test_shared_marking,TestSetTraceFunc#test_tracepoints_not_disabled_by_ractor_gc) did not differ the second time.The two that fail on the VM alone
TestIO#test_marshal_closed_io. The test undefinesclosed?in an IO's singleton class. On the VM,undef_method :closed?there raises NameError, "undefined method 'closed?'". The evaluator takes the same statement insideclass << r, where its class-body walker reads it, and refuses it as the VM does when it is called (r.singleton_class.send(:undef_method, :closed?), or:close_writein a second IO's singleton). The check asks whether the name is defined in the class or its ancestors, and IO's own methods are not where it looks:m_builtin_lists.mere), and the prelude defines most of them on File;IO.instance_methods(false)lacks 59 of ruby's (closed?,read,write,close_write, ...) and names 126 internal ones (__fd_*and others), andFile.instance_methods(false)names 42 that are IO's in ruby;r.singleton_class.method_defined?(:closed?)is false, where ruby's is true.A defect of reflection on IO on both executions, which the VM shows in one more place. Recorded, for a round of its own: the fix is where IO's methods are defined, not the VM.
TestModule#test_complemented_method_entry_memory_leakstops at its time limit on the VM. It makes a class, a module refining it and a class using the refinement, 300,000 times. The VM runs it (no fallback), at about twice the evaluator's time: 10,000 rounds take 0.18 s on the evaluator, 0.33 s on the VM. The difference is adefinside a block: 20,000Class.new { def foo; end }take 0.041 s on the evaluator and 0.086 s on the VM, whereClass.new { }takes 0.05 s on each. Recorded, as the VM's speed.TestParse#test_method_location_in_rescuefails on the evaluator alone, as in the 22 files' comparison of #265.#243's ten VM items
test_stat,test_stat_unknowntest_darwin_invalid_access,test_darwin_invalid_calltest_darwin_segv_in_syscalltest_invalid_source_no_memory_leak,test_loading_kwargs_memory_leaktest_iseq_builtin_to_atest_relative_stack_sizes,test_vm_stack_sizeSix remain, each the same on both executions.
For CI's job unittest-vm
It runs the 22 files of
unittest/vm_compare_files.txt. All of test/ruby took 152 minutes for the two first passes here, at a load of 5 or more: inside the job's 330 minutes, with the reruns. Whether the job takes all of test/ruby is the owner's decision.A record only: no code changes.
🤖 Generated with Claude Code