Results for process-sub.test.sh

statusoshosh_.pyosh_.cc
pass 920
FAIL 079
total999
caseoshosh_.pyosh_.ccdescription
0pass FAIL FAIL Process sub input
detailsdetails
1pass FAIL FAIL Process sub from external process to stdin
detailsdetails
2pass FAIL FAIL Process sub from shell to stdin
detailsdetails
3pass FAIL FAIL Non-linear pipeline with >()
detailsdetails
4pass pass FAIL $(<file) idiom with process sub
details
5pass FAIL FAIL status code is available
detailsdetails
6pass pass FAIL shopt -s process_sub_fail
details
7pass FAIL FAIL process subs and pipelines together
detailsdetails
8pass FAIL FAIL process sub in background &
detailsdetails
11 passed, 0 OK, 0 not implemented, 0 BUG, 16 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh_.py0 Process sub input

[osh_.py stdout] Expected '1\n2\n2\n3\n', got ''

stdout:
stderr: 
  cat <(head -n 2 $f) <(tail -n 2 $f)
        ^~~~
[ stdin ]:3: 'head' not found
  cat <(head -n 2 $f) <(tail -n 2 $f)
                        ^~~~
[ stdin ]:3: 'tail' not found
osh_.cc0 Process sub input

[osh_.cc stdout] Expected '1\n2\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_.py1 Process sub from external process to stdin

[osh_.py stdout] Expected '3\n2\n1\n', got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  seq 3 > >(tac)
  ^~~
[ stdin ]:1: 'seq' not found
  seq 3 > >(tac)
            ^~~
[ stdin ]:1: 'tac' not found
osh_.cc1 Process sub from external process to stdin

[osh_.cc stdout] Expected '3\n2\n1\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_.py2 Process sub from shell to stdin

[osh_.py stdout] Expected '3\n2\n1\n', got ''

stdout:
stderr: 
  { echo 1; echo 2; echo 3; } > >(tac)
                                  ^~~
[ stdin ]:1: 'tac' not found
osh_.cc2 Process sub from shell to stdin

[osh_.cc stdout] Expected '3\n2\n1\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_.py3 Non-linear pipeline with >()

[osh_.py stdout] Expected 'OUT\nwarning: e2\no2\no1\n', got ''
[osh_.py status] Expected 0, got 1
[osh_.py stderr] Found 'Traceback (most recent'

stdout:
stderr: 
  stdout_stderr 2> >(grep warning) | tac >$TMP/out.txt
                                         ^
[ stdin ]:10: Can't open '/out.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 223, in RunSimpleCommand
    return 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: 32
osh_.cc3 Non-linear pipeline with >()

[osh_.cc stdout] Expected 'OUT\nwarning: e2\no2\no1\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_.cc4 $(<file) idiom with process sub

[osh_.cc stdout] Expected 'FOO\nhi\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_.py5 status code is available

[osh_.py stdout] Expected '1\n2\n1\n2\n3\nstatus=2 3\ndone\n', got 'status=2 3\ndone\n'

stdout:
status=2 3
done
stderr:
  cat <(seq 2; exit 2) <(seq 3; exit 3)
        ^~~
[ stdin ]:1: 'seq' not found
  cat <(seq 2; exit 2) <(seq 3; exit 3)
                         ^~~
[ stdin ]:1: 'seq' not found
osh_.cc5 status code is available

[osh_.cc stdout] Expected '1\n2\n1\n2\n3\nstatus=2 3\ndone\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_.cc6 shopt -s process_sub_fail

[osh_.cc stdout] Expected 'a\nb\nstatus=0 ps=2 3\n__\na\nb\nstatus=3 ps=2 3\na\nb\n', got ''
[osh_.cc status] Expected 3, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.py7 process subs and pipelines together

[osh_.py stdout] Expected '1\n2\n1\n2\n3\nstatus=4\nprocess_sub=2 3\npipeline=0 4\n__\n', got 'status=4\nprocess_sub=2 3\npipeline=0 4\n__\n'

stdout:
status=4
process_sub=2 3
pipeline=0 4
__
stderr:
      cat <(seq 2; exit 2) <(seq 3; exit 3)
            ^~~
[ stdin ]:4: 'seq' not found
    cat <(seq 1; exit 1) | {
          ^~~
[ stdin ]:3: 'seq' not found
      cat <(seq 2; exit 2) <(seq 3; exit 3)
                             ^~~
[ stdin ]:4: 'seq' not found
osh_.cc7 process subs and pipelines together

[osh_.cc stdout] Expected '1\n2\n1\n2\n3\nstatus=4\nprocess_sub=2 3\npipeline=0 4\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_.py8 process sub in background &

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

stdout:
stderr: 
[%1] Started PID 14028
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 972, in _Dispatch
    status = self._ExecuteList(node.children)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1373, in _ExecuteList
    status = self._Execute(child)
  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 223, in RunSimpleCommand
    return 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: 32
  cat <(seq 3; sleep 0.1) & wait
        ^~~
[ stdin ]:1: 'seq' not found
osh_.cc8 process sub in background &

[osh_.cc stdout] Expected '1\n2\n3\nsync\nfork\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
[%1] Started PID 14072
osh_eval.dbg: mycpp/mylib.h:670: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed.
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.