def setUp(self): # if not hasattr(self, 'manager'): # self.manager = SyncManager() # self.manager.start(lambda: signal.signal(signal.SIGINT, signal.SIG_IGN)) dirname = os.path.dirname(__file__) l = linux.Linux(os.path.join(dirname, "binaries", "basic_linux_amd64")) self.state = State(ConstraintSet(), l)
def setUp(self): if not hasattr(self, 'manager'): self.manager = SyncManager() self.manager.start( lambda: signal.signal(signal.SIGINT, signal.SIG_IGN)) l = linux.Linux('/bin/ls') self.state = State(ConstraintSet(), l) self.lock = self.manager.Condition()
def setUp(self): if not hasattr(self, 'manager'): self.manager = SyncManager() self.manager.start( lambda: signal.signal(signal.SIGINT, signal.SIG_IGN)) dirname = os.path.dirname(__file__) l = linux.Linux(os.path.join(dirname, 'binaries', 'basic_linux_amd64')) self.state = State(ConstraintSet(), l) self.lock = self.manager.Condition()
def test_stack_init(self): argv = ['arg1', 'arg2', 'arg3'] real_argv = [self.BIN_PATH] + argv envp = ['env1', 'env2', 'env3'] self.linux = linux.Linux(self.BIN_PATH, argv, envp) cpu = self.linux.current self.assertEqual(cpu.read_int(cpu.STACK), 4) argv_ptr = cpu.STACK + 8 envp_ptr = argv_ptr + len(real_argv)*8 + 8 for i, arg in enumerate(real_argv): self.assertEqual(cpu.read_string(cpu.read_int(argv_ptr + i*8)), arg) for i, env in enumerate(envp): self.assertEqual(cpu.read_string(cpu.read_int(envp_ptr + i*8)), env)
def setUp(self): self.linux = linux.Linux(self.BIN_PATH) self.symbolic_linux_armv7 = linux.SLinux.empty_platform("armv7") self.symbolic_linux_aarch64 = linux.SLinux.empty_platform("aarch64")
def setUp(self): dirname = os.path.dirname(__file__) l = linux.Linux(os.path.join(dirname, "binaries", "basic_linux_amd64")) self.state = State(ConstraintSet(), l)
def setUp(self): self.linux = linux.Linux(self.BIN_PATH) self.symbolic_linux = linux.SLinux.empty_platform('armv7')
def setUp(self): l = linux.Linux('/bin/ls') self.state = State(ConstraintSet(), l) self.lock = manager.Condition(manager.RLock())
def setUp(self): self.linux = linux.Linux(self.BIN_PATH)
def setUp(self): l = linux.Linux('/bin/ls') self.state = State(ConstraintSet(), l)