Results for nul-bytes.test.sh

statusoshosh_.pyosh_.cc
pass 221
ok 440
FAIL 227
total888
caseoshosh_.pyosh_.ccdescription
0pass pass FAIL NUL bytes with echo -e
details
1pass pass FAIL NUL bytes in printf format
details
2ok ok FAIL NUL bytes in printf value (OSH and zsh agree)
detailsdetailsdetails
3ok ok FAIL NUL bytes with echo $'\0' (OSH and zsh agree)
detailsdetailsdetails
4FAIL FAIL pass NUL bytes and IFS splitting
detailsdetails
5ok ok FAIL NUL bytes with test -n
detailsdetailsdetails
6FAIL FAIL FAIL NUL bytes with test -f
detailsdetailsdetails
7ok ok FAIL NUL bytes with ${#s} (OSH and zsh agree)
detailsdetailsdetails
5 passed, 8 OK, 0 not implemented, 0 BUG, 11 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

osh_.cc0 NUL bytes with echo -e

[osh_.cc stdout] Expected '\x00\n', got '\n'

stdout:
stderr: 
osh_.cc1 NUL bytes in printf format

[osh_.cc stdout] Expected '\x00\n', got '\n'

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

stdout:


stderr:
osh_.py2 NUL bytes in printf value (OSH and zsh agree)

stdout:


stderr:
osh_.cc2 NUL bytes in printf value (OSH and zsh agree)

[osh_.cc stdout] Expected '\x00\n\x00\n', got '\n\n'

stdout:

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

stdout:

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

stdout:

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

[osh_.cc stdout] Expected '\x00\n', got '\n'

stdout:
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/andy/git/oilshell/oil/bin/oil.py", line 366, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 309, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 272, in AppBundleMain
    loader, line_input)
  File "/home/andy/git/oilshell/oil/core/shell.py", line 675, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 332, 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 1649, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1487, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 730, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, cmd_st, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 564, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, cmd_st, do_fork)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 258, in RunSimpleCommand
    status = p.RunWait(self.waiter, trace.External(cmd_val.argv))
  File "/home/andy/git/oilshell/oil/core/process.py", line 952, in RunWait
    self.Start(why)
  File "/home/andy/git/oilshell/oil/core/process.py", line 897, in Start
    self.thunk.Run()
  File "/home/andy/git/oilshell/oil/core/process.py", line 676, in Run
    self.ext_prog.Exec(self.argv0_path, self.cmd_val, self.environ)
  File "/home/andy/git/oilshell/oil/core/process.py", line 560, in Exec
    self._Exec(argv0_path, cmd_val.argv, cmd_val.arg_spids[0], environ, True)
  File "/home/andy/git/oilshell/oil/core/process.py", line 592, in _Exec
    posix.execve(argv0_path, argv, environ)
TypeError: execve() arg 2 must contain only strings
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 366, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 309, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 272, in AppBundleMain
    loader, line_input)
  File "/home/andy/git/oilshell/oil/core/shell.py", line 675, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 332, 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 1649, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1487, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 730, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, cmd_st, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 564, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, cmd_st, do_fork)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 258, in RunSimpleCommand
    status = p.RunWait(self.waiter, trace.External(cmd_val.argv))
  File "/home/andy/git/oilshell/oil/core/process.py", line 952, in RunWait
    self.Start(why)
  File "/home/andy/git/oilshell/oil/core/process.py", line 897, in Start
    self.thunk.Run()
  File "/home/andy/git/oilshell/oil/core/process.py", line 676, in Run
    self.ext_prog.Exec(self.argv0_path, self.cmd_val, self.environ)
  File "/home/andy/git/oilshell/oil/core/process.py", line 560, in Exec
    self._Exec(argv0_path, cmd_val.argv, cmd_val.arg_spids[0], environ, True)
  File "/home/andy/git/oilshell/oil/core/process.py", line 592, in _Exec
    posix.execve(argv0_path, argv, environ)
TypeError: execve() arg 2 must contain only strings
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 366, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 309, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 272, in AppBundleMain
    loader, line_input)
  File "/home/andy/git/oilshell/oil/core/shell.py", line 675, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 332, 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 1649, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1487, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 730, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, cmd_st, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 564, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, cmd_st, do_fork)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 258, in RunSimpleCommand
    status = p.RunWait(self.waiter, trace.External(cmd_val.argv))
  File "/home/andy/git/oilshell/oil/core/process.py", line 952, in RunWait
    self.Start(why)
  File "/home/andy/git/oilshell/oil/core/process.py", line 897, in Start
    self.thunk.Run()
  File "/home/andy/git/oilshell/oil/core/process.py", line 676, in Run
    self.ext_prog.Exec(self.argv0_path, self.cmd_val, self.environ)
  File "/home/andy/git/oilshell/oil/core/process.py", line 560, in Exec
    self._Exec(argv0_path, cmd_val.argv, cmd_val.arg_spids[0], environ, True)
  File "/home/andy/git/oilshell/oil/core/process.py", line 592, in _Exec
    posix.execve(argv0_path, argv, environ)
