[pypy-commit] stmgc c8-new-page-handling: pass test_basic again, yay

Raemi noreply at buildbot.pypy.org
Fri Sep 19 14:34:54 CEST 2014


Author: Remi Meier <remi.meier at inf.ethz.ch>
Branch: c8-new-page-handling
Changeset: r1402:172d904d4d30
Date: 2014-09-19 14:35 +0200
http://bitbucket.org/pypy/stmgc/changeset/172d904d4d30/

Log:	pass test_basic again, yay

diff --git a/c8/test/support.py b/c8/test/support.py
--- a/c8/test/support.py
+++ b/c8/test/support.py
@@ -551,11 +551,20 @@
         self.push_root(ffi.cast("object_t *", 8))
 
     def check_char_everywhere(self, obj, expected_content, offset=HDR):
-        for i in range(len(self.tls)):
+        for i in range(self.NB_THREADS):
+            if self.current_thread != i:
+                self.switch(i)
+            tl = self.tls[i]
+            if not lib._stm_in_transaction(tl):
+                self.start_transaction()
+
+            # check:
             addr = lib._stm_get_segment_base(i)
             content = addr[int(ffi.cast("uintptr_t", obj)) + offset]
             assert content == expected_content
 
+            self.abort_transaction()
+
     def get_thread_local_obj(self):
         tl = self.tls[self.current_thread]
         return tl.thread_local_obj


More information about the pypy-commit mailing list