[pypy-commit] stmgc default: Next test

arigo noreply at buildbot.pypy.org
Wed Jun 5 16:59:17 CEST 2013


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r67:baa39610ff9b
Date: 2013-06-05 16:47 +0200
http://bitbucket.org/pypy/stmgc/changeset/baa39610ff9b/

Log:	Next test

diff --git a/c3/doc-objects.txt b/c3/doc-objects.txt
--- a/c3/doc-objects.txt
+++ b/c3/doc-objects.txt
@@ -50,7 +50,7 @@
 - original obj after GC killed the backup                 GT
 
 Public objects:
-- prebuilt object, never modified                         -1
+- prebuilt object, never modified                          1
 - other public object, never modified                     GT
 - outdated, has a protected copy              HANDLE to prot/priv copy
 - outdated, target stolen              ptr to a more recent public copy
diff --git a/c3/test/support.py b/c3/test/support.py
--- a/c3/test/support.py
+++ b/c3/test/support.py
@@ -436,6 +436,7 @@
 def palloc(size):
     "Get a ``prebuilt'' object."
     p = lib.pseudoprebuilt(size, 42 + size)
+    assert p.h_revision == 1
     return p
 
 def palloc_refs(nrefs):
diff --git a/c3/test/test_et.py b/c3/test/test_et.py
--- a/c3/test/test_et.py
+++ b/c3/test/test_et.py
@@ -105,3 +105,12 @@
     assert pback == lib.stm_get_backup_copy(p)
     assert lib.rawgetlong(p, 0) == 43891
     assert lib.rawgetlong(pback, 0) == 927122
+
+def test_prebuilt_is_public():
+    p = palloc(HDR)
+    assert p.h_revision == 1
+    assert p.h_tid == lib.gettid(p) | (GCFLAG_OLD |
+                                       GCFLAG_VISITED |
+                                       GCFLAG_PUBLIC |
+                                       GCFLAG_PREBUILT_ORIGINAL)
+    assert classify(p) == "public"


More information about the pypy-commit mailing list