Results for ysh-xtrace.test.sh

statusosh
pass 1
FAIL 19
total20
caseoshdescription
0FAIL Customize PS4
details
1FAIL xtrace_details doesn't show [[ ]] etc.
details
2FAIL xtrace_details AND xtrace_rich on
details
3FAIL proc and shell function
details
4FAIL eval
details
5FAIL source
details
6FAIL external and builtin
details
7FAIL subshell
details
8FAIL command sub
details
9FAIL process sub (nondeterministic)
details
10FAIL pipeline (nondeterministic)
details
11FAIL singleton pipeline
details
12FAIL Background pipeline (separate code path)
details
13FAIL Background process with fork and & (nondeterministic)
details
14FAIL Here doc
details
15FAIL Two here docs
details
16pass Here doc greater than 4096 bytes
17FAIL Control Flow
details
18FAIL use builtin and invokable module
details
19FAIL Encoded argv uses shell encoding, not J8
details
1 passed, 0 OK, 0 not implemented, 0 BUG, 19 failed, 0 timeouts, 0 cases skipped
19 failed under osh

Details on runs that didn't PASS

osh0 Customize PS4

[osh stderr] Expected '5 . builtin echo 1\n5 . builtin echo 2\n6 . builtin echo 3\n' Got 'builtin echo 1\nbuiltin echo 2\nbuiltin echo 3\n'

stdout:
1
2
3
stderr:
builtin echo 1
builtin echo 2
builtin echo 3
osh1 xtrace_details doesn't show [[ ]] etc.

[osh stderr] Expected '. builtin cd /\n', got 'builtin cd /\n'

stdout:
stderr: 
builtin cd /
osh2 xtrace_details AND xtrace_rich on

[osh stderr] Expected "| command 12345: env 'false'\n; process 12345: status 1\n. builtin set '+x'\n" Got "command 12345: env 'false'\nprocess 12345: status 1\nbuiltin set '+x'\n"

stdout:
stderr: 
command 12345: env 'false'
process 12345: status 1
builtin set '+x'
osh3 proc and shell function

[osh stderr] Expected "> proc shfunc 1\n . builtin ':' 1\n< proc shfunc\n> proc p 2\n . builtin ':' 2\n< proc p\n" Got "proc shfunc 1\nbuiltin ':' 1\nproc shfunc\nproc p 2\nbuiltin ':' 2\nproc p\n"

stdout:
stderr: 
proc shfunc 1
builtin ':' 1
proc shfunc
proc p 2
builtin ':' 2
proc p
osh4 eval

[osh stderr] Expected '> eval\n . builtin echo 1\n . builtin echo 2\n< eval\n' Got 'eval\nbuiltin echo 1\nbuiltin echo 2\neval\n'

stdout:
1
2
stderr:
eval
builtin echo 1
builtin echo 2
eval
osh5 source

[osh stderr] Expected "> source lib.sh a b c\n . builtin echo '$1 = a'\n< source lib.sh\n> source lib.sh x $'\\xfe' $'\\xff'\n . builtin echo '$1 = x'\n< source lib.sh\n" Got "source lib.sh a b c\nbuiltin echo '$1 = a'\nsource lib.sh\nsource lib.sh x $'\\xfe' $'\\xff'\nbuiltin echo '$1 = x'\nsource lib.sh\n"

stdout:
$1 = a
$1 = x
stderr:
source lib.sh a b c
builtin echo '$1 = a'
source lib.sh
source lib.sh x $'\xfe' $'\xff'
builtin echo '$1 = x'
source lib.sh
osh6 external and builtin

[osh stderr] Expected "| command 12345: env 'false'\n; process 12345: status 1\n. builtin 'true'\n. builtin set '+x'\n" Got "command 12345: env 'false'\nprocess 12345: status 1\nbuiltin 'true'\nbuiltin set '+x'\n"

stdout:
stderr: 
command 12345: env 'false'
process 12345: status 1
builtin 'true'
builtin set '+x'
osh7 subshell

[osh stderr] Expected " . 12345 builtin ':' p\n + 12345 exit 3\n . 12345 builtin ':' 1\n < 12345 proc p\n > 12345 proc p\n. builtin ':' begin\n. builtin set '+x'\n; process 12345: status 3\n| forkwait 12345\n" Got "builtin ':' 1\nbuiltin ':' begin\nbuiltin ':' p\nbuiltin set '+x'\nexit 3\nforkwait 12345\nproc p\nproc p\nprocess 12345: status 3\n"

stdout:
stderr: 
builtin ':' 1
builtin ':' begin
builtin ':' p
builtin set '+x'
exit 3
forkwait 12345
proc p
proc p
process 12345: status 3
osh8 command sub

