[pypy-commit] pypy faster-rstruct-2: fix the tests in jit/backend/x86/test/test_llop.py:test_gc_store*
antocuni
pypy.commits at gmail.com
Sun May 14 19:05:09 EDT 2017
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: faster-rstruct-2
Changeset: r91287:e18391926354
Date: 2017-05-15 00:15 +0200
http://bitbucket.org/pypy/pypy/changeset/e18391926354/
Log: fix the tests in jit/backend/x86/test/test_llop.py:test_gc_store*
diff --git a/rpython/jit/backend/x86/test/test_llop.py b/rpython/jit/backend/x86/test/test_llop.py
--- a/rpython/jit/backend/x86/test/test_llop.py
+++ b/rpython/jit/backend/x86/test/test_llop.py
@@ -5,5 +5,10 @@
class TestLLOp(Jit386Mixin, _TestLLOp):
# for the individual tests see
# ====> ../../../metainterp/test/test_llop.py
- pass
+ # do NOT test the blackhole implementation of gc_store_indexed. It cannot
+ # work inside tests because llmodel.py:bh_gc_store_indexed_* receive a
+ # symbolic as the offset. It is not a problem because it is tested anyway
+ # by the same test in test_metainterp.py
+ TEST_BLACKHOLE = False
+
diff --git a/rpython/jit/metainterp/test/test_llop.py b/rpython/jit/metainterp/test/test_llop.py
--- a/rpython/jit/metainterp/test/test_llop.py
+++ b/rpython/jit/metainterp/test/test_llop.py
@@ -13,6 +13,7 @@
# for the individual tests see
# ====> ../../../rtyper/test/test_llop.py
+ TEST_BLACKHOLE = True
def gc_load_from_string(self, TYPE, buf, offset):
def f(offset):
@@ -38,11 +39,16 @@
# I'm not sure why, but if I use an assert, the test doesn't fail
raise ValueError('got != expected')
return len(got)
- # we pass a big inline_threshold to ensure that newlist_and_gc_store
- # is inlined, else the blackhole does not see (and thus we do not
- # test!) the llop.gc_store_indexed
+ #
+ if self.TEST_BLACKHOLE:
+ # we pass a big inline_threshold to ensure that
+ # newlist_and_gc_store is inlined, else the blackhole does not see
+ # (and thus we do not test!) the llop.gc_store_indexed
+ threshold = 33
+ else:
+ threshold = 0
return self.interp_operations(f, [value], supports_singlefloats=True,
- backendopt_inline_threshold=33)
+ backendopt_inline_threshold=threshold)
def test_force_virtual_str_storage(self):
More information about the pypy-commit
mailing list