[pypy-commit] stmgc default: merge
Raemi
noreply at buildbot.pypy.org
Mon Jun 24 15:01:26 CEST 2013
Author: Remi Meier <meierrem at student.ethz.ch>
Branch:
Changeset: r259:076863fce4d4
Date: 2013-06-24 15:01 +0200
http://bitbucket.org/pypy/stmgc/changeset/076863fce4d4/
Log: merge
diff --git a/c4/test/test_gcpage.py b/c4/test/test_gcpage.py
--- a/c4/test/test_gcpage.py
+++ b/c4/test/test_gcpage.py
@@ -383,3 +383,33 @@
p1 = lib.stm_pop_root()
check_not_free(p1)
check_not_free(lib.getptr(p1, 0))
+
+def test_prebuilt_modified_during_transaction():
+ p1 = palloc(HDR)
+ p2 = nalloc_refs(1)
+ lib.setptr(p2, 0, p1)
+ lib.stm_push_root(p2)
+ major_collect()
+ major_collect()
+ p1b = lib.stm_write_barrier(p1)
+ assert p1b != p1
+ major_collect()
+ lib.stm_pop_root()
+ p1b = lib.stm_read_barrier(p1)
+ check_not_free(p1b)
+
+def test_prebuilt_modified_later():
+ p1 = palloc(HDR)
+ p2 = nalloc_refs(1)
+ lib.setptr(p2, 0, p1)
+ lib.stm_push_root(p2)
+ major_collect()
+ major_collect()
+ p1b = lib.stm_write_barrier(p1)
+ assert p1b != p1
+ lib.stm_commit_transaction()
+ lib.stm_begin_inevitable_transaction()
+ major_collect()
+ lib.stm_pop_root()
+ p1b = lib.stm_read_barrier(p1)
+ check_not_free(p1b)
diff --git a/c4/test/test_random.py b/c4/test/test_random.py
--- a/c4/test/test_random.py
+++ b/c4/test/test_random.py
@@ -522,4 +522,4 @@
def test_more_multi_thread():
#py.test.skip("more random tests")
for i in range(200):
- yield test_multi_thread, 1690 + i
+ yield test_multi_thread, 1751 + i
More information about the pypy-commit
mailing list