@@ -0,0 +1,959 @@
+import angr%0Aimport nose%0A%0Adef test_unsupported_syscall_simos():%0A    p = angr.load_shellcode('%5Cxcd%5Cx80', 'x86')%0A    state = p.factory.entry_state()%0A    state.regs.eax = 4%0A%0A    # test that by default trying to perform a syscall without SimUserspace causes the state to go errored%0A    simgr = p.factory.simulation_manager(state)%0A    simgr.step()%0A    nose.tools.assert_equal(len(simgr.active), 1)%0A    simgr.step()%0A    nose.tools.assert_equal(len(simgr.active), 0)%0A    nose.tools.assert_equal(len(simgr.errored), 1)%0A%0A    # test that when we set BYPASS_UNSUPPORTED_SYSCALLS, we get a syscall stub instead%0A    state.options.add(angr.options.BYPASS_UNSUPPORTED_SYSCALL)%0A    simgr = p.factory.simulation_manager(state)%0A    simgr.step()%0A    nose.tools.assert_equal(len(simgr.active), 1)%0A    simgr.step()%0A    nose.tools.assert_equal(len(simgr.active), 1)%0A    nose.tools.assert_equal(len(simgr.errored), 0)%0A%0Aif __name__ == '__main__':%0A    test_unsupported_syscall_simos()%0A

Add test case