Results for ysh-bugs.test.sh

statusyshysh-cpp
pass 99
FAIL 44
total1313
caseyshysh-cppdescription
0pass pass fastlex: NUL byte not allowed inside char literal #' '
1pass pass fastlex: NUL byte inside shebang line
2pass pass Tea keywords don't interfere with YSH expressions
3pass pass Catch AttributeError
4pass pass Command sub paren parsing bug (#1387)
5pass pass More Command sub paren parsing
6pass pass don't execute empty command
7FAIL FAIL Do && || with YSH constructs make sense/
detailsdetails
8pass pass shvar then replace - bug #1986 context manager crash
9pass pass Parsing crash - bug #2003
10FAIL FAIL proc with IFS= read -r line - dynamic scope - issue #2012
detailsdetails
11FAIL FAIL func call inside proc call - error message attribution
detailsdetails
12FAIL FAIL Crash in parsing case - issue #2037
detailsdetails
18 passed, 0 OK, 0 not implemented, 0 BUG, 4 failed, 0 timeouts, 0 cases skipped
4 failed under osh

Details on runs that didn't PASS

ysh7 Do && || with YSH constructs make sense/

[ysh stdout] Expected '', got '(List) [42]\n(Int) 42\n(Int) 42\n'

stdout:
(List)   [42]
(Int)   42
(Int)   42
stderr:
ysh-cpp7 Do && || with YSH constructs make sense/

[ysh-cpp stdout] Expected '', got '(List) [42]\n(Int) 42\n(Int) 42\n'

stdout:
(List)   [42]
(Int)   42
(Int)   42
stderr:
ysh10 proc with IFS= read -r line - dynamic scope - issue #2012

[ysh stdout] Expected 'zz\nyy\n', got 'zz\n'
[ysh status] Expected 0, got 1

stdout:
zz
stderr:
    write $line
          ^~~~~
[ stdin ]:8: fatal: Undefined variable 'line'
  echo yy | p-ifs
            ^~~~~
[ stdin ]:14: errexit PID 25708: command.Pipeline failed with status 1
ysh-cpp10 proc with IFS= read -r line - dynamic scope - issue #2012

[ysh-cpp stdout] Expected 'zz\nyy\n', got 'zz\n'
[ysh-cpp status] Expected 0, got 1

stdout:
zz
stderr:
    write $line
          ^~~~~
[ stdin ]:8: fatal: Undefined variable 'line'
  echo yy | p-ifs
            ^~~~~
[ stdin ]:14: errexit PID 25728: command.Pipeline failed with status 1
ysh11 func call inside proc call - error message attribution

[ysh stdout] Expected '', got ' eval (ident([1,2,3]))\n ^\n[ -c flag ]:11: fatal: Arg 1 should be a Command, got List\n'

stdout:
  eval (ident([1,2,3]))
             ^
[ -c flag ]:11: fatal: Arg 1 should be a Command, got List
stderr:
ysh-cpp11 func call inside proc call - error message attribution

[ysh-cpp stdout] Expected '', got ' eval (ident([1,2,3]))\n ^\n[ -c flag ]:11: fatal: Arg 1 should be a Command, got List\n'

stdout:
  eval (ident([1,2,3]))
             ^
[ -c flag ]:11: fatal: Arg 1 should be a Command, got List
stderr:
ysh12 Crash in parsing case - issue #2037

[ysh status] Expected 0, got 1
[ysh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 198, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 170, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 137, in AppBundleMain
    return shell.Main('ysh', arg_r, environ, login_shell, loader, readline)
  File "/home/uke/oil/core/shell.py", line 1138, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 340, in Batch
    node = c_parser.ParseLogicalLine()  # can raise ParseError
  File "/home/uke/oil/osh/cmd_parse.py", line 2774, in ParseLogicalLine
    node = self._ParseCommandLine()
  File "/home/uke/oil/osh/cmd_parse.py", line 2633, in _ParseCommandLine
    child = self.ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2557, in ParseAndOr
    return self._ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2568, in _ParseAndOr
    child = self.ParsePipeline()
  File "/home/uke/oil/osh/cmd_parse.py", line 2516, in ParsePipeline
    child = self.ParseCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2434, in ParseCommand
    return self.ParseCompoundCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2063, in ParseCompoundCommand
    n5 = self.ParseCase()
  File "/home/uke/oil/osh/cmd_parse.py", line 1854, in ParseCase
    return self.ParseYshCase(case_kw)
  File "/home/uke/oil/osh/cmd_parse.py", line 1779, in ParseYshCase
    discriminant = self.w_parser.NewlineOkForYshCase()
  File "/home/uke/oil/osh/word_parse.py", line 1422, in NewlineOkForYshCase
    next_id = self.lexer.LookAheadOne(lex_mode_e.Expr)
  File "/home/uke/oil/frontend/lexer.py", line 337, in LookAheadOne
    return self.line_lexer.LookAheadOne(lex_mode)
  File "/home/uke/oil/frontend/lexer.py", line 178, in LookAheadOne
    line_str = self.src_line.content
AttributeError: 'NoneType' object has no attribute 'content'
ysh-cpp12 Crash in parsing case - issue #2037

[ysh-cpp status] Expected 0, got 1

stdout:
stderr: 
AddressSanitizer:DEADLYSIGNAL
=================================================================
==25808==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x558228d86e7f bp 0x7ffdcc7d8780 sp 0x7ffdcc7d8650 T0)
==25808==The signal is caused by a READ memory access.
==25808==Hint: address points to the zero page.
    #0 0x558228d86e7e in lexer::LineLexer::LookAheadOne(types_asdl::lex_mode_e) _gen/bin/oils_for_unix.mycpp.cc:31619
    #1 0x558228d88007 in lexer::Lexer::LookAheadOne(types_asdl::lex_mode_e) _gen/bin/oils_for_unix.mycpp.cc:31741
    #2 0x558228e4bee9 in word_parse::WordParser::NewlineOkForYshCase() _gen/bin/oils_for_unix.mycpp.cc:47592
    #3 0x558228dd9e41 in cmd_parse::CommandParser::ParseYshCase(syntax_asdl::Token*) _gen/bin/oils_for_unix.mycpp.cc:38384
    #4 0x558228ddaf00 in cmd_parse::CommandParser::ParseCase() _gen/bin/oils_for_unix.mycpp.cc:38457
    #5 0x558228dde64f in cmd_parse::CommandParser::ParseCompoundCommand() _gen/bin/oils_for_unix.mycpp.cc:38672
    #6 0x558228de4b31 in cmd_parse::CommandParser::ParseCommand() _gen/bin/oils_for_unix.mycpp.cc:39060
    #7 0x558228de5b50 in cmd_parse::CommandParser::ParsePipeline() _gen/bin/oils_for_unix.mycpp.cc:39120
    #8 0x558228de65be in cmd_parse::CommandParser::_ParseAndOr() _gen/bin/oils_for_unix.mycpp.cc:39169
    #9 0x558228de6340 in cmd_parse::CommandParser::ParseAndOr() _gen/bin/oils_for_unix.mycpp.cc:39158
    #10 0x558228de6d7a in cmd_parse::CommandParser::_ParseCommandLine() _gen/bin/oils_for_unix.mycpp.cc:39205
    #11 0x558228de8117 in cmd_parse::CommandParser::ParseLogicalLine() _gen/bin/oils_for_unix.mycpp.cc:39315
    #12 0x558228d24d79 in main_loop::Batch(cmd_eval::CommandEvaluator*, cmd_parse::CommandParser*, ui::ErrorFormatter*, int) _gen/bin/oils_for_unix.mycpp.cc:24161
    #13 0x558228eca83a in shell::Main(BigStr*, args::Reader*, Dict<BigStr*, BigStr*>*, bool, pyutil::_ResourceLoader*, py_readline::Readline*) _gen/bin/oils_for_unix.mycpp.cc:56896
    #14 0x558228c78249 in oils_for_unix::AppBundleMain(List<BigStr*>*) _gen/bin/oils_for_unix.mycpp.cc:12264
    #15 0x558228c788ab in oils_for_unix::main(List<BigStr*>*) _gen/bin/oils_for_unix.mycpp.cc:12300
    #16 0x558228ecc7eb in main _gen/bin/oils_for_unix.mycpp.cc:56918
    #17 0x7f7a6b15009a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
    #18 0x558228c51fc9 in _start (/home/uke/oil/_bin/cxx-asan/oils-for-unix+0x199fc9)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV _gen/bin/oils_for_unix.mycpp.cc:31619 in lexer::LineLexer::LookAheadOne(types_asdl::lex_mode_e)
==25808==ABORTING