[pypy-commit] pypy default: kill a test that was skipped anyway
fijal
noreply at buildbot.pypy.org
Wed Oct 16 14:09:32 CEST 2013
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch:
Changeset: r67415:c8e69f7a4469
Date: 2013-10-16 14:01 +0200
http://bitbucket.org/pypy/pypy/changeset/c8e69f7a4469/
Log: kill a test that was skipped anyway
diff --git a/rpython/memory/gc/test/test_direct.py b/rpython/memory/gc/test/test_direct.py
--- a/rpython/memory/gc/test/test_direct.py
+++ b/rpython/memory/gc/test/test_direct.py
@@ -649,89 +649,5 @@
newobj1 = oldobj.next
assert newobj1.x == 1337
- # Test trying to be a bit comprehensive about
- # states and types of objects
- def test_allocate_states(self):
- py.test.skip("broken test for now")
- from rpython.memory.gc import incminimark
- largeobj_size = self.gc.nonlarge_max + 1
-
- assert self.gc.gc_state == incminimark.STATE_SCANNING
- assert self.gc.get_total_memory_used() == 0
-
- for i in range(5):
- curobj = self.malloc(S)
- curobj.x = i
- self.stackroots.append(curobj)
- assert self.gc.is_in_nursery(llmemory.cast_ptr_to_adr(curobj))
-
- for i in range(5):
- curobj = self.malloc(VAR, largeobj_size)
- self.stackroots.append(curobj)
- assert not self.gc.is_in_nursery(llmemory.cast_ptr_to_adr(curobj))
-
- assert self.gc.gc_state == incminimark.STATE_SCANNING
-
- self.gc.debug_gc_step() # this reads self.stackroots
- reachableroot = self.stackroots[4]
-
- nallocated = {}
-
- reachable = []
- unreachable = []
-
- while True:
-
- if self.gc.gc_state not in nallocated:
- nallocated[self.gc.gc_state] = 0
-
- if nallocated[self.gc.gc_state] < 1:
- unreachableobj = self.malloc(S)
- reachableobj = self.malloc(S)
- assert self.gc.is_in_nursery(llmemory.cast_ptr_to_adr(reachableobj))
- reachableviayoungobj = self.malloc(S)
- self.write(reachableobj,'next',reachableviayoungobj)
- unreachableobj.x = 150
- reachableobj.x = 150
- reachableviayoungobj.x = 150
-
- self.write(reachableroot,'next',reachableobj)
- reachableroot = reachableobj
-
- unreachable.append(unreachableobj)
- reachable.append(reachableobj)
- reachable.append(reachableviayoungobj)
-
- nallocated[self.gc.gc_state] += 1
-
- if self.gc.gc_state == incminimark.STATE_SCANNING:
- pass
- elif self.gc.gc_state == incminimark.STATE_MARKING:
- pass
- elif self.gc.gc_state == incminimark.STATE_SWEEPING_RAWMALLOC:
- pass
- elif self.gc.gc_state == incminimark.STATE_SWEEPING_ARENA:
- pass
- elif self.gc.gc_state == incminimark.STATE_FINALIZING:
- # ASSUMPTION finalizing is atomic
- #
- #complete collection
- self.gc.debug_gc_step()
- assert self.gc.gc_state == incminimark.STATE_SCANNING
- break
- else:
- raise Exception("unreachable")
-
- self.gc.debug_gc_step()
-
- #complete the next collection cycle
- self.gc.debug_gc_step_until(incminimark.STATE_SCANNING)
-
- for obj in reachable:
- assert obj.x == 150
-
- for obj in unreachable:
- assert py.test.raises(RuntimeError,"obj.x")
-
class TestIncrementalMiniMarkGCFull(DirectGCTest):
from rpython.memory.gc.incminimark import IncrementalMiniMarkGC as GCClass
More information about the pypy-commit
mailing list