Results for nul-bytes.test.sh

statusdashbashmkshzshashosh
pass 188272
ok 000314
N-I 700000
BUG 000300
FAIL 000002
total888888
casedashbashmkshzshashoshdescription
0N-I pass pass BUG pass pass NUL bytes with echo -e
detailsdetails
1pass pass pass pass pass pass NUL bytes in printf format
2N-I pass pass ok pass ok NUL bytes in printf value (OSH and zsh agree)
detailsdetailsdetails
3N-I pass pass ok pass ok NUL bytes with echo $'\0' (OSH and zsh agree)
detailsdetailsdetails
4N-I pass pass BUG pass FAIL NUL bytes and IFS splitting
detailsdetailsdetails
5N-I pass pass BUG pass ok NUL bytes with test -n
detailsdetailsdetails
6N-I pass pass pass ok FAIL NUL bytes with test -f
detailsdetailsdetails
7N-I pass pass ok pass ok NUL bytes with ${#s} (OSH and zsh agree)
detailsdetailsdetails
28 passed, 8 OK, 7 not implemented, 3 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

dash0 NUL bytes with echo -e

stdout:
stderr: 
zsh0 NUL bytes with echo -e

stdout:

stderr:
dash2 NUL bytes in printf value (OSH and zsh agree)

stdout:
stderr: 
zsh2 NUL bytes in printf value (OSH and zsh agree)

stdout:


stderr:
osh2 NUL bytes in printf value (OSH and zsh agree)

stdout:


stderr:
dash3 NUL bytes with echo $'\0' (OSH and zsh agree)

stdout:
stderr: 
zsh3 NUL bytes with echo $'\0' (OSH and zsh agree)

stdout:

stderr:
osh3 NUL bytes with echo $'\0' (OSH and zsh agree)

stdout:

stderr:
dash4 NUL bytes and IFS splitting

stdout:
stderr: 
zsh4 NUL bytes and IFS splitting

stdout:
['', '']
['']
['a', 'b']
['a']
stderr:
osh4 NUL bytes and IFS splitting

[osh stdout] Expected "[]\n['']\n['ab']\n['ab']\n", got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 201, 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 140, in AppBundleMain
    return shell.Main('osh', arg_r, environ, login_shell, loader, readline)
  File "/home/uke/oil/core/shell.py", line 1232, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 375, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags)
  File "/home/uke/oil/osh/cmd_eval.py", line 2051, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/uke/oil/osh/cmd_eval.py", line 1850, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 1585, in _Dispatch
    status = self._DoSimple(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 874, in _DoSimple
    status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags)
  File "/home/uke/oil/osh/cmd_eval.py", line 546, in _RunSimpleCommand
    run_flags)
  File "/home/uke/oil/core/executor.py", line 385, in RunSimpleCommand
    status = p.RunProcess(self.waiter, trace.External(cmd_val.argv))
  File "/home/uke/oil/core/process.py", line 1187, in RunProcess
    self.StartProcess(why)
  File "/home/uke/oil/core/process.py", line 1097, in StartProcess
    self.thunk.Run()
  File "/home/uke/oil/core/process.py", line 806, in Run
    self.ext_prog.Exec(self.argv0_path, self.cmd_val, self.environ)
  File "/home/uke/oil/core/process.py", line 693, in Exec
    True)
  File "/home/uke/oil/core/process.py", line 724, in _Exec
    posix.execve(argv0_path, argv, environ)
TypeError: execve() arg 2 must contain only strings
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 201, 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 140, in AppBundleMain
    return shell.Main('osh', arg_r, environ, login_shell, loader, readline)
  File "/home/uke/oil/core/shell.py", line 1232, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 375, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags)
  File "/home/uke/oil/osh/cmd_eval.py", line 2051, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/uke/oil/osh/cmd_eval.py", line 1850, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 1585, in _Dispatch
    status = self._DoSimple(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 874, in _DoSimple
    status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags)
  File "/home/uke/oil/osh/cmd_eval.py", line 546, in _RunSimpleCommand
    run_flags)
  File "/home/uke/oil/core/executor.py", line 385, in RunSimpleCommand
    status = p.RunProcess(self.waiter, trace.External(cmd_val.argv))
  File "/home/uke/oil/core/process.py", line 1187, in RunProcess
    self.StartProcess(why)
  File "/home/uke/oil/core/process.py", line 1097, in StartProcess
    self.thunk.Run()
  File "/home/uke/oil/core/process.py", line 806, in Run
    self.ext_prog.Exec(self.argv0_path, self.cmd_val, self.environ)
  File "/home/uke/oil/core/process.py", line 693, in Exec
    True)
  File "/home/uke/oil/core/process.py", line 724, in _Exec
    posix.execve(argv0_path, argv, environ)
