Trees | Indices | Help |
|
---|
|
1 from rekall import addrspace 2 from rekall import testlib 3 from rekall import session 4 5 10 1113 """Test the RunBasedAddressSpace implementation.""" 14 185120 """Make sure session gets the correct cache.""" 21 with self.session: 22 self.session.SetParameter("cache", "memory") 23 24 # Set something in the session cache. 25 self.session.SetCache("a", "b") 26 27 # Make sure it is set. 28 self.assertEqual(self.session.GetParameter("a"), "b") 29 30 self.physical_AS.volatile = False 31 self.session.physical_address_space = self.physical_AS 32 33 # None volatile physical address space should use the user specified 34 # cache type. 35 self.assertEqual(self.session.cache.__class__.__name__, "Cache") 36 37 # Assigning the physical address space causes the cache to be 38 # purged. The cache is allowed to be purged at any time (it is only a 39 # cache). 40 self.assertEqual(self.session.GetParameter("a"), None) 41 42 # Volatile physical address space forces a TimedCache 43 self.physical_AS.volatile = True 44 self.session.physical_address_space = self.physical_AS 45 46 self.assertEqual(self.session.cache.__class__.__name__, "TimedCache") 47 48 # Any parameters set by the address space should be present in the 49 # session cache. 50 self.assertEqual(self.session.GetParameter("foo"), "bar")
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Oct 9 03:29:41 2017 | http://epydoc.sourceforge.net |