Results for introspect.test.sh

statusoshosh_.pyosh_.cc
pass 1063
FAIL 047
total101010
caseoshosh_.pyosh_.ccdescription
0pass pass FAIL ${FUNCNAME[@]} array
details
1pass FAIL FAIL FUNCNAME with source (scalar or array)
detailsdetails
2pass FAIL FAIL BASH_SOURCE and BASH_LINENO scalar or array (e.g. for virtualenv)
detailsdetails
3pass pass FAIL ${FUNCNAME} with prefix/suffix operators
details
4pass pass pass operators on FUNCNAME not allowed by default
5pass pass pass ${FUNCNAME} and "set -u" (OSH regression)
6pass pass pass $((BASH_LINENO)) (scalar form in arith)
7pass FAIL FAIL ${BASH_SOURCE[@]} with source and function name
detailsdetails
8pass FAIL FAIL ${BASH_SOURCE[@]} with line numbers
detailsdetails
9pass pass FAIL ${BASH_LINENO[@]} is a stack of line numbers for function calls
details
19 passed, 0 OK, 0 not implemented, 0 BUG, 11 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh_.cc0 ${FUNCNAME[@]} array

[osh_.cc stdout] Expected "['f']\n['g', 'f']\n['f']\n", got "['f']\n['f']\n['g', 'f']\n"
[osh_.cc status] Expected 0, got 255

stdout:
['f']
['f']
['g', 'f']
stderr:
dumb_alloc:
	gNumNew = 2170
	gNumDelete = 196
	gMemPos = 73376

	gNumMalloc = 164
	gNumFree = 0
	gMemPos2 = 11200
osh_.py1 FUNCNAME with source (scalar or array)

[osh_.py stdout] Expected "[' @', 'source', 'f', 'g']\n[' 0', 'source']\n['${}', 'source']\n[' $', 'source']\n-----\n[' @', 'source']\n[' 0', 'source']\n['${}', 'source']\n[' $', 'source']\n-----\n[]\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 68, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 36, in main
    None)
  File "/home/andy/git/oilshell/oil/core/shell_native.py", line 476, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 324, 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 1498, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1345, in _Execute
    status, check_errexit = self._Dispatch(node, pipeline_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 623, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 477, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 218, in RunSimpleCommand
    status = self.cmd_ev.RunProc(proc_node, argv[1:])
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1642, in RunProc
    status = self._Execute(proc.body)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1345, in _Execute
    status, check_errexit = self._Dispatch(node, pipeline_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 998, in _Dispatch
    status = self._ExecuteList(node.children)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1401, in _ExecuteList
    status = self._Execute(child)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1345, in _Execute
    status, check_errexit = self._Dispatch(node, pipeline_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 623, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 477, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 218, in RunSimpleCommand
    status = self.cmd_ev.RunProc(proc_node, argv[1:])
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1642, in RunProc
    status = self._Execute(proc.body)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1345, in _Execute
    status, check_errexit = self._Dispatch(node, pipeline_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 998, in _Dispatch
    status = self._ExecuteList(node.children)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1401, in _ExecuteList
    status = self._Execute(child)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1345, in _Execute
    status, check_errexit = self._Dispatch(node, pipeline_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 623, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 477, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 195, in RunSimpleCommand
    status = self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 123, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 2
osh_.cc1 FUNCNAME with source (scalar or array)

[osh_.cc stdout] Expected "[' @', 'source', 'f', 'g']\n[' 0', 'source']\n['${}', 'source']\n[' $', 'source']\n-----\n[' @', 'source']\n[' 0', 'source']\n['${}', 'source']\n[' $', 'source']\n-----\n[]\n", got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: mycpp/mylib.h:674: V Dict<K, V>::index(K) [with K = int; V = vm::_Builtin*]: Assertion `0' failed.
osh_.py2 BASH_SOURCE and BASH_LINENO scalar or array (e.g. for virtualenv)

[osh_.py stdout] Expected "['']\n['']\n['']\n['']\n['']\n['']\n__\n['spec/testdata/bash-source-string.sh']\n['spec/testdata/bash-source-string.sh']\n['11']\n['11']\n____\n['spec/testdata/bash-source-string2.sh']\n['spec/testdata/bash-source-string2.sh']\n['11']\n['11']\n", got "['']\n['']\n['']\n['']\n['']\n['']\n__\n"
[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 68, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 36, in main
    None)
  File "/home/andy/git/oilshell/oil/core/shell_native.py", line 476, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 324, 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 1498, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1345, in _Execute
    status, check_errexit = self._Dispatch(node, pipeline_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 623, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 477, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 224, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 123, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 31
osh_.cc2 BASH_SOURCE and BASH_LINENO scalar or array (e.g. for virtualenv)

[osh_.cc stdout] Expected "['']\n['']\n['']\n['']\n['']\n['']\n__\n['spec/testdata/bash-source-string.sh']\n['spec/testdata/bash-source-string.sh']\n['11']\n['11']\n____\n['spec/testdata/bash-source-string2.sh']\n['spec/testdata/bash-source-string2.sh']\n['11']\n['11']\n", got "['']\n['']\n['']\n['']\n['']\n['']\n"
[osh_.cc status] Expected 0, got -6

stdout:
['']
['']
['']
['']
['']
['']
stderr:
osh_eval.opt: mycpp/mylib.h:674: V Dict<K, V>::index(K) [with K = int; V = vm::_Builtin*]: Assertion `0' failed.
osh_.cc3 ${FUNCNAME} with prefix/suffix operators

[osh_.cc stdout] Expected "['5']\n['c']\n['heck']\n", got "['heck']\n['c']\n['5']\n"
[osh_.cc status] Expected 0, got 255

stdout:
['heck']
['c']
['5']
stderr:
dumb_alloc:
	gNumNew = 2320
	gNumDelete = 213
	gMemPos = 77792

	gNumMalloc = 252
	gNumFree = 0
	gMemPos2 = 12624
osh_.py7 ${BASH_SOURCE[@]} with source and function name

[osh_.py stdout] Expected "[]\n['spec/testdata/bash-source-simple.sh']\n['spec/testdata/bash-source-simple.sh']\n", got '[]\n'
[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 68, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 36, in main
    None)
  File "/home/andy/git/oilshell/oil/core/shell_native.py", line 476, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 324, 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 1498, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1345, in _Execute
    status, check_errexit = self._Dispatch(node, pipeline_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 623, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 477, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 224, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 123, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 31
osh_.cc7 ${BASH_SOURCE[@]} with source and function name

[osh_.cc stdout] Expected "[]\n['spec/testdata/bash-source-simple.sh']\n['spec/testdata/bash-source-simple.sh']\n", got '[]\n'
[osh_.cc status] Expected 0, got -6

stdout:
[]
stderr:
osh_eval.opt: mycpp/mylib.h:674: V Dict<K, V>::index(K) [with K = int; V = vm::_Builtin*]: Assertion `0' failed.
osh_.py8 ${BASH_SOURCE[@]} with line numbers

[osh_.py stdout] Expected "['begin F funcs', 'f', 'main']\n['begin F files', 'spec/testdata/bash-source.sh', 'spec/testdata/bash-source.sh']\n['begin F lines', '21', '0']\n['G funcs', 'g', 'f', 'main']\n['G files', 'spec/testdata/bash-source-2.sh', 'spec/testdata/bash-source.sh', 'spec/testdata/bash-source.sh']\n['G lines', '15', '21', '0']\n['end F funcs', 'f', 'main']\n['end F', 'spec/testdata/bash-source.sh', 'spec/testdata/bash-source.sh']\n['end F lines', '21', '0']\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 68, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 36, in main
    None)
  File "/home/andy/git/oilshell/oil/core/shell_native.py", line 476, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 324, 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 1498, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1345, in _Execute
    status, check_errexit = self._Dispatch(node, pipeline_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 623, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 477, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 224, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 123, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 31
osh_.cc8 ${BASH_SOURCE[@]} with line numbers

[osh_.cc stdout] Expected "['begin F funcs', 'f', 'main']\n['begin F files', 'spec/testdata/bash-source.sh', 'spec/testdata/bash-source.sh']\n['begin F lines', '21', '0']\n['G funcs', 'g', 'f', 'main']\n['G files', 'spec/testdata/bash-source-2.sh', 'spec/testdata/bash-source.sh', 'spec/testdata/bash-source.sh']\n['G lines', '15', '21', '0']\n['end F funcs', 'f', 'main']\n['end F', 'spec/testdata/bash-source.sh', 'spec/testdata/bash-source.sh']\n['end F lines', '21', '0']\n", got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/pylib_path_stat.h:10: bool path_stat::exists(Str*): Assertion `0' failed.
osh_.cc9 ${BASH_LINENO[@]} is a stack of line numbers for function calls

[osh_.cc stdout] Expected "[]\n['begin F', '10']\n['G', '6', '10']\n['end F', '10']\n", got "['begin F', '10']\n[]\n['G', '6', '10']\n['end F', '10']\n"
[osh_.cc status] Expected 0, got 255

stdout:
['begin F', '10']
[]
['G', '6', '10']
['end F', '10']
stderr:
dumb_alloc:
	gNumNew = 2343
	gNumDelete = 233
	gMemPos = 78864

	gNumMalloc = 223
	gNumFree = 0
	gMemPos2 = 12144