TypeError: execve() arg 2 must contain only strings
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 366, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 309, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 272, in AppBundleMain
    loader, line_input)
  File "/home/andy/git/oilshell/oil/core/shell.py", line 675, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 332, 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 1649, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1487, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 730, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, cmd_st, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 564, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, cmd_st, do_fork)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 258, in RunSimpleCommand
    status = p.RunWait(self.waiter, trace.External(cmd_val.argv))
  File "/home/andy/git/oilshell/oil/core/process.py", line 952, in RunWait
    self.Start(why)
  File "/home/andy/git/oilshell/oil/core/process.py", line 897, in Start
    self.thunk.Run()
  File "/home/andy/git/oilshell/oil/core/process.py", line 676, in Run
    self.ext_prog.Exec(self.argv0_path, self.cmd_val, self.environ)
  File "/home/andy/git/oilshell/oil/core/process.py", line 560, in Exec
    self._Exec(argv0_path, cmd_val.argv, cmd_val.arg_spids[0], environ, True)
  File "/home/andy/git/oilshell/oil/core/process.py", line 592, in _Exec
    posix.execve(argv0_path, argv, environ)
TypeError: execve() arg 2 must contain only strings
osh_.py4 NUL bytes and IFS splitting

[osh_.py stdout] Expected "[]\n['']\n['ab']\n['ab']\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 66, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 34, in main
    None)
  File "/home/andy/git/oilshell/oil/core/shell_native.py", line 521, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 332, 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 1649, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1487, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 730, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, cmd_st, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 564, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, cmd_st, do_fork)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 258, in RunSimpleCommand
    status = p.RunWait(self.waiter, trace.External(cmd_val.argv))
  File "/home/andy/git/oilshell/oil/core/process.py", line 952, in RunWait
    self.Start(why)
  File "/home/andy/git/oilshell/oil/core/process.py", line 897, in Start
    self.thunk.Run()
  File "/home/andy/git/oilshell/oil/core/process.py", line 676, in Run
    self.ext_prog.Exec(self.argv0_path, self.cmd_val, self.environ)
  File "/home/andy/git/oilshell/oil/core/process.py", line 560, in Exec
    self._Exec(argv0_path, cmd_val.argv, cmd_val.arg_spids[0], environ, True)
  File "/home/andy/git/oilshell/oil/core/process.py", line 592, in _Exec
    posix.execve(argv0_path, argv, environ)
TypeError: execve() arg 2 must contain only strings
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 66, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 34, in main
    None)
  File "/home/andy/git/oilshell/oil/core/shell_native.py", line 521, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 332, 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 1649, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1487, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 730, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, cmd_st, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 564, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, cmd_st, do_fork)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 258, in RunSimpleCommand
    status = p.RunWait(self.waiter, trace.External(cmd_val.argv))
  File "/home/andy/git/oilshell/oil/core/process.py", line 952, in RunWait
    self.Start(why)
  File "/home/andy/git/oilshell/oil/core/process.py", line 897, in Start
    self.thunk.Run()
  File "/home/andy/git/oilshell/oil/core/process.py", line 676, in Run
    self.ext_prog.Exec(self.argv0_path, self.cmd_val, self.environ)
  File "/home/andy/git/oilshell/oil/core/process.py", line 560, in Exec
    self._Exec(argv0_path, cmd_val.argv, cmd_val.arg_spids[0], environ, True)
  File "/home/andy/git/oilshell/oil/core/process.py", line 592, in _Exec
    posix.execve(argv0_path, argv, environ)
TypeError: execve() arg 2 must contain only strings
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 66, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 34, in main
    None)
  File "/home/andy/git/oilshell/oil/core/shell_native.py", line 521, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 332, 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 1649, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1487, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 730, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, cmd_st, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 564, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, cmd_st, do_fork)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 258, in RunSimpleCommand
    status = p.RunWait(self.waiter, trace.External(cmd_val.argv))
  File "/home/andy/git/oilshell/oil/core/process.py", line 952, in RunWait
    self.Start(why)
  File "/home/andy/git/oilshell/oil/core/process.py", line 897, in Start
    self.thunk.Run()
  File "/home/andy/git/oilshell/oil/core/process.py", line 676, in Run
    self.ext_prog.Exec(self.argv0_path, self.cmd_val, self.environ)
  File "/home/andy/git/oilshell/oil/core/process.py", line 560, in Exec
    self._Exec(argv0_path, cmd_val.argv, cmd_val.arg_spids[0], environ, True)
  File "/home/andy/git/oilshell/oil/core/process.py", line 592, in _Exec
    posix.execve(argv0_path, argv, environ)
TypeError: execve() arg 2 must contain only strings
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 66, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 34, in main
    None)
  File "/home/andy/git/oilshell/oil/core/shell_native.py", line 521, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 332, 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 1649, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1487, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 730, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, cmd_st, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 564, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, cmd_st, do_fork)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 258, in RunSimpleCommand
    status = p.RunWait(self.waiter, trace.External(cmd_val.argv))
  File "/home/andy/git/oilshell/oil/core/process.py", line 952, in RunWait
    self.Start(why)
  File "/home/andy/git/oilshell/oil/core/process.py", line 897, in Start
    self.thunk.Run()
  File "/home/andy/git/oilshell/oil/core/process.py", line 676, in Run
    self.ext_prog.Exec(self.argv0_path, self.cmd_val, self.environ)
  File "/home/andy/git/oilshell/oil/core/process.py", line 560, in Exec
    self._Exec(argv0_path, cmd_val.argv, cmd_val.arg_spids[0], environ, True)
  File "/home/andy/git/oilshell/oil/core/process.py", line 592, in _Exec
    posix.execve(argv0_path, argv, environ)
TypeError: execve() arg 2 must contain only strings
osh5 NUL bytes with test -n

stdout:
status=1
status=0
stderr:
osh_.py5 NUL bytes with test -n

stdout:
status=1
status=0
stderr:
osh_.cc5 NUL bytes with test -n

[osh_.cc stdout] Expected 'status=1\nstatus=0\n', got 'status=1\nstatus=1\n'

stdout:
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/andy/git/oilshell/oil/bin/oil.py", line 366, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 309, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 272, in AppBundleMain
    loader, line_input)
  File "/home/andy/git/oilshell/oil/core/shell.py", line 675, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 332, 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 1649, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1487, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 730, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, cmd_st, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 564, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, cmd_st, do_fork)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 240, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 134, in RunBuiltin
    status = builtin_func.Run(cmd_val)
  File "/home/andy/git/oilshell/oil/osh/builtin_bracket.py", line 266, in Run
    b = bool_ev.EvalB(bool_node)
  File "/home/andy/git/oilshell/oil/osh/sh_expr_eval.py", line 935, in EvalB
    return bool_stat.DoUnaryOp(op_id, s)
  File "/home/andy/git/oilshell/oil/osh/bool_stat.py", line 47, in DoUnaryOp
    st = posix.stat(s)
TypeError: stat() argument 1 must be encoded string without null bytes, not str
osh_.py6 NUL bytes with test -f

[osh_.py stdout] Expected 'status=1\nstatus=0\nstatus=0\nstatus=1\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 66, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 34, in main
    None)
  File "/home/andy/git/oilshell/oil/core/shell_native.py", line 521, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 332, 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 1649, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1487, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 730, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, cmd_st, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 564, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, cmd_st, do_fork)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 240, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 134, in RunBuiltin
    status = builtin_func.Run(cmd_val)
  File "/home/andy/git/oilshell/oil/osh/builtin_bracket.py", line 266, in Run
    b = bool_ev.EvalB(bool_node)
  File "/home/andy/git/oilshell/oil/osh/sh_expr_eval.py", line 935, in EvalB
    return bool_stat.DoUnaryOp(op_id, s)
  File "/home/andy/git/oilshell/oil/osh/bool_stat.py", line 47, in DoUnaryOp
    st = posix.stat(s)
TypeError: stat() argument 1 must be encoded string without null bytes, not str
osh_.cc6 NUL bytes with test -f

[osh_.cc stdout] Expected 'status=1\nstatus=0\nstatus=0\nstatus=1\n', got 'status=1\nstatus=0\nstatus=1\nstatus=1\n'

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

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

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

[osh_.cc stdout] Expected 'empty=0\nnul=1\n', got 'empty=0\nnul=0\n'

stdout:
empty=0
nul=0
stderr: