Results for builtin-cd.test.sh

statusbashdashashzshmkshkshtoyshsushbrushosh
pass 26242424191914172325
ok 1111500000
N-I 1110000000
BUG 0223400000
FAIL 000009141153
total28282828282828282828
casebashdashashzshmkshkshtoyshsushbrushoshdescription
0pass pass pass pass pass pass pass pass pass pass cd and $PWD
1pass BUG BUG pass BUG FAIL FAIL FAIL pass FAIL cd BAD/..
detailsdetailsdetailsdetailsdetailsdetailsdetails
2pass N-I N-I pass pass pass pass pass FAIL pass cd with 2 or more args - with strict_arg_parse
detailsdetailsdetails
3ok pass pass ok ok FAIL FAIL FAIL pass pass cd with 2 or more args is allowed (strict_arg_parse disabled)
detailsdetailsdetailsdetailsdetailsdetails
4pass BUG BUG BUG ok FAIL pass FAIL pass pass cd - without OLDPWD
detailsdetailsdetailsdetailsdetailsdetails
5pass pass pass BUG BUG FAIL FAIL FAIL pass pass $OLDPWD
detailsdetailsdetailsdetailsdetails
6pass pass pass pass pass pass pass pass pass pass pwd
7pass pass pass pass pass pass pass pass pass pass pwd after cd ..
8pass pass pass pass pass pass FAIL pass pass pass pwd with symlink and -P
details
9pass pass pass pass pass pass pass pass pass pass setting $PWD doesn't affect the value of 'pwd' builtin
10pass pass pass pass pass pass FAIL pass pass pass unset PWD; then pwd
details
11pass pass pass pass pass pass pass pass pass pass 'unset PWD; pwd' before any cd (tickles a rare corner case)
12pass pass pass pass pass pass pass pass pass pass lie about PWD; pwd before any cd
13pass pass pass pass ok FAIL FAIL pass pass pass remove pwd dir
detailsdetailsdetails
14pass pass pass pass ok FAIL FAIL FAIL FAIL pass pwd in symlinked dir on shell initialization
detailsdetailsdetailsdetailsdetails
15pass pass pass pass pass pass pass pass pass pass Test the current directory after 'cd ..' involving symlinks
16pass pass pass pass pass pass pass pass pass pass cd with no arguments
17pass ok ok pass ok FAIL pass pass pass pass cd to nonexistent dir
detailsdetailsdetailsdetails
18pass pass pass pass pass pass pass pass pass pass cd away from dir that was deleted
19pass pass pass pass pass pass pass pass pass pass cd permits double bare dash
20pass pass pass pass pass pass FAIL FAIL pass pass cd to symlink with -L and -P
detailsdetails
21pass pass pass pass pass pass FAIL FAIL pass pass cd to relative path with -L and -P
detailsdetails
22pass pass pass pass pass pass pass pass pass pass unset PWD; cd /tmp is allowed (regression)
23pass pass pass BUG pass pass FAIL FAIL FAIL FAIL CDPATH is respected
detailsdetailsdetailsdetailsdetails
24pass pass pass pass pass pass FAIL pass pass pass Change directory in non-shell parent process (make or Python)
details
25pass pass pass pass BUG FAIL FAIL FAIL pass pass What happens when inherited $PWD and current dir disagree?
detailsdetailsdetailsdetails
26pass pass pass pass BUG FAIL FAIL FAIL FAIL FAIL Survey of getcwd() syscall
detailsdetailsdetailsdetailsdetailsdetails
27N-I pass pass pass pass pass FAIL FAIL FAIL pass chdir is a synonym for cd - busybox ash
detailsdetailsdetailsdetails
215 passed, 9 OK, 3 not implemented, 11 BUG, 42 failed, 0 timeouts, 0 cases skipped
3 failed under osh

Details on runs that didn't PASS

dash1 cd BAD/..

stdout:
status=0
stderr:
ash1 cd BAD/..

stdout:
status=0
stderr:
mksh1 cd BAD/..

stdout:
status=0
stderr:
ksh1 cd BAD/..