[osh stderr] Expected " . 12345 builtin echo bar\n. builtin echo 'foo=bar'\n. builtin set '+x'\n; process 12345: status 0\n| command sub 12345\n" Got "builtin echo 'foo=bar'\nbuiltin echo bar\nbuiltin set '+x'\ncommand sub 12345\nprocess 12345: status 0\n"

stdout:
foo=bar
stderr:
builtin echo 'foo=bar'
builtin echo bar
builtin set '+x'
command sub 12345
process 12345: status 0
osh9 process sub (nondeterministic)

[osh stderr] Expected " . 12345 builtin echo 1\n . 12345 exec seq 2\n. builtin ':' begin\n. builtin set '+x'\n; process 12345: status 0\n; process 12345: status 0\n; process 12345: status 0\n| command 12345: cat /dev/fd/N /dev/fd/N\n| proc sub 12345\n| proc sub 12345\n" Got "builtin ':' begin\nbuiltin echo 1\nbuiltin set '+x'\ncommand 12345: cat /dev/fd/N /dev/fd/N\nexec seq 2\nproc sub 12345\nproc sub 12345\nprocess 12345: status 0\nprocess 12345: status 0\nprocess 12345: status 0\n"

stdout:
1
2
1
stderr:
builtin ':' begin
builtin echo 1
builtin set '+x'
command 12345: cat /dev/fd/N /dev/fd/N
exec seq 2
proc sub 12345
proc sub 12345
process 12345: status 0
process 12345: status 0
process 12345: status 0
osh10 pipeline (nondeterministic)

[osh stderr] Expected " . 12345 builtin echo 1\n . 12345 builtin echo 2\n . 12345 exec sort\n < 12345 proc myfunc\n > 12345 proc myfunc\n ; process 12345: status 0\n ; process 12345: status 0\n ; process 12345: status 0\n | command 12345: wc -l\n | part 12345\n | part 12345\n. builtin ':' begin\n. builtin set '+x'\n< pipeline\n> pipeline\n" Got "builtin ':' begin\nbuiltin echo 1\nbuiltin echo 2\nbuiltin set '+x'\ncommand 12345: wc -l\nexec sort\npart 12345\npart 12345\npipeline\npipeline\nproc myfunc\nproc myfunc\nprocess 12345: status 0\nprocess 12345: status 0\nprocess 12345: status 0\n"

stdout:
2
stderr:
builtin ':' begin
builtin echo 1
builtin echo 2
builtin set '+x'
command 12345: wc -l
exec sort
part 12345
part 12345
pipeline
pipeline
proc myfunc
proc myfunc
process 12345: status 0
process 12345: status 0
process 12345: status 0
osh11 singleton pipeline

[osh stderr] Expected ". builtin ':' begin\n. builtin 'false'\n. builtin ':' end\n" Got "builtin ':' begin\nbuiltin 'false'\nbuiltin ':' end\n"

stdout:
stderr: 
builtin ':' begin
builtin 'false'
builtin ':' end
osh12 Background pipeline (separate code path)

[osh stderr] Expected " . 12345 builtin echo 1\n . 12345 builtin echo 2\n . 12345 exec grep ZZZ\n . 12345 exec sort\n ; process 12345: status 0\n ; process 12345: status 0\n ; process 12345: status 1\n < 12345 proc myfunc\n > 12345 proc myfunc\n. builtin ':' begin\n. builtin echo 'status=0'\n. builtin set '+x'\n< wait\n> wait\n[%1] PGID 12345 Done\n| part 12345\n| part 12345\n| part 12345\n" Got "[%1] PGID 12345 Done\nbuiltin ':' begin\nbuiltin echo 'status=0'\nbuiltin echo 1\nbuiltin echo 2\nbuiltin set '+x'\nexec grep ZZZ\nexec sort\npart 12345\npart 12345\npart 12345\nproc myfunc\nproc myfunc\nprocess 12345: status 0\nprocess 12345: status 0\nprocess 12345: status 1\nwait\nwait\n"

stdout:
status=0
stderr:
[%1] PGID 12345 Done
builtin ':' begin
builtin echo 'status=0'
builtin echo 1
builtin echo 2
builtin set '+x'
exec grep ZZZ
exec sort
part 12345
part 12345
part 12345
proc myfunc
proc myfunc
process 12345: status 0
process 12345: status 0
process 12345: status 1
wait
wait
osh13 Background process with fork and & (nondeterministic)

