spec test index / oilshell.org
94 passed, 5 OK, 3 not implemented, 7 BUG, 6 failed, 0 timeouts, 0 cases skipped 6 failed under osh
dash | 3 SIGINT and INT are aliases stdout: 1 0stderr: trap: SIGINT: bad trap |
dash | 4 trap without args prints traps, like trap -p stdout: stderr: |
mksh | 4 trap without args prints traps, like trap -p stdout: status=0 status=1stderr: |
ash | 4 trap without args prints traps, like trap -p stdout: status=0 status=1stderr: |
osh | 4 trap without args prints traps, like trap -p [osh stdout] Expected "status=0\ntrap -- 'true' EXIT\nstatus=0\n", got 'status=0\nstatus=1\n' stdout: status=0 status=1stderr: trap | grep EXIT ^~~~ [ -c flag ]:6: 'trap' requires a code string |
osh | 5 trap 'echo hi' KILL (regression test, caught by smoosh suite) stdout: status=1 status=1 status=1 status=0stderr: trap 'echo hi' 9 ^ [ stdin ]:1: Signal '9' can't be handled trap 'echo hi' KILL ^~~~ [ stdin ]:4: Invalid signal or hook 'KILL' trap 'echo hi' STOP ^~~~ [ stdin ]:7: Signal 'STOP' can't be handled |
dash | 6 Invalid trap invocation stdout: status=1stderr: trap: foo: bad trap |
mksh | 6 Invalid trap invocation stdout: status=0stderr: |
ash | 6 Invalid trap invocation stdout: status=1stderr: ash: trap: line 1: foo: invalid signal specification |
dash | 7 exit 1 when trap code string is invalid stdout: status=0stderr: dash: 1: Syntax error: end of file unexpected |
bash | 7 exit 1 when trap code string is invalid stdout: status=0stderr: bash: exit trap: line 1: syntax error near unexpected token `newline' bash: exit trap: line 1: `echo <' |
mksh | 7 exit 1 when trap code string is invalid stdout: status=0stderr: mksh: syntax error: unexpected EOF |
ash | 7 exit 1 when trap code string is invalid stdout: status=0stderr: ash: syntax error: unexpected end of file |
mksh | 10 trap EXIT with PARSE error stdout: FAILEDstderr: mksh: <stdin>[2]: syntax error: 'newline' unexpected |
dash | 15 trap 1 is equivalent to SIGHUP; HUP is equivalent to SIGHUP stdout: status=1 status=0 status=0 status=0stderr: trap: SIGHUP: bad trap |
osh | 17 exit codes for traps are isolated [osh stdout] Expected 'before=0\nUSR1 trap status=0\nafter=0\n', got 'before=0\n' [osh status] Expected 0, got 1 [osh stderr] Found 'Traceback (most recent' stdout: before=0stderr: Traceback (most recent call last): File "/home/uke/oil/bin/oils_for_unix.py", line 201, in <module> sys.exit(main(sys.argv)) File "/home/uke/oil/bin/oils_for_unix.py", line 170, in main return AppBundleMain(argv) File "/home/uke/oil/bin/oils_for_unix.py", line 140, in AppBundleMain return shell.Main('osh', arg_r, environ, login_shell, loader, readline) File "/home/uke/oil/core/shell.py", line 1240, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/uke/oil/core/main_loop.py", line 365, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags) File "/home/uke/oil/osh/cmd_eval.py", line 2051, in ExecuteAndCatch status = self._Execute(node) File "/home/uke/oil/osh/cmd_eval.py", line 1850, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1585, in _Dispatch status = self._DoSimple(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 874, in _DoSimple status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags) File "/home/uke/oil/osh/cmd_eval.py", line 546, in _RunSimpleCommand run_flags) File "/home/uke/oil/core/executor.py", line 385, in RunSimpleCommand status = p.RunProcess(self.waiter, trace.External(cmd_val.argv)) File "/home/uke/oil/core/process.py", line 1193, in RunProcess return self.Wait(waiter) File "/home/uke/oil/core/process.py", line 1122, in Wait if waiter.WaitForOne() == W1_ECHILD: File "/home/uke/oil/core/process.py", line 1908, in WaitForOne pid, status = pyos.WaitPid(waitpid_options) File "/home/uke/oil/core/pyos.py", line 64, in WaitPid if e.errno == EINTR and gSignalSafe.PollUntrappedSigInt(): AttributeError: 'NoneType' object has no attribute 'PollUntrappedSigInt' |
osh | 18 traps are cleared in subshell (started with &) [osh stdout] Expected 'SIGURG\nbegin child\nend child\nwait status 0\n' Got '' [osh status] Expected 0, got 1 [osh stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/uke/oil/bin/oils_for_unix.py", line 201, in <module> sys.exit(main(sys.argv)) File "/home/uke/oil/bin/oils_for_unix.py", line 170, in main return AppBundleMain(argv) File "/home/uke/oil/bin/oils_for_unix.py", line 140, in AppBundleMain return shell.Main('osh', arg_r, environ, login_shell, loader, readline) File "/home/uke/oil/core/shell.py", line 1240, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/uke/oil/core/main_loop.py", line 365, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags) File "/home/uke/oil/osh/cmd_eval.py", line 2051, in ExecuteAndCatch status = self._Execute(node) File "/home/uke/oil/osh/cmd_eval.py", line 1850, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1585, in _Dispatch status = self._DoSimple(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 874, in _DoSimple status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags) File "/home/uke/oil/osh/cmd_eval.py", line 546, in _RunSimpleCommand run_flags) File "/home/uke/oil/core/executor.py", line 385, in RunSimpleCommand status = p.RunProcess(self.waiter, trace.External(cmd_val.argv)) File "/home/uke/oil/core/process.py", line 1193, in RunProcess return self.Wait(waiter) File "/home/uke/oil/core/process.py", line 1122, in Wait if waiter.WaitForOne() == W1_ECHILD: File "/home/uke/oil/core/process.py", line 1908, in WaitForOne pid, status = pyos.WaitPid(waitpid_options) File "/home/uke/oil/core/pyos.py", line 64, in WaitPid if e.errno == EINTR and gSignalSafe.PollUntrappedSigInt(): AttributeError: 'NoneType' object has no attribute 'PollUntrappedSigInt' |
osh | 19 trap USR1, sleep, SIGINT: non-interactively [osh stdout] Expected 'usr1\nstatus=0\n', got 'status=0\n' [osh stderr] Found 'Traceback (most recent' stdout: status=0stderr: Traceback (most recent call last): File "/home/uke/oil/bin/oils_for_unix.py", line 201, in <module> sys.exit(main(sys.argv)) File "/home/uke/oil/bin/oils_for_unix.py", line 170, in main return AppBundleMain(argv) File "/home/uke/oil/bin/oils_for_unix.py", line 140, in AppBundleMain return shell.Main('osh', arg_r, environ, login_shell, loader, readline) File "/home/uke/oil/core/shell.py", line 1240, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/uke/oil/core/main_loop.py", line 365, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags) File "/home/uke/oil/osh/cmd_eval.py", line 2051, in ExecuteAndCatch status = self._Execute(node) File "/home/uke/oil/osh/cmd_eval.py", line 1850, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1696, in _Dispatch status = self._ExecuteList(node.children) File "/home/uke/oil/osh/cmd_eval.py", line 1927, in _ExecuteList status = self._Execute(child) File "/home/uke/oil/osh/cmd_eval.py", line 1850, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1585, in _Dispatch status = self._DoSimple(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 874, in _DoSimple status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags) File "/home/uke/oil/osh/cmd_eval.py", line 546, in _RunSimpleCommand run_flags) File "/home/uke/oil/core/executor.py", line 385, in RunSimpleCommand status = p.RunProcess(self.waiter, trace.External(cmd_val.argv)) File "/home/uke/oil/core/process.py", line 1193, in RunProcess return self.Wait(waiter) File "/home/uke/oil/core/process.py", line 1122, in Wait if waiter.WaitForOne() == W1_ECHILD: File "/home/uke/oil/core/process.py", line 1908, in WaitForOne pid, status = pyos.WaitPid(waitpid_options) File "/home/uke/oil/core/pyos.py", line 64, in WaitPid if e.errno == EINTR and gSignalSafe.PollUntrappedSigInt(): AttributeError: 'NoneType' object has no attribute 'PollUntrappedSigInt' |
mksh | 20 trap INT, sleep, SIGINT: non-interactively stdout: mkshstderr: |
osh | 20 trap INT, sleep, SIGINT: non-interactively [osh stdout] Expected 'int\nstatus=0\n', got 'status=0\n' [osh stderr] Found 'Traceback (most recent' stdout: status=0stderr: Traceback (most recent call last): File "/home/uke/oil/bin/oils_for_unix.py", line 201, in <module> sys.exit(main(sys.argv)) File "/home/uke/oil/bin/oils_for_unix.py", line 170, in main return AppBundleMain(argv) File "/home/uke/oil/bin/oils_for_unix.py", line 140, in AppBundleMain return shell.Main('osh', arg_r, environ, login_shell, loader, readline) File "/home/uke/oil/core/shell.py", line 1240, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/uke/oil/core/main_loop.py", line 365, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags) File "/home/uke/oil/osh/cmd_eval.py", line 2051, in ExecuteAndCatch status = self._Execute(node) File "/home/uke/oil/osh/cmd_eval.py", line 1850, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1696, in _Dispatch status = self._ExecuteList(node.children) File "/home/uke/oil/osh/cmd_eval.py", line 1927, in _ExecuteList status = self._Execute(child) File "/home/uke/oil/osh/cmd_eval.py", line 1850, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1585, in _Dispatch status = self._DoSimple(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 874, in _DoSimple status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags) File "/home/uke/oil/osh/cmd_eval.py", line 546, in _RunSimpleCommand run_flags) File "/home/uke/oil/core/executor.py", line 385, in RunSimpleCommand status = p.RunProcess(self.waiter, trace.External(cmd_val.argv)) File "/home/uke/oil/core/process.py", line 1193, in RunProcess return self.Wait(waiter) File "/home/uke/oil/core/process.py", line 1122, in Wait if waiter.WaitForOne() == W1_ECHILD: File "/home/uke/oil/core/process.py", line 1908, in WaitForOne pid, status = pyos.WaitPid(waitpid_options) File "/home/uke/oil/core/pyos.py", line 64, in WaitPid if e.errno == EINTR and gSignalSafe.PollUntrappedSigInt(): AttributeError: 'NoneType' object has no attribute 'PollUntrappedSigInt' |
osh | 21 trap EXIT, sleep, SIGINT: non-interactively [osh stdout] Expected 'on exit\nstatus=0\n', got 'status=0\n' [osh stderr] Found 'Traceback (most recent' stdout: status=0stderr: Traceback (most recent call last): File "/home/uke/oil/bin/oils_for_unix.py", line 201, in <module> sys.exit(main(sys.argv)) File "/home/uke/oil/bin/oils_for_unix.py", line 170, in main return AppBundleMain(argv) File "/home/uke/oil/bin/oils_for_unix.py", line 140, in AppBundleMain return shell.Main('osh', arg_r, environ, login_shell, loader, readline) File "/home/uke/oil/core/shell.py", line 1240, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/uke/oil/core/main_loop.py", line 365, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags) File "/home/uke/oil/osh/cmd_eval.py", line 2051, in ExecuteAndCatch status = self._Execute(node) File "/home/uke/oil/osh/cmd_eval.py", line 1850, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1696, in _Dispatch status = self._ExecuteList(node.children) File "/home/uke/oil/osh/cmd_eval.py", line 1927, in _ExecuteList status = self._Execute(child) File "/home/uke/oil/osh/cmd_eval.py", line 1850, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1585, in _Dispatch status = self._DoSimple(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 874, in _DoSimple status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags) File "/home/uke/oil/osh/cmd_eval.py", line 546, in _RunSimpleCommand run_flags) File "/home/uke/oil/core/executor.py", line 385, in RunSimpleCommand status = p.RunProcess(self.waiter, trace.External(cmd_val.argv)) File "/home/uke/oil/core/process.py", line 1193, in RunProcess return self.Wait(waiter) File "/home/uke/oil/core/process.py", line 1122, in Wait if waiter.WaitForOne() == W1_ECHILD: File "/home/uke/oil/core/process.py", line 1908, in WaitForOne pid, status = pyos.WaitPid(waitpid_options) File "/home/uke/oil/core/pyos.py", line 64, in WaitPid if e.errno == EINTR and gSignalSafe.PollUntrappedSigInt(): AttributeError: 'NoneType' object has no attribute 'PollUntrappedSigInt' |