spec test index / oilshell.org
83 passed, 2 OK, 0 not implemented, 0 BUG, 80 failed, 0 timeouts, 0 cases skipped 1 failed under osh
osh_.cc | 0 >& [osh_.cc stderr] Expected 'hi\n', got "osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed.\n" [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 1 <& [osh_.py stdout] Expected '[foo]\n', got '[]\n' stdout: []stderr: echo foo > $TMP/lessamp.txt ^ [ stdin ]:1: Can't open '/lessamp.txt': Permission denied exec 6< $TMP/lessamp.txt ^~ [ stdin ]:2: Can't open '/lessamp.txt': No such file or directory read line <&6 ^~ [ stdin ]:3: 6: Bad file descriptor |
osh_.cc | 1 <& [osh_.cc stdout] Expected '[foo]\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 2 Leading redirect [osh_.py stdout] Expected 'hello\n', got '' [osh_.py status] Expected 0, got 1 stdout: stderr: echo hello >$TMP/hello.txt # temporary fix ^ [ stdin ]:1: Can't open '/hello.txt': Permission denied <$TMP/hello.txt cat ^ [ stdin ]:2: Can't open '/hello.txt': No such file or directory |
osh_.cc | 2 Leading redirect [osh_.cc stdout] Expected 'hello\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.cc | 3 Nonexistent file [osh_.cc stdout] Expected 'status=1\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.cc | 4 Redirect in command sub [osh_.cc stdout] Expected '\n', got '' [osh_.cc stderr] Expected 'foo\n', got "osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.\n" [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
osh_.py | 5 Redirect in assignment [osh_.py stdout] Expected 'FILE=\nfoo\nFOO=\n', got 'FILE=\nFOO=\n' stdout: FILE= FOO=stderr: FOO=$(echo foo 1>&2) 2>$TMP/no-command.txt ^~ [ stdin ]:1: Can't open '/no-command.txt': Permission denied cat: /no-command.txt: No such file or directory |
osh_.cc | 5 Redirect in assignment [osh_.cc stdout] Expected 'FILE=\nfoo\nFOO=\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.cc | 6 Redirect in function body. [osh_.cc stderr] Expected u'hi\n', got "osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed.\n" [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 8 Redirect in function body is evaluated multiple times [osh_.py stdout] Expected 'i=2\n__\nfile 1\n__\nfile 2\n', got 'i=2\n__\n__\n' [osh_.py status] Expected 0, got 1 stdout: i=2 __ __stderr: fun() { echo "file $i"; } 1> "$TMP/file$((i++))" ^~ [ stdin ]:2: Can't open '/file0': Permission denied fun() { echo "file $i"; } 1> "$TMP/file$((i++))" ^~ [ stdin ]:2: Can't open '/file1': Permission denied cat: /file0: No such file or directory cat: /file1: No such file or directory |
osh_.cc | 8 Redirect in function body is evaluated multiple times [osh_.cc stdout] Expected 'i=2\n__\nfile 1\n__\nfile 2\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.cc | 9 Redirect in function body AND function call [osh_.cc stdout] Expected u'hi\n', got '' [osh_.cc stderr] Expected u'', got "osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed.\n" [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.cc | 10 Descriptor redirect with spaces [osh_.cc stderr] Expected u'one\ntwo 1\nthree\n', got "osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed.\n" [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 11 Filename redirect with spaces [osh_.py stdout] Expected 'two\n', got '' [osh_.py status] Expected 0, got 1 stdout: stderr: echo two 1> $TMP/file-redir1.txt ^~ [ stdin ]:1: Can't open '/file-redir1.txt': Permission denied cat: /file-redir1.txt: No such file or directory |
osh_.cc | 11 Filename redirect with spaces [osh_.cc stdout] Expected 'two\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 12 Quoted filename redirect with spaces [osh_.py stdout] Expected 'two 1\n', got '' [osh_.py status] Expected 0, got 1 stdout: stderr: echo two \1 > $TMP/file-redir2.txt ^ [ stdin ]:1: Can't open '/file-redir2.txt': Permission denied cat: /file-redir2.txt: No such file or directory |
osh_.cc | 12 Quoted filename redirect with spaces [osh_.cc stdout] Expected 'two 1\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 14 redirect for loop [osh_.py stdout] Expected u'1\n2\n3\n', got '' [osh_.py status] Expected 0, got 1 stdout: stderr: done > $TMP/redirect-for-loop.txt ^ [ stdin ]:4: Can't open '/redirect-for-loop.txt': Permission denied cat: /redirect-for-loop.txt: No such file or directory |
osh_.cc | 14 redirect for loop [osh_.cc stdout] Expected u'1\n2\n3\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.cc | 15 redirect subshell [osh_.cc stderr] Expected 'foo\n', got "osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed.\n" [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.cc | 16 Prefix redirect for loop -- not allowed [osh_.cc status] Expected 2, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 17 Brace group redirect [osh_.py stdout] Expected '15\n', got '' [osh_.py status] Expected 0, got 127 stdout: stderr: { echo block-redirect; } > $TMP/br.txt ^ [ stdin ]:1: Can't open '/br.txt': Permission denied cat $TMP/br.txt | wc -c ^~ [ stdin ]:2: 'wc' not found cat: /br.txt: No such file or directory |
osh_.cc | 17 Brace group redirect [osh_.cc stdout] Expected '15\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 18 Redirect echo to stderr, and then redirect all of stdout somewhere. [osh_.py stdout] Expected '10\n', got '' [osh_.py stderr] Expected 'foo\n', got " { echo foo 1>&2; echo 012345789; } > $TMP/block-stdout.txt\n ^\n[ stdin ]:1: Can't open '/block-stdout.txt': Permission denied\n cat $TMP/block-stdout.txt | wc -c\n ^~\n[ stdin ]:2: 'wc' not found\ncat: /block-stdout.txt: No such file or directory\n" [osh_.py status] Expected 0, got 127 stdout: stderr: { echo foo 1>&2; echo 012345789; } > $TMP/block-stdout.txt ^ [ stdin ]:1: Can't open '/block-stdout.txt': Permission denied cat $TMP/block-stdout.txt | wc -c ^~ [ stdin ]:2: 'wc' not found cat: /block-stdout.txt: No such file or directory |
osh_.cc | 18 Redirect echo to stderr, and then redirect all of stdout somewhere. [osh_.cc stdout] Expected '10\n', got '' [osh_.cc stderr] Expected 'foo\n', got "osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed.\n" [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 19 Redirect in the middle of two assignments [osh_.py stdout] Expected u'bar\nfoo\n', got '' [osh_.py status] Expected 0, got 127 stdout: stderr: FOO=foo >$TMP/out.txt BAR=bar printenv.py FOO BAR ^ [ stdin ]:1: Can't open '/out.txt': Permission denied tac $TMP/out.txt ^~~ [ stdin ]:2: 'tac' not found |
osh_.cc | 19 Redirect in the middle of two assignments [osh_.cc stdout] Expected u'bar\nfoo\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 20 Redirect in the middle of a command [osh_.py stdout] Expected u'1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 ', got '' [osh_.py status] Expected 0, got 1 stdout: stderr: echo -n 1 2 '3 ' > $f ^ [ stdin ]:2: Can't open '/out': Permission denied echo -n 4 5 >> $f '6 ' ^~ [ stdin ]:3: Can't open '/out': Permission denied echo -n 7 >> $f 8 '9 ' ^~ [ stdin ]:4: Can't open '/out': Permission denied echo -n >> $f 1 2 '3 ' ^~ [ stdin ]:5: Can't open '/out': Permission denied echo >> $f -n 4 5 '6 ' ^~ [ stdin ]:6: Can't open '/out': Permission denied cat: /out: No such file or directory |
osh_.cc | 20 Redirect in the middle of a command [osh_.cc stdout] Expected u'1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 ', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 21 Named file descriptor [osh_.py stdout] Expected 'named-fd-contents\n', got '' [osh_.py status] Expected 0, got 1 stdout: stderr: exec {myfd}> $TMP/named-fd.txt ^~~~~~~ [ stdin ]:1: Can't open '/named-fd.txt': Permission denied echo named-fd-contents >& $myfd ^~~~~ [ stdin ]:2: Redirect descriptor can't be empty cat: /named-fd.txt: No such file or directory |
osh_.cc | 21 Named file descriptor [osh_.cc stdout] Expected 'named-fd-contents\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: mycpp/mylib.h:671: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed. |
osh_.py | 22 Double digit fd (20> file) [osh_.py stdout] Expected 'hello20\n', got '' [osh_.py status] Expected 0, got 1 stdout: stderr: exec 20> "$TMP/double-digit-fd.txt" ^~~ [ stdin ]:1: Can't open '/double-digit-fd.txt': Permission denied echo hello20 >&20 ^~ [ stdin ]:2: 20: Bad file descriptor cat: /double-digit-fd.txt: No such file or directory |
osh_.cc | 22 Double digit fd (20> file) [osh_.cc stdout] Expected 'hello20\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 23 : 9> fdleak (OSH regression) [osh_.py status] Expected 0, got 1 stdout: stderr: true 9> "$TMP/fd.txt" ^~ [ stdin ]:1: Can't open '/fd.txt': Permission denied ( echo world >&9 ) ^~ [ stdin ]:2: 9: Bad file descriptor cat: /fd.txt: No such file or directory |
osh_.cc | 23 : 9> fdleak (OSH regression) [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 26 3>&- << EOF (OSH regression: fail to restore fds) [osh_.py stdout] Expected 'hello\nworld\n', got 'hello\n' [osh_.py status] Expected 0, got 1 [osh_.py stderr] Found 'Traceback (most recent' stdout: hellostderr: exec 3> "$TMP/fd.txt" ^~ [ stdin ]:1: Can't open '/fd.txt': Permission denied Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 71, in <module> sys.exit(main(sys.argv)) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 39, in main status = pure.Main('osh', arg_r, environ, login_shell, loader, None) File "/home/andy/git/oilshell/oil/core/pure.py", line 497, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1470, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1317, in _Execute status, check_errexit = self._Dispatch(node, pipeline_st) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 626, in _Dispatch status = self._RunSimpleCommand(cmd_val, node.do_fork) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 476, in _RunSimpleCommand return self.shell_ex.RunSimpleCommand(cmd_val, do_fork) File "/home/andy/git/oilshell/oil/core/executor.py", line 188, in RunSimpleCommand status = self.RunBuiltin(builtin_id, cmd_val) File "/home/andy/git/oilshell/oil/core/executor.py", line 116, in RunBuiltin builtin_func = self.builtins[builtin_id] KeyError: 3 |
osh_.cc | 26 3>&- << EOF (OSH regression: fail to restore fds) [osh_.cc stdout] Expected 'hello\nworld\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 27 Open file on descriptor 3 and write to it many times [osh_.py stdout] Expected 'hello\nworld\n', got '' [osh_.py status] Expected 0, got 1 [osh_.py stderr] Found 'Traceback (most recent' stdout: stderr: exec 3> "$TMP/fd3.txt" ^~ [ stdin ]:1: Can't open '/fd3.txt': Permission denied Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 71, in <module> sys.exit(main(sys.argv)) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 39, in main status = pure.Main('osh', arg_r, environ, login_shell, loader, None) File "/home/andy/git/oilshell/oil/core/pure.py", line 497, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1470, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1317, in _Execute status, check_errexit = self._Dispatch(node, pipeline_st) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 626, in _Dispatch status = self._RunSimpleCommand(cmd_val, node.do_fork) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 476, in _RunSimpleCommand return self.shell_ex.RunSimpleCommand(cmd_val, do_fork) File "/home/andy/git/oilshell/oil/core/executor.py", line 188, in RunSimpleCommand status = self.RunBuiltin(builtin_id, cmd_val) File "/home/andy/git/oilshell/oil/core/executor.py", line 116, in RunBuiltin builtin_func = self.builtins[builtin_id] KeyError: 3 |
osh_.cc | 27 Open file on descriptor 3 and write to it many times [osh_.cc stdout] Expected 'hello\nworld\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 28 Open file on descriptor 4 and write to it many times [osh_.py stdout] Expected 'hello\nworld\n', got '' [osh_.py status] Expected 0, got 2 stdout: stderr: exec 4> "$TMP/fd4.txt" ^~ [ stdin ]:1: Can't open '/fd4.txt': Permission denied echo hello >&4 ^~ [ stdin ]:2: 4: Bad file descriptor echo world >&4 ^~ [ stdin ]:3: 4: Bad file descriptor Error closing descriptor 4: Bad file descriptor osh I/O error: Bad file descriptor |
osh_.cc | 28 Open file on descriptor 4 and write to it many times [osh_.cc stdout] Expected 'hello\nworld\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 29 Redirect function stdout [osh_.py stdout] Expected u'one\ntwo\n', got '' [osh_.py status] Expected 0, got 1 stdout: stderr: f > $TMP/redirect-func.txt ^ [ stdin ]:2: Can't open '/redirect-func.txt': Permission denied cat: /redirect-func.txt: No such file or directory |
osh_.cc | 29 Redirect function stdout [osh_.cc stdout] Expected u'one\ntwo\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 30 Nested function stdout redirect [osh_.py stdout] Expected u'i1\ni2\n--\no1\no2\n', got '--\n' [osh_.py status] Expected 0, got 1 stdout: --stderr: outer > $TMP/outer.txt ^ [ stdin ]:10: Can't open '/outer.txt': Permission denied cat: /inner.txt: No such file or directory cat: /outer.txt: No such file or directory |
osh_.cc | 30 Nested function stdout redirect [osh_.cc stdout] Expected u'i1\ni2\n--\no1\no2\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.cc | 32 Redirect to file descriptor that's not open [osh_.cc status] Expected 1, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 33 Open descriptor with exec [osh_.py stdout] Expected 'hi\n', got '' [osh_.py status] Expected 0, got 1 [osh_.py stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 71, in <module> sys.exit(main(sys.argv)) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 39, in main status = pure.Main('osh', arg_r, environ, login_shell, loader, None) File "/home/andy/git/oilshell/oil/core/pure.py", line 497, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1470, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1317, in _Execute status, check_errexit = self._Dispatch(node, pipeline_st) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 626, in _Dispatch status = self._RunSimpleCommand(cmd_val, node.do_fork) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 476, in _RunSimpleCommand return self.shell_ex.RunSimpleCommand(cmd_val, do_fork) File "/home/andy/git/oilshell/oil/core/executor.py", line 188, in RunSimpleCommand status = self.RunBuiltin(builtin_id, cmd_val) File "/home/andy/git/oilshell/oil/core/executor.py", line 116, in RunBuiltin builtin_func = self.builtins[builtin_id] KeyError: 3 |
osh_.cc | 33 Open descriptor with exec [osh_.cc stdout] Expected 'hi\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 34 Open multiple descriptors with exec [osh_.py stdout] Expected u'three\nfour\n', got '' [osh_.py status] Expected 0, got 1 [osh_.py stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 71, in <module> sys.exit(main(sys.argv)) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 39, in main status = pure.Main('osh', arg_r, environ, login_shell, loader, None) File "/home/andy/git/oilshell/oil/core/pure.py", line 497, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1470, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1317, in _Execute status, check_errexit = self._Dispatch(node, pipeline_st) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 626, in _Dispatch status = self._RunSimpleCommand(cmd_val, node.do_fork) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 476, in _RunSimpleCommand return self.shell_ex.RunSimpleCommand(cmd_val, do_fork) File "/home/andy/git/oilshell/oil/core/executor.py", line 188, in RunSimpleCommand status = self.RunBuiltin(builtin_id, cmd_val) File "/home/andy/git/oilshell/oil/core/executor.py", line 116, in RunBuiltin builtin_func = self.builtins[builtin_id] KeyError: 3 |
osh_.cc | 34 Open multiple descriptors with exec [osh_.cc stdout] Expected u'three\nfour\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh | 35 >| to clobber [osh stdout] Expected 'status=1\nXX\nZZ\n', got 'status=0\nYY\nZZ\n' stdout: status=0 YY ZZstderr: |
osh_.py | 35 >| to clobber [osh_.py stdout] Expected 'status=1\nXX\nZZ\n', got 'status=1\n' [osh_.py status] Expected 0, got 1 stdout: status=1stderr: echo XX >| $TMP/c.txt ^~ [ stdin ]:1: Can't open '/c.txt': Permission denied echo YY > $TMP/c.txt # not globber ^ [ stdin ]:3: Can't open '/c.txt': Permission denied cat: /c.txt: No such file or directory echo ZZ >| $TMP/c.txt ^~ [ stdin ]:6: Can't open '/c.txt': Permission denied cat: /c.txt: No such file or directory |
osh_.cc | 35 >| to clobber [osh_.cc stdout] Expected 'status=1\nXX\nZZ\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 36 &> redirects stdout and stderr [osh_.py stdout] Expected 'ok\nok\n', got '' [osh_.py status] Expected 0, got 2 stdout: stderr: stdout_stderr.py &> $TMP/f.txt ^~ [ stdin ]:1: Can't open '/f.txt': Permission denied grep: /f.txt: No such file or directory grep: /f.txt: No such file or directory |
osh_.cc | 36 &> redirects stdout and stderr [osh_.cc stdout] Expected 'ok\nok\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 37 1>&- to close file descriptor [osh_.py stdout] Expected u'hello\n', got '' [osh_.py status] Expected 0, got 2 stdout: stderr: exec 5> "$TMP/f.txt" ^~ [ stdin ]:1: Can't open '/f.txt': Permission denied echo hello >&5 ^~ [ stdin ]:2: 5: Bad file descriptor Error closing descriptor 5: Bad file descriptor osh I/O error: Bad file descriptor |
osh_.cc | 37 1>&- to close file descriptor [osh_.cc stdout] Expected u'hello\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 38 1>&2- to move file descriptor [osh_.py stdout] Expected u'hello5\nworld6\n', got '' [osh_.py status] Expected 0, got 2 stdout: stderr: exec 5> "$TMP/f.txt" ^~ [ stdin ]:1: Can't open '/f.txt': Permission denied echo hello5 >&5 ^~ [ stdin ]:2: 5: Bad file descriptor exec 6>&5- ^~~ [ stdin ]:3: 5: Bad file descriptor echo world5 >&5 ^~ [ stdin ]:4: 5: Bad file descriptor echo world6 >&6 ^~ [ stdin ]:5: 6: Bad file descriptor Error closing descriptor 6: Bad file descriptor osh I/O error: Bad file descriptor |
osh_.cc | 38 1>&2- to move file descriptor [osh_.cc stdout] Expected u'hello5\nworld6\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.cc | 39 1>&2- (Bash bug: fail to restore closed fd) [osh_.cc status] Expected 2, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 40 <> for read/write [osh_.py stdout] Expected u'line=first\nCONTENTS\nfirst\nsecond\n', got 'line=\nCONTENTS\n' [osh_.py status] Expected 0, got 1 stdout: line= CONTENTSstderr: echo first >$TMP/rw.txt ^ [ stdin ]:1: Can't open '/rw.txt': Permission denied exec 8<>$TMP/rw.txt ^~~ [ stdin ]:2: Can't open '/rw.txt': Permission denied read line <&8 ^~ [ stdin ]:3: 8: Bad file descriptor echo second 1>&8 ^~~ [ stdin ]:5: 8: Bad file descriptor cat: /rw.txt: No such file or directory |
osh_.cc | 40 <> for read/write [osh_.cc stdout] Expected u'line=first\nCONTENTS\nfirst\nsecond\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 41 <> for read/write named pipes [osh_.py stdout] Expected 'line1=first line2=second\n', got '' [osh_.py status] Expected 0, got 2 stdout: stderr: mkfifo "$TMP/f.pipe" ^~~~~~ [ stdin ]:2: 'mkfifo' not found exec 8<> "$TMP/f.pipe" ^~~ [ stdin ]:3: Can't open '/f.pipe': Permission denied echo first >&8 ^~ [ stdin ]:4: 8: Bad file descriptor echo second >&8 ^~ [ stdin ]:5: 8: Bad file descriptor read line1 <&8 ^~ [ stdin ]:6: 8: Bad file descriptor read line2 <&8 ^~ [ stdin ]:7: 8: Bad file descriptor Error closing descriptor 8: Bad file descriptor osh I/O error: Bad file descriptor |
osh_.cc | 41 <> for read/write named pipes [osh_.cc stdout] Expected 'line1=first line2=second\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: mkfifo "$TMP/f.pipe" ^~~~~~ [ stdin ]:2: 'mkfifo' not found osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 42 &>> appends stdout and stderr [osh_.py stdout] Expected 'ok\nok\nok\n', got '' [osh_.py status] Expected 0, got 2 stdout: stderr: echo "ok" > $TMP/f.txt ^ [ stdin ]:6: Can't open '/f.txt': Permission denied stdout_stderr.py &>> $TMP/f.txt ^~~ [ stdin ]:7: Can't open '/f.txt': Permission denied grep: /f.txt: No such file or directory grep: /f.txt: No such file or directory grep: /f.txt: No such file or directory |
osh_.cc | 42 &>> appends stdout and stderr [osh_.cc stdout] Expected 'ok\nok\nok\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.cc | 43 exec redirect then various builtins [osh_.cc stdout] Expected 'done\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.cc | 44 >$file touches a file [osh_.cc stdout] Expected 'status=1\nstatus=0\n', got 'status=1\n' [osh_.cc stderr] Expected u'', got "osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed.\n" [osh_.cc status] Expected 0, got -6 stdout: status=1stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.cc | 45 $(< $file) yields the contents of the file [osh_.cc stdout] Expected 'FOO\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.cc | 46 $(< file) with more statements [osh_.cc stdout] Expected 'begin\n---\nend\n---\n\n---\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
osh_.cc | 47 < file in pipeline and subshell doesn't work [osh_.cc stdout] Expected 'end\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.cc | 48 2>&1 with no command [osh_.cc stdout] Expected 'status=42\nstatus=0\n', got 'status=42\n' [osh_.cc stderr] Expected u'', got "osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed.\n" [osh_.cc status] Expected 0, got -6 stdout: status=42stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.cc | 49 2&>1 (is it a redirect or is it like a&>1) [osh_.cc stdout] Expected 'status=127\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh | 50 can't mention big file descriptor stdout: hi hi hi 100stderr: |
osh_.py | 50 can't mention big file descriptor stdout: hi hi hi 100stderr: |
osh_.cc | 50 can't mention big file descriptor [osh_.cc stdout] Expected 'hi\nhi\nhi 100\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.cc | 51 : >/dev/null 2> / (OSH regression: fail to pop fd frame) [osh_.cc stdout] Expected 'hello\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.cc | 52 echo foo >&100 (OSH regression: does not fail with invalid fd 100) [osh_.cc status] Expected 1, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.cc | 53 echo foo >&N where N is first unused fd [osh_.cc status] Expected 1, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:139: void posix::dup2(int, int): Assertion `0' failed. |
osh_.py | 54 exec {fd}>&- (OSH regression: fails to close fd) [osh_.py stdout] Expected 'foo\n', got '' [osh_.py status] Expected 0, got 1 [osh_.py stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 71, in <module> sys.exit(main(sys.argv)) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 39, in main status = pure.Main('osh', arg_r, environ, login_shell, loader, None) File "/home/andy/git/oilshell/oil/core/pure.py", line 497, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1470, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1317, in _Execute status, check_errexit = self._Dispatch(node, pipeline_st) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 626, in _Dispatch status = self._RunSimpleCommand(cmd_val, node.do_fork) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 476, in _RunSimpleCommand return self.shell_ex.RunSimpleCommand(cmd_val, do_fork) File "/home/andy/git/oilshell/oil/core/executor.py", line 188, in RunSimpleCommand status = self.RunBuiltin(builtin_id, cmd_val) File "/home/andy/git/oilshell/oil/core/executor.py", line 116, in RunBuiltin builtin_func = self.builtins[builtin_id] KeyError: 3 |
osh_.cc | 54 exec {fd}>&- (OSH regression: fails to close fd) [osh_.cc stdout] Expected 'foo\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: mycpp/mylib.h:671: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed. |