[ksh stdout] Expected 'status=1\n' Got 'status=0\n'

stdout:
status=0
stderr:
toysh1 cd BAD/..

[toysh stdout] Expected 'status=1\n' Got 'status=0\n'

stdout:
status=0
stderr:
sush1 cd BAD/..

[sush stdout] Expected 'status=1\n' Got 'status=0\n'

stdout:
status=0
stderr:
osh1 cd BAD/..

[osh stdout] Expected 'status=1\n' Got 'status=0\n'

stdout:
status=0
stderr:
dash2 cd with 2 or more args - with strict_arg_parse

stdout:
status=0
status=0
stderr:
dash: 1: shopt: not found
ash2 cd with 2 or more args - with strict_arg_parse

stdout:
status=0
status=0
stderr:
ash: shopt: not found
brush2 cd with 2 or more args - with strict_arg_parse

[brush stdout] Expected 'status=0\nstatus=0\nfailed with multiple args\n' Got 'status=0\nstatus=0\n'

stdout:
status=0
status=0
stderr:
shopt: strict_arg_parse: invalid shell option name
error: unexpected argument 'bar' found

Usage: cd [OPTIONS] [TARGET_DIR]

For more information, try '--help'.

bash3 cd with 2 or more args is allowed (strict_arg_parse disabled)

stdout:
stderr: 
bash: line 2: cd: too many arguments
zsh3 cd with 2 or more args is allowed (strict_arg_parse disabled)

stdout:
stderr: 
cd: string not in pwd: foo
mksh3 cd with 2 or more args is allowed (strict_arg_parse disabled)

stdout:
stderr: 
mksh: <stdin>[2]: cd: bad substitution
ksh3 cd with 2 or more args is allowed (strict_arg_parse disabled)

[ksh status] Expected 0 Got 2

stdout:
stderr: 
E: ksh: <stdin>[2]: cd: bad substitution
toysh3 cd with 2 or more args is allowed (strict_arg_parse disabled)

[toysh status] Expected 0 Got 1

stdout:
stderr: 
cd: Max 1 argument (see "cd --help")
sush3 cd with 2 or more args is allowed (strict_arg_parse disabled)

[sush status] Expected 0 Got 1

stdout:
stderr: 
sush: cd: too many arguments
dash4 cd - without OLDPWD

stdout:
status=0
stderr:
ash4 cd - without OLDPWD

stdout:
status=0
stderr:
zsh4 cd - without OLDPWD

stdout:
status=0
stderr:
mksh4 cd - without OLDPWD

stdout:
status=2
stderr:
mksh: <stdin>[1]: cd: no OLDPWD
ksh4 cd - without OLDPWD

[ksh stdout] Expected 'status=1\n' Got 'status=2\n'

stdout:
status=2
stderr:
E: ksh: <stdin>[1]: cd: no OLDPWD
sush4 cd - without OLDPWD

[sush stdout] Expected 'status=1\n' Got 'status=0\n'

stdout:
status=0
stderr:
zsh5 $OLDPWD

stdout:
old: /
OLDPWD=/
stderr:
mksh5 $OLDPWD

stdout:
old: /
/
stderr:
ksh5 $OLDPWD

[ksh stdout] Expected 'old: /\nOLDPWD=/\n/\n' Got 'old: /\n/\n'

stdout:
old: /
/
stderr:
toysh5 $OLDPWD

[toysh stdout] Expected 'old: /\nOLDPWD=/\n/\n' Got 'old: /\nOLDPWD=/\n'

stdout:
old: /
OLDPWD=/
stderr:
sush5 $OLDPWD

[sush stdout] Expected 'old: /\nOLDPWD=/\n/\n' Got 'old: /\n/\n'

stdout:
old: /
/
stderr:
toysh8 pwd with symlink and -P

[toysh stdout] Expected 'pwd:\nsymlink\npwd -P:\ntarget\n' Got 'pwd:\ntarget\npwd -P:\ntarget\n'

