[pypy-commit] pypy share-guard-info: fix some more tests

fijal noreply at buildbot.pypy.org
Wed Sep 23 20:23:49 CEST 2015


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: share-guard-info
Changeset: r79801:e46a6ebba4a3
Date: 2015-09-23 20:23 +0200
http://bitbucket.org/pypy/pypy/changeset/e46a6ebba4a3/

Log:	fix some more tests

diff --git a/rpython/jit/metainterp/test/test_rawmem.py b/rpython/jit/metainterp/test/test_rawmem.py
--- a/rpython/jit/metainterp/test/test_rawmem.py
+++ b/rpython/jit/metainterp/test/test_rawmem.py
@@ -30,7 +30,9 @@
             return 42
         res = self.interp_operations(f, [])
         assert res == 42
-        self.check_operations_history({'call': 2, 'guard_no_exception': 1,
+        self.check_operations_history({'call_i': 1,
+                                       'call_n': 1,
+                                       'guard_no_exception': 1,
                                        'finish': 1})
 
     def test_raw_storage_int(self):
@@ -42,8 +44,9 @@
             return res
         res = self.interp_operations(f, [])
         assert res == 24
-        self.check_operations_history({'call': 2, 'guard_no_exception': 1,
-                                       'raw_store': 1, 'raw_load': 1,
+        self.check_operations_history({'call_i': 1, 'guard_no_exception': 1,
+                                       'call_n': 1,
+                                       'raw_store': 1, 'raw_load_i': 1,
                                        'finish': 1})
         self.metainterp.staticdata.stats.check_resops({'finish': 1}, omit_finish=False)
 
@@ -56,8 +59,9 @@
             return res
         res = self.interp_operations(f, [])
         assert res == 2.4e15
-        self.check_operations_history({'call': 2, 'guard_no_exception': 1,
-                                       'raw_store': 1, 'raw_load': 1,
+        self.check_operations_history({'call_i': 1, 'guard_no_exception': 1,
+                                       'call_n': 1,
+                                       'raw_store': 1, 'raw_load_f': 1,
                                        'finish': 1})
         self.metainterp.staticdata.stats.check_resops({'finish': 1}, omit_finish=False)
 
@@ -70,8 +74,9 @@
             return rffi.cast(lltype.Signed, res)
         res = self.interp_operations(f, [])
         assert res == 254
-        self.check_operations_history({'call': 2, 'guard_no_exception': 1,
-                                       'raw_store': 1, 'raw_load': 1,
+        self.check_operations_history({'call_n': 1, 'guard_no_exception': 1,
+                                       'call_i': 1,
+                                       'raw_store': 1, 'raw_load_i': 1,
                                        'finish': 1})
         self.metainterp.staticdata.stats.check_resops({'finish': 1}, omit_finish=False)
 
@@ -84,8 +89,9 @@
             return res
         res = self.interp_operations(f, [])
         assert res == 24
-        self.check_operations_history({'call': 2, 'guard_no_exception': 1,
-                                       'raw_store': 1, 'raw_load': 1,
+        self.check_operations_history({'call_n': 1, 'guard_no_exception': 1,
+                                       'call_i': 1,
+                                       'raw_store': 1, 'raw_load_i': 1,
                                        'finish': 1})
         self.metainterp.staticdata.stats.check_resops({'finish': 1}, omit_finish=False)
 
diff --git a/rpython/jit/metainterp/test/test_recursive.py b/rpython/jit/metainterp/test/test_recursive.py
--- a/rpython/jit/metainterp/test/test_recursive.py
+++ b/rpython/jit/metainterp/test/test_recursive.py
@@ -28,7 +28,7 @@
                 return 1
         res = self.meta_interp(main, [20], enable_opts='')
         assert res == main(20)
-        self.check_history(call=0)
+        self.check_history(call_i=0)
 
     def test_simple_recursion_with_exc(self):
         myjitdriver = JitDriver(greens=[], reds=['n', 'm'])
@@ -592,7 +592,7 @@
                 i += 1
 
         self.meta_interp(portal, [2], inline=True)
-        self.check_history(call_assembler=1)
+        self.check_history(call_assembler_n=1)
 
     def test_recursion_cant_call_assembler_directly(self):
         driver = JitDriver(greens = ['codeno'], reds = ['i', 'j'],
@@ -709,7 +709,7 @@
             return k
 
         self.meta_interp(portal, [2], inline=True)
-        self.check_history(call_assembler=1)
+        self.check_history(call_assembler_i=1)
 
     def test_directly_call_assembler_raise(self):
 
@@ -735,7 +735,7 @@
                 raise MyException(1)
 
         self.meta_interp(portal, [2], inline=True)
-        self.check_history(call_assembler=1)
+        self.check_history(call_assembler_n=1)
 
     def test_directly_call_assembler_fail_guard(self):
         driver = JitDriver(greens = ['codeno'], reds = ['i', 'k'],
diff --git a/rpython/jit/metainterp/test/test_slist.py b/rpython/jit/metainterp/test/test_slist.py
--- a/rpython/jit/metainterp/test/test_slist.py
+++ b/rpython/jit/metainterp/test/test_slist.py
@@ -33,7 +33,7 @@
             return m
         res = self.interp_operations(f, [11], listops=True)
         assert res == 49
-        self.check_operations_history(call=3)
+        self.check_operations_history(call_i=1, call_n=2)
 
     def test_list_of_voids(self):
         myjitdriver = JitDriver(greens = [], reds = ['n', 'lst'])


More information about the pypy-commit mailing list