Results for redirect.test.sh

statusoshosh_.pyosh_.cc
pass 5386
ok 111
FAIL 14648
total555555
caseoshosh_.pyosh_.ccdescription
0pass FAIL FAIL >&
detailsdetails
1pass FAIL FAIL <&
detailsdetails
2pass FAIL FAIL Leading redirect
detailsdetails
3pass FAIL FAIL Nonexistent file
detailsdetails
4pass FAIL FAIL Redirect in command sub
detailsdetails
5pass FAIL FAIL Redirect in assignment
detailsdetails
6pass FAIL FAIL Redirect in function body.
detailsdetails
7pass pass FAIL Bad redirects in function body
details
8pass FAIL FAIL Redirect in function body is evaluated multiple times
detailsdetails
9pass pass pass Redirect in function body AND function call
10pass FAIL FAIL Descriptor redirect with spaces
detailsdetails
11pass FAIL FAIL Filename redirect with spaces
detailsdetails
12pass FAIL FAIL Quoted filename redirect with spaces
detailsdetails
13pass pass pass Descriptor redirect with filename
14pass FAIL FAIL redirect for loop
detailsdetails
15pass FAIL FAIL redirect subshell
detailsdetails
16pass pass pass Prefix redirect for loop -- not allowed
17pass FAIL FAIL Brace group redirect
detailsdetails
18pass FAIL FAIL Redirect echo to stderr, and then redirect all of stdout somewhere.
detailsdetails
19pass FAIL FAIL Redirect in the middle of two assignments
detailsdetails
20pass FAIL FAIL Redirect in the middle of a command
detailsdetails
21pass FAIL FAIL Named file descriptor
detailsdetails
22pass FAIL FAIL Double digit fd (20> file)
detailsdetails
23pass FAIL FAIL : 9> fdleak (OSH regression)
detailsdetails
24pass pass pass : 3>&3 (OSH regression)
25pass pass pass : 3>&3-
26pass FAIL FAIL 3>&- << EOF (OSH regression: fail to restore fds)
detailsdetails
27pass FAIL FAIL Open file on descriptor 3 and write to it many times
detailsdetails
28pass FAIL FAIL Open file on descriptor 4 and write to it many times
detailsdetails
29pass FAIL FAIL Redirect function stdout
detailsdetails
30pass FAIL FAIL Nested function stdout redirect
detailsdetails
31pass pass FAIL Redirect to empty string
details
32pass FAIL FAIL Redirect to file descriptor that's not open
detailsdetails
33pass FAIL FAIL Open descriptor with exec
detailsdetails
34pass FAIL FAIL Open multiple descriptors with exec
detailsdetails
35FAIL FAIL FAIL >| to clobber
detailsdetailsdetails
36pass FAIL FAIL &> redirects stdout and stderr
detailsdetails
37pass FAIL FAIL 1>&- to close file descriptor
detailsdetails
38pass FAIL FAIL 1>&2- to move file descriptor
detailsdetails
39pass FAIL FAIL 1>&2- (Bash bug: fail to restore closed fd)
detailsdetails
40pass FAIL FAIL <> for read/write
detailsdetails
41pass FAIL FAIL <> for read/write named pipes
detailsdetails
42pass FAIL FAIL &>> appends stdout and stderr
detailsdetails
43pass FAIL FAIL exec redirect then various builtins
detailsdetails
44pass FAIL FAIL >$file touches a file
detailsdetails
45pass FAIL FAIL $(< $file) yields the contents of the file
detailsdetails
46pass FAIL FAIL $(< file) with more statements
detailsdetails
47pass FAIL FAIL < file in pipeline and subshell doesn't work
detailsdetails
48pass FAIL FAIL 2>&1 with no command
detailsdetails
49pass FAIL FAIL 2&>1 (is it a redirect or is it like a&>1)
detailsdetails
50ok ok ok can't mention big file descriptor
detailsdetailsdetails
51pass pass pass : >/dev/null 2> / (OSH regression: fail to pop fd frame)
52pass FAIL FAIL echo foo >&100 (OSH regression: does not fail with invalid fd 100)
detailsdetails
53pass FAIL FAIL echo foo >&N where N is first unused fd
detailsdetails
54pass FAIL FAIL exec {fd}>&- (OSH regression: fails to close fd)
detailsdetails
67 passed, 3 OK, 0 not implemented, 0 BUG, 95 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

osh_.py0 >&

[osh_.py stderr] Expected 'hi\n', got ''

stdout:
hi
stderr:
osh_.cc0 >&

[osh_.cc stderr] Expected 'hi\n', got ''