TypeError: execve() arg 2 must contain only strings
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 201, 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 140, in AppBundleMain
    return shell.Main('osh', arg_r, environ, login_shell, loader, readline)
  File "/home/uke/oil/core/shell.py", line 1232, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 375, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags)
  File "/home/uke/oil/osh/cmd_eval.py", line 2051, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/uke/oil/osh/cmd_eval.py", line 1850, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 1585, in _Dispatch
    status = self._DoSimple(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 874, in _DoSimple
    status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags)
  File "/home/uke/oil/osh/cmd_eval.py", line 546, in _RunSimpleCommand
    run_flags)
  File "/home/uke/oil/core/executor.py", line 385, in RunSimpleCommand
    status = p.RunProcess(self.waiter, trace.External(cmd_val.argv))
  File "/home/uke/oil/core/process.py", line 1187, in RunProcess
    self.StartProcess(why)
  File "/home/uke/oil/core/process.py", line 1097, in StartProcess
    self.thunk.Run()
  File "/home/uke/oil/core/process.py", line 806, in Run
    self.ext_prog.Exec(self.argv0_path, self.cmd_val, self.environ)
  File "/home/uke/oil/core/process.py", line 693, in Exec
    True)
  File "/home/uke/oil/core/process.py", line 724, in _Exec
    posix.execve(argv0_path, argv, environ)
TypeError: execve() arg 2 must contain only strings
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 201, 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 140, in AppBundleMain
    return shell.Main('osh', arg_r, environ, login_shell, loader, readline)
  File "/home/uke/oil/core/shell.py", line 1232, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 375, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags)
  File "/home/uke/oil/osh/cmd_eval.py", line 2051, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/uke/oil/osh/cmd_eval.py", line 1850, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 1585, in _Dispatch
    status = self._DoSimple(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 874, in _DoSimple
    status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags)
  File "/home/uke/oil/osh/cmd_eval.py", line 546, in _RunSimpleCommand
    run_flags)
  File "/home/uke/oil/core/executor.py", line 385, in RunSimpleCommand
    status = p.RunProcess(self.waiter, trace.External(cmd_val.argv))
  File "/home/uke/oil/core/process.py", line 1187, in RunProcess
    self.StartProcess(why)
  File "/home/uke/oil/core/process.py", line 1097, in StartProcess
    self.thunk.Run()
  File "/home/uke/oil/core/process.py", line 806, in Run
    self.ext_prog.Exec(self.argv0_path, self.cmd_val, self.environ)
  File "/home/uke/oil/core/process.py", line 693, in Exec
    True)
  File "/home/uke/oil/core/process.py", line 724, in _Exec
    posix.execve(argv0_path, argv, environ)
TypeError: execve() arg 2 must contain only strings
dash5 NUL bytes with test -n

stdout:
stderr: 
zsh5 NUL bytes with test -n

stdout:
status=0
status=0
stderr:
osh5 NUL bytes with test -n

stdout:
status=1
status=0
stderr:
dash6 NUL bytes with test -f

stdout:
stderr: 
ash6 NUL bytes with test -f

stdout:
status=1
status=0
status=1
status=1
stderr:
osh6 NUL bytes with test -f

[osh stdout] Expected 'status=1\nstatus=0\nstatus=0\nstatus=1\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 201, 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 140, in AppBundleMain
    return shell.Main('osh', arg_r, environ, login_shell, loader, readline)
  File "/home/uke/oil/core/shell.py", line 1232, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 375, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags)
  File "/home/uke/oil/osh/cmd_eval.py", line 2051, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/uke/oil/osh/cmd_eval.py", line 1850, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 1585, in _Dispatch
    status = self._DoSimple(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 874, in _DoSimple
    status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags)
  File "/home/uke/oil/osh/cmd_eval.py", line 546, in _RunSimpleCommand
    run_flags)
  File "/home/uke/oil/core/executor.py", line 343, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/uke/oil/core/executor.py", line 204, in RunBuiltin
    return self.RunBuiltinProc(builtin_proc, cmd_val)
  File "/home/uke/oil/core/executor.py", line 214, in RunBuiltinProc
    status = builtin_proc.Run(cmd_val)
  File "/home/uke/oil/builtin/bracket_osh.py", line 278, in Run
    b = bool_ev.EvalB(bool_node)
  File "/home/uke/oil/osh/sh_expr_eval.py", line 1117, in EvalB
    return bool_stat.DoUnaryOp(op_id, s)
  File "/home/uke/oil/osh/bool_stat.py", line 46, in DoUnaryOp
    st = posix.stat(s)
TypeError: stat() argument 1 must be encoded string without null bytes, not str
dash7 NUL bytes with ${#s} (OSH and zsh agree)

stdout:
stderr: 
zsh7 NUL bytes with ${#s} (OSH and zsh agree)

stdout:
empty=0
nul=1
stderr:
osh7 NUL bytes with ${#s} (OSH and zsh agree)

stdout:
empty=0
nul=1
stderr: