Fix memdump tests broken by dev-events (#377)

* fix memdump tests broken by dev-events

* switch to superset check to account for timeout differences
This commit is contained in:
JP Smith
2017-07-12 18:11:08 -04:00
committed by GitHub
parent 45d5b9f6d2
commit 60fa4c2231
7 changed files with 13 additions and 144 deletions
+1 -1
View File
@@ -523,7 +523,7 @@ class Manticore(object):
state.platform.invoke_model(fmodel, prefix_args=(state.platform,))
self._model_hooks.setdefault(int(address,0), set()).add(cb_function)
def _model_hook_callback(self, state):
def _model_hook_callback(self, state, instruction):
pc = state.cpu.PC
if pc not in self._model_hooks:
return
+5 -2
View File
@@ -4,7 +4,7 @@ import sys, os, struct
from ..core.memory import Memory, MemoryException, SMemory32, Memory32
from ..core.smtlib import Expression, Operators, solver
# TODO use cpu factory
from ..core.cpu.x86 import I386Cpu, Syscall
from ..core.cpu.x86 import I386Cpu, I386StdcallAbi, Syscall
from ..core.cpu.abstractcpu import Interruption, Syscall
from ..core.state import ForkState, TerminateState
from ..utils.helpers import issymbolic
@@ -175,13 +175,16 @@ class Windows(Platform):
assert nprocs > 0
assert len(self.running) == 1, "For now lets consider only one thread running"
self._current = self.running[0]
self._function_abi = I386StdcallAbi(self.procs[0])
#Install event forwarders
for proc in self.procs:
forward_signals(self, proc)
@property
def _function_abi(self):
return I386StdcallAbi(self.procs[0])
@property
def current(self):
return self.procs[self._current]
@@ -1175,6 +1175,7 @@
0:7735645d
0:77356462
0:773570b0
0:773570b2
0:77357760
0:77357762
0:77357763
@@ -6,6 +6,7 @@
0:008f1039
0:008f103b
0:008f103d
0:008f1040
0:008f1055
0:008f105a
0:008f1064
@@ -674,6 +675,7 @@
0:77c1645d
0:77c16462
0:77c170b0
0:77c170b2
0:77c177a0
0:77c177a2
0:77c177a3
@@ -690,6 +690,7 @@
0:774f629d
0:774f62a2
0:774f70b0
0:774f70b2
0:774f70c8
0:774f70c9
0:774f70cb
@@ -30,11 +30,7 @@
0:01021100
0:01021105
0:01021108
0:0102110e
0:01021111
0:01021115
0:01021116
0:0102111b
0:0102110b
0:0102116c
0:01021173
0:01021175
@@ -291,16 +287,6 @@
0:01021aa5
0:01021aa8
0:01021aae
0:01021ab5
0:01021ab7
0:01021abe
0:01021ac0
0:01021ac6
0:01021acc
0:01021ad2
0:01021ad8
0:01021ade
0:01021ae4
0:01021cad
0:01021caf
0:01021cb5
@@ -319,79 +305,6 @@
0:01021d16
0:01021d1b
0:01021d1e
0:01021d23
0:01021d26
0:01021d29
0:01021d2f
0:01021d35
0:01021d38
0:01021e2b
0:01021e2e
0:01021e34
0:01021e35
0:01021e36
0:01021e38
0:01021e3b
0:01021e41
0:01021e42
0:01021e43
0:01021e49
0:01021e4c
0:01021e52
0:01021e58
0:01021e8a
0:01021e8d
0:01021e93
0:01021e9d
0:01021ea3
0:0102226d
0:01022274
0:0102227a
0:0102227d
0:010222b4
0:010222ba
0:010222c0
0:010222c6
0:010222c8
0:010222cb
0:010222cd
0:010222d3
0:010222d4
0:010222da
0:010222db
0:010222dd
0:010222e2
0:010222e8
0:010222eb
0:010222f1
0:010222f7
0:010222f8
0:010222fe
0:010222ff
0:01022305
0:01022306
0:0102230b
0:0102230e
0:01022311
0:01022330
0:01022337
0:0102233d
0:010223bc
0:010223c2
0:010223c8
0:010223c9
0:010223cf
0:010223d0
0:010223d1
0:010223d6
0:010223d9
0:010223df
0:010223e1
0:010223e3
0:010223e6
0:01022406
0:0102240c
0:0102240e
0:0102241f
0:01022425
0:0102242b
@@ -432,54 +345,6 @@
0:010224e0
0:010224e2
0:010224e3
0:010224e4
0:010224e5
0:010224e7
0:010224e8
0:010224eb
0:010224ed
0:0102250d
0:0102250e
0:0102250f
0:01022510
0:01022511
0:01022513
0:01022514
0:01022517
0:01022518
0:0102251b
0:0102251d
0:01022520
0:01022524
0:01022536
0:01022539
0:0102253a
0:0102253d
0:0102253f
0:01022541
0:01022544
0:01022545
0:01022548
0:01022549
0:0102254a
0:0102254d
0:0102254e
0:01022553
0:01022556
0:01022559
0:0102255c
0:0102255f
0:01022575
0:01022577
0:01022579
0:0102257c
0:0102257e
0:01022581
0:01022583
0:01022584
0:01022585
0:01022586
0:01022587
0:010225bc
0:010225c1
0:010225c3
@@ -840,6 +705,7 @@
0:77c1645d
0:77c16462
0:77c170b0
0:77c170b2
0:77c177a0
0:77c177a2
0:77c177a3
+1 -5
View File
@@ -80,17 +80,14 @@ class IntegrationTest(unittest.TestCase):
afile = os.path.join(workspace, params['actual'])
actual = self._loadVisitedSet(afile)
self.assertEqual(actual, expected)
self.assertGreaterEqual(actual, expected)
@unittest.skip('TODO')
def testSimpleParse(self):
self._runManticore("simple_parse")
@unittest.skip('TODO')
def testSimpleDeref(self):
self._runManticore("simple_bad_deref")
@unittest.skip('TODO')
def testSimpleBufferOverflow(self):
self._runManticore("simple_buffer_overflow")
@@ -103,7 +100,6 @@ class IntegrationTest(unittest.TestCase):
def testWin32API(self):
self._runManticore("win32_api_test")
@unittest.skip('TODO')
def testAPIInterception(self):
self._runManticore("api_interception")