stdout:
hi
stderr:
osh_.py1 <&

[osh_.py stdout] Expected '[foo]\n', got 'foo\n'
[osh_.py status] Expected 0, got 1
[osh_.py stderr] Found 'Traceback (most recent'

stdout:
foo
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 35, in main
    status = pure.Main('osh', arg_r, environ, login_shell, loader, None)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 446, 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 1464, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1336, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 581, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 489, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 495, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 476, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 3
osh_.cc1 <&

[osh_.cc stdout] Expected '[foo]\n', got 'foo\n'
[osh_.cc status] Expected 0, got -6

stdout:
foo
stderr:
osh_eval.dbg: mycpp/mylib.h:596: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed.
osh_.py2 Leading redirect

[osh_.py stdout] Expected 'hello\n', got 'hello\n(cmd_value.Argv argv:[cat] arg_spids:[15])\n'

stdout:
hello
(cmd_value.Argv argv:[cat] arg_spids:[15])
stderr:
Unhandled SimpleCommand
osh_.cc2 Leading redirect

[osh_.cc stdout] Expected 'hello\n', got 'hello\n(cmd_value.Argv argv:[cat] arg_spids:[15])\n'

stdout:
hello
(cmd_value.Argv argv:[cat] arg_spids:[15])
stderr:
Unhandled SimpleCommand
osh_.py3 Nonexistent file

[osh_.py stdout] Expected 'status=1\n', got '(cmd_value.Argv argv:[cat] arg_spids:[0])\nstatus=0\n'

stdout:
(cmd_value.Argv argv:[cat] arg_spids:[0])
status=0
stderr:
Unhandled SimpleCommand
osh_.cc3 Nonexistent file

[osh_.cc stdout] Expected 'status=1\n', got '(cmd_value.Argv argv:[cat] arg_spids:[0])\nstatus=0\n'

stdout:
(cmd_value.Argv argv:[cat] arg_spids:[0])
status=0
stderr:
Unhandled SimpleCommand
osh_.py4 Redirect in command sub

[osh_.py stderr] Expected 'foo\n', got ''

stdout:
stderr: 
osh_.cc4 Redirect in command sub

[osh_.cc stderr] Expected 'foo\n', got ''

stdout:
stderr: 
osh_.py5 Redirect in assignment

[osh_.py stdout] Expected 'FILE=\nfoo\nFOO=\n', got "FILE=\n(cmd_value.Argv argv:[cat '/no-command.txt'] arg_spids:[18 20])\nFOO=\n"

stdout:
FILE=
(cmd_value.Argv argv:[cat '/no-command.txt'] arg_spids:[18 20])
FOO=
stderr:
Unhandled SimpleCommand
osh_.cc5 Redirect in assignment

[osh_.cc stdout] Expected 'FILE=\nfoo\nFOO=\n', got "FILE=\n(cmd_value.Argv argv:[cat '/no-command.txt'] arg_spids:[18 20])\nFOO=\n"

stdout:
FILE=
(cmd_value.Argv argv:[cat '/no-command.txt'] arg_spids:[18 20])
FOO=
stderr:
Unhandled SimpleCommand
osh_.py6 Redirect in function body.

[osh_.py stdout] Expected u'', got 'hi\n'
[osh_.py stderr] Expected u'hi\n', got ''

stdout:
hi
stderr:
osh_.cc6 Redirect in function body.

[osh_.cc stdout] Expected u'', got 'hi\n'
[osh_.cc stderr] Expected u'hi\n', got ''

stdout:
hi
stderr:
osh_.cc7 Bad redirects in function body

[osh_.cc stdout] Expected 'status=1\n', got 'hi\nstatus=0\n'

stdout:
hi
status=0
stderr:
osh_.py8 Redirect in function body is evaluated multiple times

[osh_.py stdout] Expected 'i=2\n__\nfile 1\n__\nfile 2\n', got "file 1\nfile 2\ni=2\n__\n(cmd_value.Argv argv:[cat '/file0'] arg_spids:[44 46])\n__\n(cmd_value.Argv argv:[cat '/file1'] arg_spids:[53 55])\n"

stdout:
file 1
file 2
i=2
__
(cmd_value.Argv argv:[cat '/file0'] arg_spids:[44 46])
__
(cmd_value.Argv argv:[cat '/file1'] arg_spids:[53 55])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.cc8 Redirect in function body is evaluated multiple times

[osh_.cc stdout] Expected 'i=2\n__\nfile 1\n__\nfile 2\n', got "file 1\nfile 2\ni=2\n__\n(cmd_value.Argv argv:[cat '/file0'] arg_spids:[44 46])\n__\n(cmd_value.Argv argv:[cat '/file1'] arg_spids:[53 55])\n"

stdout:
file 1
file 2
i=2
__
(cmd_value.Argv argv:[cat '/file0'] arg_spids:[44 46])
__
(cmd_value.Argv argv:[cat '/file1'] arg_spids:[53 55])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.py10 Descriptor redirect with spaces

[osh_.py stderr] Expected u'one\ntwo 1\nthree\n', got ''

stdout:
one
two 1
three
stderr:
osh_.cc10 Descriptor redirect with spaces

[osh_.cc stderr] Expected u'one\ntwo 1\nthree\n', got ''

stdout:
one
two 1
three
stderr:
osh_.py11 Filename redirect with spaces

[osh_.py stdout] Expected 'two\n', got "two\n(cmd_value.Argv argv:[cat '/file-redir1.txt'] arg_spids:[9 11])\n"

stdout:
two
(cmd_value.Argv argv:[cat '/file-redir1.txt'] arg_spids:[9 11])
stderr:
Unhandled SimpleCommand
osh_.cc11 Filename redirect with spaces

[osh_.cc stdout] Expected 'two\n', got "two\n(cmd_value.Argv argv:[cat '/file-redir1.txt'] arg_spids:[9 11])\n"

stdout:
two
(cmd_value.Argv argv:[cat '/file-redir1.txt'] arg_spids:[9 11])
stderr:
Unhandled SimpleCommand
osh_.py12 Quoted filename redirect with spaces

[osh_.py stdout] Expected 'two 1\n', got "two 1\n(cmd_value.Argv argv:[cat '/file-redir2.txt'] arg_spids:[11 13])\n"

stdout:
two 1
(cmd_value.Argv argv:[cat '/file-redir2.txt'] arg_spids:[11 13])
stderr:
Unhandled SimpleCommand
osh_.cc12 Quoted filename redirect with spaces

[osh_.cc stdout] Expected 'two 1\n', got "two 1\n(cmd_value.Argv argv:[cat '/file-redir2.txt'] arg_spids:[11 13])\n"

stdout:
two 1
(cmd_value.Argv argv:[cat '/file-redir2.txt'] arg_spids:[11 13])
stderr:
Unhandled SimpleCommand
osh_.py14 redirect for loop

[osh_.py stdout] Expected u'1\n2\n3\n', got "(cmd_value.Argv argv:[cat '/redirect-for-loop.txt'] arg_spids:[26 28])\n"

stdout:
(cmd_value.Argv argv:[cat '/redirect-for-loop.txt'] arg_spids:[26 28])
stderr:
Unhandled SimpleCommand
osh_.cc14 redirect for loop

[osh_.cc stdout] Expected u'1\n2\n3\n', got "(cmd_value.Argv argv:[cat '/redirect-for-loop.txt'] arg_spids:[26 28])\n"

stdout:
(cmd_value.Argv argv:[cat '/redirect-for-loop.txt'] arg_spids:[26 28])
stderr:
Unhandled SimpleCommand
osh_.py15 redirect subshell

[osh_.py stderr] Expected 'foo\n', got ''

stdout:
stderr: 
osh_.cc15 redirect subshell

[osh_.cc stderr] Expected 'foo\n', got ''

stdout:
stderr: 
osh_.py17 Brace group redirect

[osh_.py stdout] Expected '15\n', got 'block-redirect\n'

stdout:
block-redirect
stderr:
osh_.cc17 Brace group redirect

[osh_.cc stdout] Expected '15\n', got 'block-redirect\n'

stdout:
block-redirect
stderr:
osh_.py18 Redirect echo to stderr, and then redirect all of stdout somewhere.

[osh_.py stdout] Expected '10\n', got 'foo\n012345789\n'
[osh_.py stderr] Expected 'foo\n', got ''

stdout:
foo
012345789
stderr:
osh_.cc18 Redirect echo to stderr, and then redirect all of stdout somewhere.

[osh_.cc stdout] Expected '10\n', got 'foo\n012345789\n'
[osh_.cc stderr] Expected 'foo\n', got ''

stdout:
foo
012345789
stderr:
osh_.py19 Redirect in the middle of two assignments

[osh_.py stdout] Expected u'bar\nfoo\n', got "(cmd_value.Argv argv:[printenv.py FOO BAR] arg_spids:[10 12 14])\n(cmd_value.Argv argv:[tac '/out.txt'] arg_spids:[16 18])\n"

stdout:
(cmd_value.Argv argv:[printenv.py FOO BAR] arg_spids:[10 12 14])
(cmd_value.Argv argv:[tac '/out.txt'] arg_spids:[16 18])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.cc19 Redirect in the middle of two assignments

[osh_.cc stdout] Expected u'bar\nfoo\n', got "(cmd_value.Argv argv:[printenv.py FOO BAR] arg_spids:[10 12 14])\n(cmd_value.Argv argv:[tac '/out.txt'] arg_spids:[16 18])\n"

stdout:
(cmd_value.Argv argv:[printenv.py FOO BAR] arg_spids:[10 12 14])
(cmd_value.Argv argv:[tac '/out.txt'] arg_spids:[16 18])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.py20 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 "1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 (cmd_value.Argv argv:[cat '/out'] arg_spids:[84 86])\n"

stdout:
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 (cmd_value.Argv argv:[cat '/out'] arg_spids:[84 86])
stderr:
Unhandled SimpleCommand
osh_.cc20 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 "1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 (cmd_value.Argv argv:[cat '/out'] arg_spids:[84 86])\n"

stdout:
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 (cmd_value.Argv argv:[cat '/out'] arg_spids:[84 86])
stderr:
Unhandled SimpleCommand
osh_.py21 Named file descriptor

[osh_.py stdout] Expected 'named-fd-contents\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 35, in main
    status = pure.Main('osh', arg_r, environ, login_shell, loader, None)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 446, 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 1464, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1336, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 581, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 489, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 495, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 476, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 3
osh_.cc21 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:596: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed.
osh_.py22 Double digit fd (20> file)

[osh_.py stdout] Expected 'hello20\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 35, in main
    status = pure.Main('osh', arg_r, environ, login_shell, loader, None)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 446, 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 1464, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1336, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 581, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 489, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 495, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 476, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 3
osh_.cc22 Double digit fd (20> file)

[osh_.cc stdout] Expected 'hello20\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: mycpp/mylib.h:596: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed.
osh_.py23 : 9> fdleak (OSH regression)

[osh_.py stdout] Expected u'', got "(cmd_value.Argv argv:[cat '/fd.txt'] arg_spids:[20 22])\n"

stdout:
(cmd_value.Argv argv:[cat '/fd.txt'] arg_spids:[20 22])
stderr:
Unhandled SimpleCommand
osh_.cc23 : 9> fdleak (OSH regression)

[osh_.cc stdout] Expected u'', got "(cmd_value.Argv argv:[cat '/fd.txt'] arg_spids:[20 22])\n"

stdout:
(cmd_value.Argv argv:[cat '/fd.txt'] arg_spids:[20 22])
stderr:
Unhandled SimpleCommand
osh_.py26 3>&- << EOF (OSH regression: fail to restore fds)

[osh_.py stdout] Expected 'hello\nworld\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 35, in main
    status = pure.Main('osh', arg_r, environ, login_shell, loader, None)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 446, 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 1464, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1336, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 581, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 489, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 495, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 476, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 3
osh_.cc26 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: mycpp/mylib.h:596: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed.
osh_.py27 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: 
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 35, in main
    status = pure.Main('osh', arg_r, environ, login_shell, loader, None)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 446, 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 1464, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1336, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 581, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 489, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 495, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 476, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 3
osh_.cc27 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: mycpp/mylib.h:596: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed.
osh_.py28 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 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 35, in main
    status = pure.Main('osh', arg_r, environ, login_shell, loader, None)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 446, 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 1464, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1336, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 581, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 489, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 495, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 476, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 3
osh_.cc28 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: mycpp/mylib.h:596: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed.
osh_.py29 Redirect function stdout

[osh_.py stdout] Expected u'one\ntwo\n', got "one\ntwo\n(cmd_value.Argv argv:[cat '/redirect-func.txt'] arg_spids:[25 27])\n"

stdout:
one
two
(cmd_value.Argv argv:[cat '/redirect-func.txt'] arg_spids:[25 27])
stderr:
Unhandled SimpleCommand
osh_.cc29 Redirect function stdout

[osh_.cc stdout] Expected u'one\ntwo\n', got "one\ntwo\n(cmd_value.Argv argv:[cat '/redirect-func.txt'] arg_spids:[25 27])\n"

stdout:
one
two
(cmd_value.Argv argv:[cat '/redirect-func.txt'] arg_spids:[25 27])
stderr:
Unhandled SimpleCommand
osh_.py30 Nested function stdout redirect