stdout:
pwd:
target
pwd -P:
target
stderr:
toysh10 unset PWD; then pwd

[toysh status] Expected 0 Got -6

stdout:
PWD=
/tmp/oil-spec-test/pwd
PWD=
stderr:
free(): double free detected in tcache 2
mksh13 remove pwd dir

stdout:
/tmp/oil-spec-test/pwd
status=0
status=1
stderr:
mksh: <stdin>[7]: pwd: can't determine current directory: No such file or directory
ksh13 remove pwd dir

[ksh stdout] Expected '/tmp/oil-spec-test/pwd\nstatus=0\n/tmp/oil-spec-test/pwd\nstatus=0\n' Got '/tmp/oil-spec-test/pwd\nstatus=0\nstatus=1\n'

stdout:
/tmp/oil-spec-test/pwd
status=0
status=1
stderr:
E: ksh: <stdin>[7]: pwd: can't determine current directory: No such file or directory
toysh13 remove pwd dir

[toysh stdout] Expected '/tmp/oil-spec-test/pwd\nstatus=0\n/tmp/oil-spec-test/pwd\nstatus=0\n' Got '/tmp/oil-spec-test/pwd\nstatus=0\nstatus=1\n'

stdout:
/tmp/oil-spec-test/pwd
status=0
status=1
stderr:
pwd: xgetcwd: No such file or directory
mksh14 pwd in symlinked dir on shell initialization

stdout:
target
target
stderr:
ksh14 pwd in symlinked dir on shell initialization

[ksh stdout] Expected 'symlink\ntarget\n' Got 'target\ntarget\n'

stdout:
target
target
stderr:
toysh14 pwd in symlinked dir on shell initialization

[toysh stdout] Expected 'symlink\ntarget\n' Got 'target\ntarget\n'
[toysh stderr] Expected u'' Got 'free(): double free detected in tcache 2\n'
[toysh status] Expected 0 Got -6

stdout:
target
target
stderr:
free(): double free detected in tcache 2
sush14 pwd in symlinked dir on shell initialization

[sush stdout] Expected 'symlink\ntarget\n' Got 'target\ntarget\n'

stdout:
target
target
stderr:
brush14 pwd in symlinked dir on shell initialization

[brush stdout] Expected 'symlink\ntarget\n' Got 'target\ntarget\n'

stdout:
target
target
stderr:
dash17 cd to nonexistent dir

stdout:
status=2
stderr:
dash: 1: cd: can't cd to /nonexistent/dir
ash17 cd to nonexistent dir

stdout:
status=2
stderr:
ash: cd: line 1: can't cd to /nonexistent/dir: No such file or directory
mksh17 cd to nonexistent dir

stdout:
status=2
stderr:
mksh: <stdin>[1]: cd: /nonexistent/dir: No such file or directory
ksh17 cd to nonexistent dir

[ksh stdout] Expected 'status=1\n' Got 'status=2\n'

stdout:
status=2
stderr:
E: ksh: <stdin>[1]: cd: /nonexistent/dir: No such file or directory
toysh20 cd to symlink with -L and -P

[toysh stdout] Expected 'OK\nOK\nOK\n' Got 'OK\n'

stdout:
OK
stderr:
sush20 cd to symlink with -L and -P

[sush stdout] Expected 'OK\nOK\nOK\n' Got 'OK\nOK\n/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/20-sush/cd-symlink\n'

stdout:
OK
OK
/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/20-sush/cd-symlink
stderr:
sush: cd: too many arguments
sush: cd: too many arguments
toysh21 cd to relative path with -L and -P

[toysh stdout] Expected 'OK\nOK\nOK\n' Got 'failed\n'
[toysh status] Expected 0 Got 1

stdout:
failed
stderr:
sush21 cd to relative path with -L and -P

[sush stdout] Expected 'OK\nOK\nOK\n' Got 'OK\n/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/21-sush/cd-symlink/subdir\n'

stdout:
OK
/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/21-sush/cd-symlink/subdir
stderr:
sush: cd: too many arguments
sush: cd: too many arguments
zsh23 CDPATH is respected

