Author: Armin Rigo <[email protected]>
Branch:
Changeset: r98:30dd165d9c04
Date: 2013-06-12 11:47 +0200
http://bitbucket.org/pypy/stmgc/changeset/30dd165d9c04/
Log: Fixes in test
diff --git a/c4/test/support.py b/c4/test/support.py
--- a/c4/test/support.py
+++ b/c4/test/support.py
@@ -465,11 +465,9 @@
def minor_collect():
lib.stmgc_minor_collect()
-STUB_TID = GCFLAG_STUB | GCFLAG_OLD | 0 # no user tid
-
def is_stub(p):
assert lib.stm_dbgmem_is_active(p, 1) != 0
- return p.h_tid == STUB_TID
+ return p.h_tid & GCFLAG_STUB
def check_not_free(p):
assert lib.stm_dbgmem_is_active(p, 1) == 1
diff --git a/c4/test/test_et.py b/c4/test/test_et.py
--- a/c4/test/test_et.py
+++ b/c4/test/test_et.py
@@ -321,3 +321,6 @@
def test_abort_stealing_while_modifying():
test_stealing_while_modifying(aborting=True)
+
+def test_stub_for_refs_from_stolen():
+ xxx
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
@@ -83,10 +83,11 @@
def check(self, p):
assert isinstance(p, Pair)
- if p != emptypair and not is_stub(p.ptr):
+ if p != emptypair:
self.check_not_free(p.ptr)
- pid = lib.rawgetptr(p.ptr, 2)
- assert pid == p.obj.identity
+ if not is_stub(p.ptr):
+ pid = lib.rawgetptr(p.ptr, 2)
+ assert pid == p.obj.identity
def expected_abort(self, manual=False):
if manual:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit