Skip to content

Commit 061e1a5

Browse files
committed
ZJIT: Skip tests that write to locals in eval for --zjit-disable-hir-opt
I had a go trying to fix these at <ruby#17417>, but the full fix is quite involved. Let's skip for now since filtering local reloads fixes correctness issues with inlining in the default configuration.
1 parent d828390 commit 061e1a5

7 files changed

Lines changed: 21 additions & 2 deletions

File tree

.github/workflows/zjit-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
env:
5959
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
6060
RUN_OPTS: ${{ matrix.run_opts }}
61-
SPECOPTS: ${{ matrix.specopts }}
61+
SPECOPTS: ${{ matrix.specopts }} -B../src/spec/zjit.mspec
6262
TESTOPTS: ${{ matrix.testopts }}
6363
RUST_BACKTRACE: 1
6464
ZJIT_RB_BUG: 1

.github/workflows/zjit-ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
100100
RUN_OPTS: ${{ matrix.run_opts }}
101101
YJIT_BENCH_OPTS: ${{ matrix.yjit_bench_opts }}
102-
SPECOPTS: ${{ matrix.specopts }}
102+
SPECOPTS: ${{ matrix.specopts }} -B../src/spec/zjit.mspec
103103
TESTOPTS: ${{ matrix.testopts }}
104104
RUBY_DEBUG: ci
105105
BUNDLE_JOBS: 8 # for yjit-bench

spec/zjit.mspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Fails with --zjit-disable-hir-opt. See https://github.com/Shopify/ruby/issues/970
2+
MSpec.register(:exclude, "Kernel#eval updates a local in a scope above a surrounding block scope")
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# See <https://github.com/Shopify/ruby/issues/970>.
2+
# This tests fail with --zjit-disable-hir-opt
3+
exclude(:test_required_keyword_with_newline, 'local assignment within eval')

test/.excludes-zjit/TestParse.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# See <https://github.com/Shopify/ruby/issues/970>.
2+
# These tests fail with --zjit-disable-hir-opt
3+
exclude(:test_utf8_bom, 'local assignment within eval')
4+
exclude(:test_pow_asgn, 'local assignment within eval')
5+
exclude(:test_backquote, 'local assignment within eval')
6+
exclude(:test_dot_in_next_line, 'local assignment within eval')
7+
exclude(:test_here_document, 'local assignment within eval')
8+
exclude(:test_magic_comment, 'local assignment within eval')

test/.excludes-zjit/TestString.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# See <https://github.com/Shopify/ruby/issues/970>.
2+
# This tests fail with --zjit-disable-hir-opt
3+
exclude(:test_unknown_string_option, 'local assignment within eval')

test/.excludes-zjit/TestString2.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# See <https://github.com/Shopify/ruby/issues/970>.
2+
# This tests fail with --zjit-disable-hir-opt
3+
exclude(:test_unknown_string_option, 'local assignment within eval')

0 commit comments

Comments
 (0)