[osh stderr] Expected " . 12345 exec sleep 0.1\n . 12345 exec sleep 0.1\n ; process 12345: status 0\n ; process 12345: status 0\n. builtin fork\n. builtin set '+x'\n. builtin shopt -s 'ysh:upgrade'\n< wait\n< wait\n> wait\n> wait\n[%1] PID 12345 Done\n[%1] PID 12345 Done\n| fork 12345\n| fork 12345\n" Got "[%1] PID 12345 Done\n[%1] PID 12345 Done\nbuiltin fork\nbuiltin set '+x'\nbuiltin shopt -s 'ysh:upgrade'\nexec sleep 0.1\nexec sleep 0.1\nfork 12345\nfork 12345\nprocess 12345: status 0\nprocess 12345: status 0\nwait\nwait\nwait\nwait\n"

stdout:
stderr: 
[%1] PID 12345 Done
[%1] PID 12345 Done
builtin fork
builtin set '+x'
builtin shopt -s 'ysh:upgrade'
exec sleep 0.1
exec sleep 0.1
fork 12345
fork 12345
process 12345: status 0
process 12345: status 0
wait
wait
wait
wait
osh14 Here doc

[osh stderr] Expected ". builtin ':' begin\n| command 12345: tac\n; process 12345: status 0\n. builtin set '+x'\n" Got "builtin ':' begin\ncommand 12345: tac\nprocess 12345: status 0\nbuiltin set '+x'\n"

stdout:
2
3
stderr:
builtin ':' begin
command 12345: tac
process 12345: status 0
builtin set '+x'
osh15 Two here docs

[osh stderr] Expected "| command 12345: cat - /dev/fd/3\n; process 12345: status 0\n. builtin set '+x'\n" Got "command 12345: cat - /dev/fd/3\nprocess 12345: status 0\nbuiltin set '+x'\n"

stdout:
xx
yy
zz
stderr:
command 12345: cat - /dev/fd/3
process 12345: status 0
builtin set '+x'
osh17 Control Flow

[osh stderr] Expected '. builtin echo 1\n. builtin echo 2\n+ break 1\n. builtin echo a y\n+ continue 1\n. builtin echo a z\n. builtin echo b y\n+ continue 1\n. builtin echo b z\n> proc zero\n + return 0\n< proc zero\n' Got 'builtin echo 1\nbuiltin echo 2\nbreak 1\nbuiltin echo a y\ncontinue 1\nbuiltin echo a z\nbuiltin echo b y\ncontinue 1\nbuiltin echo b z\nproc zero\nreturn 0\nproc zero\n'

stdout:
1
2
a y
a z
b y
b z
stderr:
builtin echo 1
builtin echo 2
break 1
builtin echo a y
continue 1
builtin echo a z
builtin echo b y
continue 1
builtin echo b z
proc zero
return 0
proc zero
osh18 use builtin and invokable module

[osh stderr] Expected "> source for-xtrace.ysh\n . builtin echo '[for-xtrace]'\n > proc increment\n . builtin echo 'counter = 5'\n < proc increment\n< source for-xtrace.ysh\n. builtin echo\n> use for-xtrace.ysh\n . builtin echo '[for-xtrace]'\n > proc increment\n . builtin echo 'counter = 5'\n < proc increment\n< use for-xtrace.ysh\n> module-invoke for-xtrace increment foo bar\n . builtin echo 'counter = 6'\n< module-invoke for-xtrace\n" Got "source for-xtrace.ysh\nbuiltin echo '[for-xtrace]'\nproc increment\nbuiltin echo 'counter = 5'\nproc increment\nsource for-xtrace.ysh\nbuiltin echo\nuse for-xtrace.ysh\nbuiltin echo '[for-xtrace]'\nproc increment\nbuiltin echo 'counter = 5'\nproc increment\nuse for-xtrace.ysh\nmodule-invoke for-xtrace increment foo bar\nbuiltin echo 'counter = 6'\nmodule-invoke for-xtrace\n"

stdout:
[for-xtrace]
counter = 5

[for-xtrace]
counter = 5
counter = 6
stderr:
source for-xtrace.ysh
builtin echo '[for-xtrace]'
proc increment
builtin echo 'counter = 5'
proc increment
source for-xtrace.ysh
builtin echo
use for-xtrace.ysh
builtin echo '[for-xtrace]'
proc increment
builtin echo 'counter = 5'
proc increment
use for-xtrace.ysh
module-invoke for-xtrace increment foo bar
builtin echo 'counter = 6'
module-invoke for-xtrace
osh19 Encoded argv uses shell encoding, not J8

[osh stderr] Expected ". builtin echo $'one two\\n' '\xce\xbc'\n", got "builtin echo $'one two\\n' '\xce\xbc'\n"

stdout:
one two
 μ
stderr:
builtin echo $'one two\n' 'μ'