stdout:
status=0
/tmp/spam/foo
stderr:
toysh23 CDPATH is respected

[toysh stdout] Expected '/tmp/spam/foo\nstatus=0\n/tmp/spam/foo\n' Got 'status=1\n/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/23-toysh\n'

stdout:
status=1
/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/23-toysh
stderr:
cd: foo: No such file or directory
sush23 CDPATH is respected

[sush stdout] Expected '/tmp/spam/foo\nstatus=0\n/tmp/spam/foo\n' Got 'status=1\n/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/23-sush\n'

stdout:
status=1
/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/23-sush
stderr:
sush: cd: "/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/23-sush/foo": No such file or directory
brush23 CDPATH is respected

[brush stdout] Expected '/tmp/spam/foo\nstatus=0\n/tmp/spam/foo\n' Got 'status=1\n/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/23-brush\n'

stdout:
status=1
/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/23-brush
stderr:
error: cd: i/o error: No such file or directory (os error 2)
osh23 CDPATH is respected

[osh stdout] Expected '/tmp/spam/foo\nstatus=0\n/tmp/spam/foo\n' Got 'status=1\n/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/23-osh\n'

stdout:
status=1
/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/23-osh
stderr:
  cd foo
     ^~~
[ stdin ]:5: cd '/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/23-osh/foo': No such file or directory
toysh24 Change directory in non-shell parent process (make or Python)