[osh_.py stdout] Expected u'i1\ni2\n--\no1\no2\n', got "o1\ni1\ni2\no2\n(cmd_value.Argv argv:[cat '/inner.txt'] arg_spids:[51 53])\n--\n(cmd_value.Argv argv:[cat '/outer.txt'] arg_spids:[60 62])\n"

stdout:
o1
i1
i2
o2
(cmd_value.Argv argv:[cat '/inner.txt'] arg_spids:[51 53])
--
(cmd_value.Argv argv:[cat '/outer.txt'] arg_spids:[60 62])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.cc30 Nested function stdout redirect

[osh_.cc stdout] Expected u'i1\ni2\n--\no1\no2\n', got "o1\ni1\ni2\no2\n(cmd_value.Argv argv:[cat '/inner.txt'] arg_spids:[51 53])\n--\n(cmd_value.Argv argv:[cat '/outer.txt'] arg_spids:[60 62])\n"

stdout:
o1
i1
i2
o2
(cmd_value.Argv argv:[cat '/inner.txt'] arg_spids:[51 53])
--
(cmd_value.Argv argv:[cat '/outer.txt'] arg_spids:[60 62])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.cc31 Redirect to empty string

[osh_.cc stdout] Expected 'result=1\n', got 's\nresult=0\ns\nDONE\n'
[osh_.cc status] Expected 1, got 0

stdout:
s
result=0
s
DONE
stderr:
osh_.py32 Redirect to file descriptor that's not open

[osh_.py status] Expected 1, got 0

stdout:
hi
stderr:
osh_.cc32 Redirect to file descriptor that's not open

[osh_.cc status] Expected 1, got 0

stdout:
hi
stderr:
osh_.py33 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 35, in main
    status = pure.Main('osh', arg_r, environ, login_shell, loader, None)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 446, 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 1464, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1336, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 581, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 489, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 495, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 476, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 3
osh_.cc33 Open descriptor with exec

[osh_.cc stdout] Expected 'hi\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: mycpp/mylib.h:596: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed.
osh_.py34 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 35, in main
    status = pure.Main('osh', arg_r, environ, login_shell, loader, None)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 446, 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 1464, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1336, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 581, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 489, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 495, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 476, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 3
osh_.cc34 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: mycpp/mylib.h:596: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed.
osh35 >| to clobber

[osh stdout] Expected u'status=1\nXX\nZZ\n', got 'status=0\nYY\nZZ\n'

stdout:
status=0
YY
ZZ
stderr:
osh_.py35 >| to clobber

[osh_.py stdout] Expected u'status=1\nXX\nZZ\n', got "XX\nYY\nstatus=0\n(cmd_value.Argv argv:[cat '/c.txt'] arg_spids:[32 34])\nZZ\n(cmd_value.Argv argv:[cat '/c.txt'] arg_spids:[46 48])\n"

stdout:
XX
YY
status=0
(cmd_value.Argv argv:[cat '/c.txt'] arg_spids:[32 34])
ZZ
(cmd_value.Argv argv:[cat '/c.txt'] arg_spids:[46 48])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.cc35 >| to clobber

[osh_.cc stdout] Expected u'status=1\nXX\nZZ\n', got "XX\nYY\nstatus=0\n(cmd_value.Argv argv:[cat '/c.txt'] arg_spids:[32 34])\nZZ\n(cmd_value.Argv argv:[cat '/c.txt'] arg_spids:[46 48])\n"

stdout:
XX
YY
status=0
(cmd_value.Argv argv:[cat '/c.txt'] arg_spids:[32 34])
ZZ
(cmd_value.Argv argv:[cat '/c.txt'] arg_spids:[46 48])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.py36 &> redirects stdout and stderr

[osh_.py stdout] Expected 'ok\nok\n', got "(cmd_value.Argv argv:[stdout_stderr.py] arg_spids:[0])\n(cmd_value.Argv argv:[grep STDOUT '/f.txt'] arg_spids:[7 9 11])\nok\n(cmd_value.Argv argv:[grep STDERR '/f.txt'] arg_spids:[25 27 29])\nok\n"

stdout:
(cmd_value.Argv argv:[stdout_stderr.py] arg_spids:[0])
(cmd_value.Argv argv:[grep STDOUT '/f.txt'] arg_spids:[7 9 11])
ok
(cmd_value.Argv argv:[grep STDERR '/f.txt'] arg_spids:[25 27 29])
ok
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.cc36 &> redirects stdout and stderr

