Results for ysh-proc.test.sh

statusoshosh-cpp
pass 1811
FAIL 07
total1818
caseoshosh-cppdescription
0pass FAIL Open proc (any number of args)
details
1pass pass Closed proc with no args, passed too many
2pass pass Open proc has "$@"
3pass pass Closed proc doesn't have "$@"
4pass FAIL Proc with default args
details
5pass FAIL Proc with explicit args
details
6pass pass Proc with varargs
7pass pass varargs 2
8pass pass Proc name-with-hyphen
9pass pass Proc with block arg
10pass FAIL proc returning wrong type
details
11pass FAIL proc returning invalid string
details
12pass FAIL Out param / setref
details
13pass FAIL Pass out param through 2 levels of proc
details
14pass pass 'return' doesn't accept expressions
15pass pass procs are in same namespace as shell functions
16pass pass Nested proc is disallowed at parse time
17pass pass Procs defined inside compound statements (with redefine_proc)
29 passed, 0 OK, 0 not implemented, 0 BUG, 7 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh-cpp0 Open proc (any number of args)

[osh-cpp stdout] Expected 'status=42\n', got 'status=0\n'

stdout:
status=0
stderr:
osh-cpp4 Proc with default args

[osh-cpp stdout] Expected 'x=foo\n', got ''
[osh-cpp status] Expected 0, got 1

stdout:
stderr: 
ASAN:DEADLYSIGNAL
=================================================================
==24993==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x55d485c8a89a bp 0x7ffde41b6f40 sp 0x7ffde41b6f10 T0)
==24993==The signal is caused by a READ memory access.
==24993==Hint: address points to the zero page.
    #0 0x55d485c8a899 in List<runtime_asdl::value_t*>::index_(int) (/home/andy/git/oilshell/oil/_bin/cxx-asan/oils-for-unix+0x339899)
    #1 0x55d485b6b720 in cmd_eval::CommandEvaluator::RunProc(runtime_asdl::Proc*, List<Str*>*, syntax_asdl::loc_t*) _gen/bin/oils_for_unix.mycpp.cc:25532
    #2 0x55d485aaed65 in executor::ShellExecutor::RunSimpleCommand(runtime_asdl::cmd_value__Argv*, runtime_asdl::CommandStatus*, bool, bool) _gen/bin/oils_for_unix.mycpp.cc:11849
    #3 0x55d485b5cfa0 in cmd_eval::CommandEvaluator::_RunSimpleCommand(runtime_asdl::cmd_value_t*, runtime_asdl::CommandStatus*, bool) _gen/bin/oils_for_unix.mycpp.cc:24430
    #4 0x55d485b60c33 in cmd_eval::CommandEvaluator::_Dispatch(syntax_asdl::command_t*, runtime_asdl::CommandStatus*) _gen/bin/oils_for_unix.mycpp.cc:24649
    #5 0x55d485b676ae in cmd_eval::CommandEvaluator::_Execute(syntax_asdl::command_t*) _gen/bin/oils_for_unix.mycpp.cc:25211
    #6 0x55d485b69285 in cmd_eval::CommandEvaluator::ExecuteAndCatch(syntax_asdl::command_t*, int) _gen/bin/oils_for_unix.mycpp.cc:25361
    #7 0x55d485ab6941 in main_loop::Batch(cmd_eval::CommandEvaluator*, cmd_parse::CommandParser*, ui::ErrorFormatter*, int) _gen/bin/oils_for_unix.mycpp.cc:12401
    #8 0x55d485c211f0 in shell::Main(Str*, args::Reader*, Dict<Str*, Str*>*, bool, pyutil::_ResourceLoader*, py_readline::Readline*) _gen/bin/oils_for_unix.mycpp.cc:39876
    #9 0x55d485a83d38 in oils_for_unix::AppBundleMain(List<Str*>*) _gen/bin/oils_for_unix.mycpp.cc:9229
    #10 0x55d485a843a6 in oils_for_unix::main(List<Str*>*) _gen/bin/oils_for_unix.mycpp.cc:9290
    #11 0x55d485c257b3 in main _gen/bin/oils_for_unix.mycpp.cc:40146
    #12 0x7fd1b4473c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
    #13 0x55d485a60ce9 in _start (/home/andy/git/oilshell/oil/_bin/cxx-asan/oils-for-unix+0x10fce9)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/home/andy/git/oilshell/oil/_bin/cxx-asan/oils-for-unix+0x339899) in List<runtime_asdl::value_t*>::index_(int)
==24993==ABORTING
osh-cpp5 Proc with explicit args

[osh-cpp stdout] Expected 'a b c\nstatus=42\n', got 'a b c\nstatus=0\n'

stdout:
a b c
status=0
stderr:
osh-cpp10 proc returning wrong type

[osh-cpp status] Expected 1, got 0

stdout:
stderr: 
osh-cpp11 proc returning invalid string

[osh-cpp status] Expected 1, got 0

stdout:
stderr: 
osh-cpp12 Out param / setref

[osh-cpp stdout] Expected 'myvar=value\nmyvar=PREFIX-zzz\n', got ''
[osh-cpp status] Expected 0, got 2

stdout:
stderr: 
  proc f(input, out Ref) {  # : means accept a string "reference"
                    ^~~
[ stdin ]:3: proc param types should be Ref, Expr, or Block
osh-cpp13 Pass out param through 2 levels of proc

[osh-cpp stdout] Expected 'tmp=PREFIX-zzz\ntop=PREFIX-zzz\n', got ''
[osh-cpp status] Expected 0, got 2

stdout:
stderr: 
  proc p(s, out Ref) {
                ^~~
[ stdin ]:3: proc param types should be Ref, Expr, or Block