[toysh stdout] Expected '/cpan/Encode/Byte\n' Got '\n'
[toysh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
set: bad --
Python PWD = '/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/24-toysh'
Python argv = ['']
Traceback (most recent call last):
  File "<string>", line 10, in <module>
  File "/home/andy/git/oils-for-unix/oils.DEPS/wedge/python2/2.7.18/lib/python2.7/subprocess.py", line 185, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/home/andy/git/oils-for-unix/oils.DEPS/wedge/python2/2.7.18/lib/python2.7/subprocess.py", line 172, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/home/andy/git/oils-for-unix/oils.DEPS/wedge/python2/2.7.18/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/home/andy/git/oils-for-unix/oils.DEPS/wedge/python2/2.7.18/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied
mksh25 What happens when inherited $PWD and current dir disagree?

stdout:
Python PWD = None
PWD = /tmp/osh-spec-cd/cpan/Encode
/tmp/osh-spec-cd/cpan/Encode
cd=0
PWD = /tmp/osh-spec-cd/cpan/Encode/Byte
/tmp/osh-spec-cd/cpan/Encode/Byte
stderr:
Python argv = ['mksh', '-c', '\necho "PWD = $PWD"; pwd\ncd Byte; echo cd=$?\necho "PWD = $PWD"; pwd\n']
ksh25 What happens when inherited $PWD and current dir disagree?

[ksh stdout] Expected "Python PWD = '/tmp/osh-spec-cd'\nPWD = /tmp/osh-spec-cd/cpan/Encode\n/tmp/osh-spec-cd/cpan/Encode\ncd=0\nPWD = /tmp/osh-spec-cd/cpan/Encode/Byte\n/tmp/osh-spec-cd/cpan/Encode/Byte\n" Got 'Python PWD = None\nPWD = /tmp/osh-spec-cd/cpan/Encode\n/tmp/osh-spec-cd/cpan/Encode\ncd=0\nPWD = /tmp/osh-spec-cd/cpan/Encode/Byte\n/tmp/osh-spec-cd/cpan/Encode/Byte\n'

stdout:
Python PWD = None
PWD = /tmp/osh-spec-cd/cpan/Encode
/tmp/osh-spec-cd/cpan/Encode
cd=0
PWD = /tmp/osh-spec-cd/cpan/Encode/Byte
/tmp/osh-spec-cd/cpan/Encode/Byte
stderr:
Python argv = ['ksh', '-c', '\necho "PWD = $PWD"; pwd\ncd Byte; echo cd=$?\necho "PWD = $PWD"; pwd\n']
toysh25 What happens when inherited $PWD and current dir disagree?

[toysh stdout] Expected "Python PWD = '/tmp/osh-spec-cd'\nPWD = /tmp/osh-spec-cd/cpan/Encode\n/tmp/osh-spec-cd/cpan/Encode\ncd=0\nPWD = /tmp/osh-spec-cd/cpan/Encode/Byte\n/tmp/osh-spec-cd/cpan/Encode/Byte\n" Got "Python PWD = '/tmp/osh-spec-cd'\n"
[toysh status] Expected 0 Got 1
[toysh stderr] Found 'Traceback (most recent'

stdout:
Python PWD = '/tmp/osh-spec-cd'
stderr:
set: bad --
Python argv = ['']
Traceback (most recent call last):
  File "<string>", line 12, in <module>
  File "/home/andy/git/oils-for-unix/oils.DEPS/wedge/python2/2.7.18/lib/python2.7/subprocess.py", line 185, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/home/andy/git/oils-for-unix/oils.DEPS/wedge/python2/2.7.18/lib/python2.7/subprocess.py", line 172, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/home/andy/git/oils-for-unix/oils.DEPS/wedge/python2/2.7.18/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/home/andy/git/oils-for-unix/oils.DEPS/wedge/python2/2.7.18/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied
sush25 What happens when inherited $PWD and current dir disagree?

[sush stdout] Expected "Python PWD = '/tmp/osh-spec-cd'\nPWD = /tmp/osh-spec-cd/cpan/Encode\n/tmp/osh-spec-cd/cpan/Encode\ncd=0\nPWD = /tmp/osh-spec-cd/cpan/Encode/Byte\n/tmp/osh-spec-cd/cpan/Encode/Byte\n" Got 'Python PWD = None\nPWD = \n/tmp/osh-spec-cd/cpan/Encode\ncd=0\nPWD = /tmp/osh-spec-cd/cpan/Encode/Byte\n/tmp/osh-spec-cd/cpan/Encode/Byte\n'

stdout:
Python PWD = None
PWD = 
/tmp/osh-spec-cd/cpan/Encode
cd=0
PWD = /tmp/osh-spec-cd/cpan/Encode/Byte
/tmp/osh-spec-cd/cpan/Encode/Byte
stderr:
Python argv = ['/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush', '-c', '\necho "PWD = $PWD"; pwd\ncd Byte; echo cd=$?\necho "PWD = $PWD"; pwd\n']
mksh26 Survey of getcwd() syscall

stdout:
2 err.txt
stderr:
ksh26 Survey of getcwd() syscall

[ksh stdout] Expected '1 err.txt\n' Got '2 err.txt\n'

stdout:
2 err.txt
stderr:
toysh26 Survey of getcwd() syscall

[toysh stdout] Expected '1 err.txt\n' Got '2 err.txt\n'

stdout:
2 err.txt
stderr:
sush26 Survey of getcwd() syscall

[sush stdout] Expected '1 err.txt\n' Got '2 err.txt\n'

stdout:
2 err.txt
stderr:
brush26 Survey of getcwd() syscall

[brush stdout] Expected '1 err.txt\n' Got '2 err.txt\n'

stdout:
2 err.txt
stderr:
osh26 Survey of getcwd() syscall

[osh stdout] Expected '1 err.txt\n' Got '2 err.txt\n'

stdout:
2 err.txt
stderr:
bash27 chdir is a synonym for cd - busybox ash

stdout:
fail
stderr:
bash: line 1: chdir: command not found
toysh27 chdir is a synonym for cd - busybox ash

[toysh stdout] Expected '/tmp\n' Got 'fail\n'

stdout:
fail
stderr:
sh: chdir: No such file or directory
sush27 chdir is a synonym for cd - busybox ash

[sush stdout] Expected '/tmp\n' Got 'fail\n'

stdout:
fail
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: chdir: command not found
brush27 chdir is a synonym for cd - busybox ash

[brush stdout] Expected '/tmp\n' Got '/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/27-brush\n'

stdout:
/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/27-brush
stderr:
error: command not found: chdir