[osh_.cc stdout] Expected 'ok\nok\n', got "(cmd_value.Argv argv:[stdout_stderr.py] arg_spids:[0])\n(cmd_value.Argv argv:[grep STDOUT '/f.txt'] arg_spids:[7 9 11])\nok\n(cmd_value.Argv argv:[grep STDERR '/f.txt'] arg_spids:[25 27 29])\nok\n"

stdout:
(cmd_value.Argv argv:[stdout_stderr.py] arg_spids:[0])
(cmd_value.Argv argv:[grep STDOUT '/f.txt'] arg_spids:[7 9 11])
ok
(cmd_value.Argv argv:[grep STDERR '/f.txt'] arg_spids:[25 27 29])
ok
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.py37 1>&- to close file descriptor

[osh_.py stdout] Expected u'hello\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 35, in main
    status = pure.Main('osh', arg_r, environ, login_shell, loader, None)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 446, 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 1464, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1336, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 581, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 489, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 495, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 476, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 3
osh_.cc37 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: mycpp/mylib.h:596: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed.
osh_.py38 1>&2- to move file descriptor

[osh_.py stdout] Expected u'hello5\nworld6\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 35, in main
    status = pure.Main('osh', arg_r, environ, login_shell, loader, None)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 446, 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 1464, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1336, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 581, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 489, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 495, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 476, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 3
osh_.cc38 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: mycpp/mylib.h:596: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed.
osh_.py39 1>&2- (Bash bug: fail to restore closed fd)

[osh_.py status] Expected 2, 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 35, in main
    status = pure.Main('osh', arg_r, environ, login_shell, loader, None)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 446, 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 1464, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1336, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 581, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 489, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 495, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 476, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 3
osh_.cc39 1>&2- (Bash bug: fail to restore closed fd)

[osh_.cc status] Expected 2, got -6

stdout:
stderr: 
osh_eval.dbg: mycpp/mylib.h:596: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed.
osh_.py40 <> for read/write

[osh_.py stdout] Expected u'line=first\nCONTENTS\nfirst\nsecond\n', got 'first\n'
[osh_.py status] Expected 0, got 1
[osh_.py stderr] Found 'Traceback (most recent'

stdout:
first
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 35, in main
    status = pure.Main('osh', arg_r, environ, login_shell, loader, None)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 446, 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 1464, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1336, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 581, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 489, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 495, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 476, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 3
osh_.cc40 <> for read/write

[osh_.cc stdout] Expected u'line=first\nCONTENTS\nfirst\nsecond\n', got 'first\n'
[osh_.cc status] Expected 0, got -6

stdout:
first
stderr:
osh_eval.dbg: mycpp/mylib.h:596: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed.
osh_.py41 <> for read/write named pipes

[osh_.py stdout] Expected 'line1=first line2=second\n', got "(cmd_value.Argv argv:[rm -f '/f.pipe'] arg_spids:[0 2 4])\n(cmd_value.Argv argv:[mkfifo '/f.pipe'] arg_spids:[9 11])\n"
[osh_.py status] Expected 0, got 1
[osh_.py stderr] Found 'Traceback (most recent'

stdout:
(cmd_value.Argv argv:[rm -f '/f.pipe'] arg_spids:[0 2 4])
(cmd_value.Argv argv:[mkfifo '/f.pipe'] arg_spids:[9 11])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
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 35, in main
    status = pure.Main('osh', arg_r, environ, login_shell, loader, None)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 446, 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 1464, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1336, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 581, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 489, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 495, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 476, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 3
osh_.cc41 <> for read/write named pipes

[osh_.cc stdout] Expected 'line1=first line2=second\n', got "(cmd_value.Argv argv:[rm -f '/f.pipe'] arg_spids:[0 2 4])\n(cmd_value.Argv argv:[mkfifo '/f.pipe'] arg_spids:[9 11])\n"
[osh_.cc status] Expected 0, got -6

stdout:
(cmd_value.Argv argv:[rm -f '/f.pipe'] arg_spids:[0 2 4])
(cmd_value.Argv argv:[mkfifo '/f.pipe'] arg_spids:[9 11])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_eval.dbg: mycpp/mylib.h:596: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed.
osh_.py42 &>> appends stdout and stderr

[osh_.py stdout] Expected 'ok\nok\nok\n', got "ok\n(cmd_value.Argv argv:[stdout_stderr.py] arg_spids:[32])\n(cmd_value.Argv argv:[grep ok '/f.txt'] arg_spids:[39 41 43])\nok\n(cmd_value.Argv argv:[grep STDOUT '/f.txt'] arg_spids:[57 59 61])\nok\n(cmd_value.Argv argv:[grep STDERR '/f.txt'] arg_spids:[75 77 79])\nok\n"

stdout:
ok
(cmd_value.Argv argv:[stdout_stderr.py] arg_spids:[32])
(cmd_value.Argv argv:[grep ok '/f.txt'] arg_spids:[39 41 43])
ok
(cmd_value.Argv argv:[grep STDOUT '/f.txt'] arg_spids:[57 59 61])
ok
(cmd_value.Argv argv:[grep STDERR '/f.txt'] arg_spids:[75 77 79])
ok
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.cc42 &>> appends stdout and stderr

[osh_.cc stdout] Expected 'ok\nok\nok\n', got "ok\n(cmd_value.Argv argv:[stdout_stderr.py] arg_spids:[32])\n(cmd_value.Argv argv:[grep ok '/f.txt'] arg_spids:[39 41 43])\nok\n(cmd_value.Argv argv:[grep STDOUT '/f.txt'] arg_spids:[57 59 61])\nok\n(cmd_value.Argv argv:[grep STDERR '/f.txt'] arg_spids:[75 77 79])\nok\n"

stdout:
ok
(cmd_value.Argv argv:[stdout_stderr.py] arg_spids:[32])
(cmd_value.Argv argv:[grep ok '/f.txt'] arg_spids:[39 41 43])
ok
(cmd_value.Argv argv:[grep STDOUT '/f.txt'] arg_spids:[57 59 61])
ok
(cmd_value.Argv argv:[grep STDERR '/f.txt'] arg_spids:[75 77 79])
ok
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.py43 exec redirect then various builtins

[osh_.py stdout] Expected 'done\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 35, in main
    status = pure.Main('osh', arg_r, environ, login_shell, loader, None)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 446, 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 1464, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1336, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 581, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 489, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 495, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 476, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 3
osh_.cc43 exec redirect then various builtins

[osh_.cc stdout] Expected 'done\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: mycpp/mylib.h:596: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed.
osh_.py44 >$file touches a file

[osh_.py stdout] Expected 'status=1\nstatus=0\n', got '(cmd_value.Argv argv:[rm -f myfile] arg_spids:[0 2 4])\nstatus=0\n'
[osh_.py stderr] Expected u'', got 'Unhandled SimpleCommand\nTraceback (most recent call last):\n File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 71, in <module>\n sys.exit(main(sys.argv))\n File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 35, in main\n status = pure.Main(\'osh\', arg_r, environ, login_shell, loader, None)\n File "/home/andy/git/oilshell/oil/core/pure.py", line 446, in Main\n cmd_flags=cmd_eval.IsMainProgram)\n File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch\n is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags)\n File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1464, in ExecuteAndCatch\n status = self._Execute(node)\n File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1336, in _Execute\n status, check_errexit = self._Dispatch(node)\n File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 581, in _Dispatch\n status = self._RunSimpleCommand(cmd_val, node.do_fork)\n File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 489, in _RunSimpleCommand\n return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)\n File "/home/andy/git/oilshell/oil/core/pure.py", line 491, in RunSimpleCommand\n arg0 = argv[0]\nIndexError: list index out of range\n'
[osh_.py status] Expected 0, got 1
[osh_.py stderr] Found 'Traceback (most recent'

stdout:
(cmd_value.Argv argv:[rm -f myfile] arg_spids:[0 2 4])
status=0
stderr:
Unhandled SimpleCommand
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 35, in main
    status = pure.Main('osh', arg_r, environ, login_shell, loader, None)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 446, 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 1464, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1336, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 581, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 489, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 491, in RunSimpleCommand
    arg0 = argv[0]
IndexError: list index out of range
osh_.cc44 >$file touches a file

[osh_.cc stdout] Expected 'status=1\nstatus=0\n', got '(cmd_value.Argv argv:[rm -f myfile] arg_spids:[0 2 4])\n'
[osh_.cc stderr] Expected u'', got "Unhandled SimpleCommand\nosh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed.\n"
[osh_.cc status] Expected 0, got -6

stdout:
(cmd_value.Argv argv:[rm -f myfile] arg_spids:[0 2 4])
stderr:
Unhandled SimpleCommand
osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed.
osh_.py45 $(< $file) yields the contents of the file

[osh_.py stdout] Expected 'FOO\n', got 'FOO\n\n'

stdout:
FOO

stderr:
osh_.cc45 $(< $file) yields the contents of the file

[osh_.cc stdout] Expected 'FOO\n', got 'FOO\n\n'

stdout:
FOO

stderr:
osh_.py46 $(< file) with more statements

[osh_.py stdout] Expected 'begin\n---\nend\n---\n\n---\n', got '\n---\n\n---\n\n---\n'

stdout:
---

---

---
stderr:
osh_.cc46 $(< file) with more statements

[osh_.cc stdout] Expected 'begin\n---\nend\n---\n\n---\n', got '\n---\n\n---\n\n---\n'

stdout:
---

---

---
stderr:
osh_.py47 < file in pipeline and subshell doesn't work

[osh_.py stdout] Expected 'end\n', got 'FOO\nend\n'

stdout:
FOO
end
stderr:
osh_.cc47 < file in pipeline and subshell doesn't work

[osh_.cc stdout] Expected 'end\n', got 'FOO\nend\n'

stdout:
FOO
end
stderr:
osh_.py48 2>&1 with no command

[osh_.py stdout] Expected 'status=42\nstatus=0\n', got 'status=0\n'
[osh_.py stderr] Expected u'', got 'Traceback (most recent call last):\n File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 71, in <module>\n sys.exit(main(sys.argv))\n File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 35, in main\n status = pure.Main(\'osh\', arg_r, environ, login_shell, loader, None)\n File "/home/andy/git/oilshell/oil/core/pure.py", line 446, in Main\n cmd_flags=cmd_eval.IsMainProgram)\n File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch\n is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags)\n File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1464, in ExecuteAndCatch\n status = self._Execute(node)\n File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1336, in _Execute\n status, check_errexit = self._Dispatch(node)\n File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 581, in _Dispatch\n status = self._RunSimpleCommand(cmd_val, node.do_fork)\n File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 489, in _RunSimpleCommand\n return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)\n File "/home/andy/git/oilshell/oil/core/pure.py", line 491, in RunSimpleCommand\n arg0 = argv[0]\nIndexError: list index out of range\n'
[osh_.py status] Expected 0, got 1
[osh_.py stderr] Found 'Traceback (most recent'

stdout:
status=0
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 35, in main
    status = pure.Main('osh', arg_r, environ, login_shell, loader, None)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 446, 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 1464, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1336, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 581, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 489, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 491, in RunSimpleCommand
    arg0 = argv[0]
IndexError: list index out of range
osh_.cc48 2>&1 with no command

[osh_.cc stdout] Expected 'status=42\nstatus=0\n', got 'status=0\nstatus=431827776\n'

stdout:
status=0
status=431827776
stderr:
osh_.py49 2&>1 (is it a redirect or is it like a&>1)

[osh_.py stdout] Expected 'status=127\n', got '(cmd_value.Argv argv:[2] arg_spids:[0])\nstatus=0\n'

stdout:
(cmd_value.Argv argv:[2] arg_spids:[0])
status=0
stderr:
Unhandled SimpleCommand
osh_.cc49 2&>1 (is it a redirect or is it like a&>1)

[osh_.cc stdout] Expected 'status=127\n', got '(cmd_value.Argv argv:[2] arg_spids:[0])\nstatus=0\n'

stdout:
(cmd_value.Argv argv:[2] arg_spids:[0])
status=0
stderr:
Unhandled SimpleCommand
osh50 can't mention big file descriptor

stdout:
hi
hi
hi 100
stderr:
osh_.py50 can't mention big file descriptor

stdout:
hi
hi
hi 100
stderr:
osh_.cc50 can't mention big file descriptor

stdout:
hi
hi
hi 100
stderr:
osh_.py52 echo foo >&100 (OSH regression: does not fail with invalid fd 100)

[osh_.py stdout] Expected u'', got 'foo\n'
[osh_.py status] Expected 1, got 0

stdout:
foo
stderr:
osh_.cc52 echo foo >&100 (OSH regression: does not fail with invalid fd 100)

[osh_.cc stdout] Expected u'', got 'foo\n'
[osh_.cc status] Expected 1, got 0

stdout:
foo
stderr:
osh_.py53 echo foo >&N where N is first unused fd

[osh_.py stdout] Expected u'', got 'foo\n'
[osh_.py status] Expected 1, got 0

stdout:
foo
stderr:
osh_.cc53 echo foo >&N where N is first unused fd

[osh_.cc stdout] Expected u'', got 'foo\n'
[osh_.cc status] Expected 1, got 0

stdout:
foo
stderr:
osh_.py54 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 35, in main
    status = pure.Main('osh', arg_r, environ, login_shell, loader, None)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 446, 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 1464, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1336, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 581, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 489, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 495, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/core/pure.py", line 476, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 3
osh_.cc54 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:596: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed.