Results for builtin-process.test.sh

statusbashdashashzshmkshkshtoyshsushbrushosh
pass 211720201919681726
ok 1200100000
N-I 1201100000
BUG 5707700000
FAIL 0080092219112
TIME 0000000100
total28282828282828282828
casebashdashashzshmkshkshtoyshsushbrushoshdescription
0pass pass pass pass pass pass pass pass pass pass exec builtin
1pass pass pass pass pass pass pass pass pass pass exec builtin with redirects
2pass pass pass pass pass pass FAIL pass FAIL pass exec builtin with here doc
detailsdetails
3pass BUG pass pass pass pass pass FAIL pass pass exec builtin accepts --
detailsdetails
4pass BUG pass pass BUG FAIL pass FAIL pass pass exec -- 2>&1
detailsdetailsdetailsdetails
5pass pass pass pass pass pass pass pass pass pass Exit out of function
6ok ok FAIL BUG pass pass FAIL pass FAIL pass Exit builtin with invalid arg
detailsdetailsdetailsdetailsdetailsdetails
7BUG BUG FAIL BUG ok FAIL FAIL FAIL FAIL pass Exit builtin with too many args
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
8pass N-I FAIL BUG pass pass FAIL pass pass pass time with brace group argument
detailsdetailsdetailsdetails
9pass pass pass pass pass pass FAIL FAIL pass pass get umask
detailsdetails
10pass pass pass pass pass pass FAIL FAIL pass pass set umask in octal
detailsdetails
11pass pass pass pass pass pass FAIL FAIL FAIL FAIL set umask symbolically
detailsdetailsdetailsdetails
12pass pass pass pass pass pass FAIL FAIL pass pass ulimit with no flags is like -f
detailsdetails
13BUG pass pass BUG pass pass pass pass pass pass ulimit too many args
detailsdetails
14pass pass pass pass pass pass FAIL FAIL pass pass ulimit negative flag
detailsdetails
15pass pass FAIL pass BUG FAIL FAIL FAIL pass pass ulimit negative arg
detailsdetailsdetailsdetailsdetails
16BUG pass FAIL pass pass pass FAIL pass FAIL pass ulimit -a doesn't take arg
detailsdetailsdetailsdetails
17BUG BUG FAIL BUG BUG FAIL FAIL FAIL FAIL pass ulimit doesn't accept multiple flags - reduce confusion between shells
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
18N-I N-I FAIL N-I N-I FAIL FAIL FAIL FAIL pass YSH readability: ulimit --all the same as ulimit -a
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
19pass pass pass pass pass pass FAIL FAIL pass pass ulimit accepts 'unlimited'
detailsdetails
20pass pass pass pass BUG FAIL FAIL FAIL pass pass ulimit of 2**32, 2**31 (int overflow)
detailsdetailsdetailsdetails
21pass pass pass pass BUG FAIL FAIL FAIL pass pass ulimit that is 64 bits
detailsdetailsdetailsdetails
22pass BUG FAIL BUG BUG FAIL FAIL FAIL FAIL pass arg that would overflow 64 bits is detected
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
23BUG pass pass pass pass pass FAIL TIME FAIL pass ulimit -f 1 prevents files larger 512 bytes
detailsdetailsdetailsdetails
24pass pass pass pass pass pass FAIL FAIL pass pass write big file with ulimit
detailsdetails
25pass BUG pass BUG pass pass FAIL FAIL FAIL pass ulimit -S for soft limit (default), -H for hard limit
detailsdetailsdetailsdetailsdetails
26pass BUG pass pass BUG FAIL FAIL FAIL FAIL pass Changing resource limit is denied
detailsdetailsdetailsdetailsdetailsdetails
27pass ok pass pass pass pass FAIL FAIL pass FAIL ulimit -n limits file descriptors
detailsdetailsdetailsdetails
173 passed, 4 OK, 5 not implemented, 26 BUG, 71 failed, 1 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

toysh2 exec builtin with here doc

[toysh stdout] Expected 'x=one\ny=two\nDONE\n', got 'x=\ny=\nDONE\n'

stdout:
x=
y=
DONE
stderr:
sh: read: No such file or directory
sh: read: No such file or directory
brush2 exec builtin with here doc

[brush stdout] Expected 'x=one\ny=two\nDONE\n', got 'x=\ny=\nDONE\n'

stdout:
x=
y=
DONE
stderr:
dash3 exec builtin accepts --

stdout:
stderr: 
dash: 1: exec: --: not found
sush3 exec builtin accepts --

[sush stdout] Expected 'hi\n', got ''
[sush status] Expected 0, got 127

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: --: command not found
dash4 exec -- 2>&1

stdout:
stderr: 
dash: 1: exec: --: not found
mksh4 exec -- 2>&1

stdout:
stderr: 
ksh4 exec -- 2>&1

[ksh stdout] Expected 'stdout\n', got ''
[ksh status] Expected 0, got -11

stdout:
stderr: 
sush4 exec -- 2>&1

[sush stdout] Expected 'stdout\n', got ''
[sush status] Expected 0, got 127

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: --: command not found
bash6 Exit builtin with invalid arg

stdout:
stderr: 
bash: line 1: exit: invalid: numeric argument required
dash6 Exit builtin with invalid arg

stdout:
stderr: 
dash: 1: exit: Illegal number: invalid
ash6 Exit builtin with invalid arg

[ash status] Expected 1, got 2

stdout:
stderr: 
ash: exit: line 1: Illegal number: invalid
zsh6 Exit builtin with invalid arg

stdout:
stderr: 
toysh6 Exit builtin with invalid arg

[toysh status] Expected 1, got 0

stdout:
stderr: 
brush6 Exit builtin with invalid arg

[brush status] Expected 1, got 2

stdout:
stderr: 
error: invalid value 'invalid' for '[CODE]': invalid digit found in string

For more information, try '--help'.

bash7 Exit builtin with too many args

stdout:
status=1
stderr:
bash: line 1: exit: too many arguments
dash7 Exit builtin with too many args

stdout:
stderr: 
ash7 Exit builtin with too many args

[ash status] Expected 2, got 7

stdout:
stderr: 
zsh7 Exit builtin with too many args

stdout:
status=1
stderr:
exit: too many arguments
mksh7 Exit builtin with too many args

stdout:
stderr: 
mksh: <stdin>[1]: exit: too many arguments
ksh7 Exit builtin with too many args

[ksh status] Expected 2, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: exit: too many arguments
toysh7 Exit builtin with too many args

[toysh status] Expected 2, got 7

stdout:
stderr: 
sush7 Exit builtin with too many args

[sush status] Expected 2, got 7

stdout:
stderr: 
brush7 Exit builtin with too many args

[brush stdout] Expected u'', got 'status=2\n'
[brush status] Expected 2, got 0

stdout:
status=2
stderr:
error: unexpected argument '8' found

Usage: exit [CODE]

For more information, try '--help'.

dash8 time with brace group argument

stdout:
stderr: 
time: cannot run {: No such file or directory
Command exited with non-zero status 127
0.00user 0.00system 0:00.00elapsed 92%CPU (0avgtext+0avgdata 1292maxresident)k
0inputs+0outputs (0major+101minor)pagefaults 0swaps
dash: 7: Syntax error: "}" unexpected
ash8 time with brace group argument

[ash stdout] Expected 'user\nresult=0\nnon-zero\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
time: cannot run {: No such file or directory
Command exited with non-zero status 127
0.00user 0.00system 0:00.00elapsed 92%CPU (0avgtext+0avgdata 1296maxresident)k
0inputs+0outputs (0major+101minor)pagefaults 0swaps
ash: syntax error: unexpected "}"
zsh8 time with brace group argument

stdout:
result=1
stderr:
toysh8 time with brace group argument

[toysh stdout] Expected 'user\nresult=0\nnon-zero\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
time: exec {: No such file or directory

real	0.000
user	0.498
sys	0.000
main: line 7: sh: syntax error: }
toysh9 get umask

[toysh status] Expected 0, got 1

stdout:
stderr: 
sh: umask: No such file or directory
sush9 get umask

[sush status] Expected 0, got 1

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: umask: command not found
toysh10 set umask in octal

[toysh stdout] Expected '664\n644\n', got '644\n644\n'
[toysh stderr] Expected u'', got 'sh: umask: No such file or directory\nsh: umask: No such file or directory\n'

stdout:
644
644
stderr:
sh: umask: No such file or directory
sh: umask: No such file or directory
sush10 set umask in octal

[sush stdout] Expected '664\n644\n', got '644\n644\n'
[sush stderr] Expected u'', got '/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: umask: command not found\n/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: umask: command not found\n'

stdout:
644
644
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: umask: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: umask: command not found
toysh11 set umask symbolically

[toysh stdout] Expected '664\n644\n', got '644\n644\n'
[toysh stderr] Expected u'', got 'sh: umask: No such file or directory\nsh: umask: No such file or directory\n'

stdout:
644
644
stderr:
sh: umask: No such file or directory
sh: umask: No such file or directory
sush11 set umask symbolically

[sush stdout] Expected '664\n644\n', got '644\n644\n'
[sush stderr] Expected u'', got '/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: umask: command not found\n/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: umask: command not found\n'

stdout:
644
644
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: umask: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: umask: command not found
brush11 set umask symbolically

[brush stdout] Expected '664\n644\n', got '664\n664\n'
[brush stderr] Expected u'', got '\x1b[33m WARN\x1b[0m not yet implemented: umask setting mode from symbolic value\n'

stdout:
664
664
stderr:
 WARN not yet implemented: umask setting mode from symbolic value
osh11 set umask symbolically

[osh stdout] Expected '664\n644\n', got '664\n664\n'
[osh stderr] Expected u'', got "oils warning: umask with symbolic input isn't implemented\n"

stdout:
664
664
stderr:
oils warning: umask with symbolic input isn't implemented
toysh12 ulimit with no flags is like -f

[toysh stdout] Expected 'status=0\nstatus=0\ndiff=0\n', got 'status=127\nstatus=127\ndiff=0\n'

stdout:
status=127
status=127
diff=0
stderr:
sh: ulimit: No such file or directory
sh: ulimit: No such file or directory
sush12 ulimit with no flags is like -f

[sush stdout] Expected 'status=0\nstatus=0\ndiff=0\n', got 'status=127\nstatus=127\ndiff=0\n'

stdout:
status=127
status=127
diff=0
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: ulimit: command not found
bash13 ulimit too many args

stdout:
fail
stderr:
zsh13 ulimit too many args

stdout:
fail
stderr:
toysh14 ulimit negative flag

[toysh stdout] Expected 'unlimited\npass\n', got 'pass\n'

stdout:
pass
stderr:
sh: ulimit: No such file or directory
sh: ulimit: No such file or directory
sush14 ulimit negative flag

[sush stdout] Expected 'unlimited\npass\n', got 'pass\n'

stdout:
pass
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: ulimit: command not found
ash15 ulimit negative arg

[ash stdout] Expected 'unlimited\npass\n', got 'unlimited\nunlimited\nfail\n'

stdout:
unlimited
unlimited
fail
stderr:
mksh15 ulimit negative arg

stdout:
unlimited
fail
stderr:
ksh15 ulimit negative arg

[ksh stdout] Expected 'unlimited\npass\n', got 'unlimited\nfail\n'

stdout:
unlimited
fail
stderr:
toysh15 ulimit negative arg

[toysh stdout] Expected 'unlimited\npass\n', got 'pass\n'

stdout:
pass
stderr:
sh: ulimit: No such file or directory
sh: ulimit: No such file or directory
sush15 ulimit negative arg

[sush stdout] Expected 'unlimited\npass\n', got 'pass\n'

stdout:
pass
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: ulimit: command not found
bash16 ulimit -a doesn't take arg

stdout:
stderr: 
ash16 ulimit -a doesn't take arg

[ash stdout] Expected 'failure that was expected\n', got 'core file size (blocks) (-c) 0\ndata seg size (kb) (-d) unlimited\nscheduling priority (-e) 0\nfile size (blocks) (-f) unlimited\npending signals (-i) 62293\nmax locked memory (kb) (-l) 2001828\nmax memory size (kb) (-m) unlimited\nopen files (-n) 1024\nPOSIX message queues (bytes) (-q) 819200\nreal-time priority (-r) 0\nstack size (kb) (-s) 8192\ncpu time (seconds) (-t) unlimited\nmax user processes (-u) 62293\nvirtual memory (kb) (-v) unlimited\nfile locks (-x) unlimited\n'

stdout:
core file size (blocks)         (-c) 0
data seg size (kb)              (-d) unlimited
scheduling priority             (-e) 0
file size (blocks)              (-f) unlimited
pending signals                 (-i) 62293
max locked memory (kb)          (-l) 2001828
max memory size (kb)            (-m) unlimited
open files                      (-n) 1024
POSIX message queues (bytes)    (-q) 819200
real-time priority              (-r) 0
stack size (kb)                 (-s) 8192
cpu time (seconds)              (-t) unlimited
max user processes              (-u) 62293
virtual memory (kb)             (-v) unlimited
file locks                      (-x) unlimited
stderr:
toysh16 ulimit -a doesn't take arg

[toysh stdout] Expected 'failure that was expected\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
brush16 ulimit -a doesn't take arg

[brush stdout] Expected 'failure that was expected\n', got 'core file size (block, -c) 0\ndata seg size (kbytes, -d) unlimited\nfile size (block, -f) unlimited\npending signals (-i) 62293\nmax locked memory (kbytes, -l) 2001828\nmax memory size (kbytes, -m) unlimited\nfile locks (-x) unlimited\nopen files (-n) 1024\npipe size (512 bytes, -p) 5\nscheduling priority (-e) 0\nPOSIX message queues (bytes, -q) 819200\nreal-time priority (-r) 0\nreal-time non-blocking time(microseconds, -R) unlimited\nstack size (kbytes, -s) 8192\ncpu time (seconds, -t) unlimited\nmax user processes (-u) 62293\nvirtual memory (kbytes, -v) unlimited\n'

stdout:
core file size                 (block, -c) 0
data seg size                 (kbytes, -d) unlimited
file size                      (block, -f) unlimited
pending signals                       (-i) 62293
max locked memory             (kbytes, -l) 2001828
max memory size               (kbytes, -m) unlimited
file locks                            (-x) unlimited
open files                            (-n) 1024
pipe size                  (512 bytes, -p) 5
scheduling priority                   (-e) 0
POSIX message queues           (bytes, -q) 819200
real-time priority                    (-r) 0
real-time non-blocking time(microseconds, -R) unlimited
stack size                    (kbytes, -s) 8192
cpu time                     (seconds, -t) unlimited
max user processes                    (-u) 62293
virtual memory                (kbytes, -v) unlimited
stderr:
bash17 ulimit doesn't accept multiple flags - reduce confusion between shells

stdout:
status=0
status=0
status=0
stderr:
dash17 ulimit doesn't accept multiple flags - reduce confusion between shells

stdout:
status=0
status=0
status=0
stderr:
ash17 ulimit doesn't accept multiple flags - reduce confusion between shells

[ash stdout] Expected 'status=2\nstatus=2\nstatus=2\n', got 'status=0\nstatus=0\nstatus=0\n'

stdout:
status=0
status=0
status=0
stderr:
zsh17 ulimit doesn't accept multiple flags - reduce confusion between shells

stdout:
status=1
status=0
status=0
stderr:
ulimit: no limits allowed with -a
mksh17 ulimit doesn't accept multiple flags - reduce confusion between shells

stdout:
status=0
status=0
status=0
stderr:
ksh17 ulimit doesn't accept multiple flags - reduce confusion between shells

[ksh stdout] Expected 'status=2\nstatus=2\nstatus=2\n', got 'status=0\nstatus=0\nstatus=0\n'

stdout:
status=0
status=0
status=0
stderr:
toysh17 ulimit doesn't accept multiple flags - reduce confusion between shells

[toysh stdout] Expected 'status=2\nstatus=2\nstatus=2\n', got 'status=127\nstatus=127\nstatus=127\n'

stdout:
status=127
status=127
status=127
stderr:
sh: ulimit: No such file or directory
sh: ulimit: No such file or directory
sh: ulimit: No such file or directory
sush17 ulimit doesn't accept multiple flags - reduce confusion between shells

[sush stdout] Expected 'status=2\nstatus=2\nstatus=2\n', got 'status=127\nstatus=127\nstatus=127\n'

stdout:
status=127
status=127
status=127
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: ulimit: command not found
brush17 ulimit doesn't accept multiple flags - reduce confusion between shells

[brush stdout] Expected 'status=2\nstatus=2\nstatus=2\n', got 'status=0\nstatus=0\nstatus=0\n'

stdout:
status=0
status=0
status=0
stderr:
bash18 YSH readability: ulimit --all the same as ulimit -a

stdout:
stderr: 
dash18 YSH readability: ulimit --all the same as ulimit -a

stdout:
stderr: 
ash18 YSH readability: ulimit --all the same as ulimit -a

[ash stdout] Expected ' 8 short.txt\n 8 long.txt\n 16 total\nstatus=0\n' Got ' 15 short.txt\n 0 long.txt\n 15 total\n--- short.txt\t2025-06-19 17:22:58.549138387 -0400\n+++ long.txt\t2025-06-19 17:22:58.549138387 -0400\n@@ -1,15 +0,0 @@\n-core file size (blocks) (-c) 0\n-data seg size (kb) (-d) unlimited\n-scheduling priority (-e) 0\n-file size (blocks) (-f) unlimited\n-pending signals (-i) 62293\n-max locked memory (kb) (-l) 2001828\n-max memory size (kb) (-m) unlimited\n-open files (-n) 1024\n-POSIX message queues (bytes) (-q) 819200\n-real-time priority (-r) 0\n-stack size (kb) (-s) 8192\n-cpu time (seconds) (-t) unlimited\n-max user processes (-u) 62293\n-virtual memory (kb) (-v) unlimited\n-file locks (-x) unlimited\nstatus=1\n'

stdout:
 15 short.txt
  0 long.txt
 15 total
--- short.txt	2025-06-19 17:22:58.549138387 -0400
+++ long.txt	2025-06-19 17:22:58.549138387 -0400
@@ -1,15 +0,0 @@
-core file size (blocks)         (-c) 0
-data seg size (kb)              (-d) unlimited
-scheduling priority             (-e) 0
-file size (blocks)              (-f) unlimited
-pending signals                 (-i) 62293
-max locked memory (kb)          (-l) 2001828
-max memory size (kb)            (-m) unlimited
-open files                      (-n) 1024
-POSIX message queues (bytes)    (-q) 819200
-real-time priority              (-r) 0
-stack size (kb)                 (-s) 8192
-cpu time (seconds)              (-t) unlimited
-max user processes              (-u) 62293
-virtual memory (kb)             (-v) unlimited
-file locks                      (-x) unlimited
status=1
stderr:
ulimit: invalid option -- '-'
zsh18 YSH readability: ulimit --all the same as ulimit -a

stdout:
stderr: 
mksh18 YSH readability: ulimit --all the same as ulimit -a

stdout:
stderr: 
ksh18 YSH readability: ulimit --all the same as ulimit -a

[ksh stdout] Expected ' 8 short.txt\n 8 long.txt\n 16 total\nstatus=0\n' Got ' 15 short.txt\n 0 long.txt\n 15 total\n--- short.txt\t2025-06-19 17:22:58.565138676 -0400\n+++ long.txt\t2025-06-19 17:22:58.565138676 -0400\n@@ -1,15 +0,0 @@\n--t: time(cpu-seconds) unlimited\n--f: file(blocks) unlimited\n--c: coredump(blocks) 0\n--d: data(KiB) unlimited\n--s: stack(KiB) 8192\n--l: lockedmem(KiB) 2001828\n--n: nofiles(descriptors) 1024\n--p: processes 62293\n--i: sigpending 62293\n--q: msgqueue(bytes) 819200\n--e: maxnice 0\n--R: rttime(ms) unlimited\n--r: maxrtprio 0\n--v: address-space(KiB) unlimited\n--x: filelocks unlimited\nstatus=1\n'

stdout:
 15 short.txt
  0 long.txt
 15 total
--- short.txt	2025-06-19 17:22:58.565138676 -0400
+++ long.txt	2025-06-19 17:22:58.565138676 -0400
@@ -1,15 +0,0 @@
--t: time(cpu-seconds)     unlimited
--f: file(blocks)          unlimited
--c: coredump(blocks)      0
--d: data(KiB)             unlimited
--s: stack(KiB)            8192
--l: lockedmem(KiB)        2001828
--n: nofiles(descriptors)  1024
--p: processes             62293
--i: sigpending            62293
--q: msgqueue(bytes)       819200
--e: maxnice               0
--R: rttime(ms)            unlimited
--r: maxrtprio             0
--v: address-space(KiB)    unlimited
--x: filelocks             unlimited
status=1
stderr:
E: ksh: <stdin>[4]: ulimit: --: unknown option
E: ksh: <stdin>[4]: ulimit: usage: ulimit [-acdefHilnpqRrSstvx] [value]
toysh18 YSH readability: ulimit --all the same as ulimit -a

[toysh stdout] Expected ' 8 short.txt\n 8 long.txt\n 16 total\nstatus=0\n' Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush18 YSH readability: ulimit --all the same as ulimit -a

[sush stdout] Expected ' 8 short.txt\n 8 long.txt\n 16 total\nstatus=0\n' Got '0 short.txt\n0 long.txt\n0 total\nstatus=0\n'

stdout:
0 short.txt
0 long.txt
0 total
status=0
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: ulimit: command not found
brush18 YSH readability: ulimit --all the same as ulimit -a

[brush stdout] Expected ' 8 short.txt\n 8 long.txt\n 16 total\nstatus=0\n' Got ' 17 short.txt\n 0 long.txt\n 17 total\n--- short.txt\t2025-06-19 17:22:58.609139474 -0400\n+++ long.txt\t2025-06-19 17:22:58.609139474 -0400\n@@ -1,17 +0,0 @@\n-core file size (block, -c) 0\n-data seg size (kbytes, -d) unlimited\n-file size (block, -f) unlimited\n-pending signals (-i) 62293\n-max locked memory (kbytes, -l) 2001828\n-max memory size (kbytes, -m) unlimited\n-file locks (-x) unlimited\n-open files (-n) 1024\n-pipe size (512 bytes, -p) 5\n-scheduling priority (-e) 0\n-POSIX message queues (bytes, -q) 819200\n-real-time priority (-r) 0\n-real-time non-blocking time(microseconds, -R) unlimited\n-stack size (kbytes, -s) 8192\n-cpu time (seconds, -t) unlimited\n-max user processes (-u) 62293\n-virtual memory (kbytes, -v) unlimited\nstatus=1\n'

stdout:
 17 short.txt
  0 long.txt
 17 total
--- short.txt	2025-06-19 17:22:58.609139474 -0400
+++ long.txt	2025-06-19 17:22:58.609139474 -0400
@@ -1,17 +0,0 @@
-core file size                 (block, -c) 0
-data seg size                 (kbytes, -d) unlimited
-file size                      (block, -f) unlimited
-pending signals                       (-i) 62293
-max locked memory             (kbytes, -l) 2001828
-max memory size               (kbytes, -m) unlimited
-file locks                            (-x) unlimited
-open files                            (-n) 1024
-pipe size                  (512 bytes, -p) 5
-scheduling priority                   (-e) 0
-POSIX message queues           (bytes, -q) 819200
-real-time priority                    (-r) 0
-real-time non-blocking time(microseconds, -R) unlimited
-stack size                    (kbytes, -s) 8192
-cpu time                     (seconds, -t) unlimited
-max user processes                    (-u) 62293
-virtual memory                (kbytes, -v) unlimited
status=1
stderr:
error: unexpected argument '--all' found

  tip: to pass '--all' as a value, use '-- --all'

Usage: ulimit [OPTIONS] [LIMIT]

For more information, try '--help'.

toysh19 ulimit accepts 'unlimited'

[toysh stdout] Expected ' arg zz\nunlimited\nstatus=0\nFAILED\n\n arg unlimited\nunlimited\nstatus=0\n\n' Got ' arg zz\nstatus=127\nFAILED\n\n arg unlimited\nstatus=127\nFAILED\n\n'

stdout:
  arg zz
status=127
FAILED

  arg unlimited
status=127
FAILED

stderr:
sh: ulimit: No such file or directory
sh: ulimit: No such file or directory
sh: ulimit: No such file or directory
sh: ulimit: No such file or directory
sush19 ulimit accepts 'unlimited'

[sush stdout] Expected ' arg zz\nunlimited\nstatus=0\nFAILED\n\n arg unlimited\nunlimited\nstatus=0\n\n' Got ' arg zz\nstatus=127\nFAILED\n\n arg unlimited\nstatus=127\nFAILED\n\n'

stdout:
  arg zz
status=127
FAILED

  arg unlimited
status=127
FAILED

stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: ulimit: command not found
mksh20 ulimit of 2**32, 2**31 (int overflow)

stdout:
one unlimited
two 1
three 1
stderr:
mksh: <stdin>[9]: ulimit: -2: unknown option
mksh: <stdin>[9]: ulimit: usage: ulimit [-acdefHilnpqrSstv] [value]
ksh20 ulimit of 2**32, 2**31 (int overflow)

[ksh stdout] Expected 'one unlimited\ntwo 4294967296\nthree 2147483648\n' Got 'one unlimited\ntwo 1\nthree 1\n'

stdout:
one unlimited
two 1
three 1
stderr:
E: ksh: <stdin>[9]: ulimit: -2: unknown option
E: ksh: <stdin>[9]: ulimit: usage: ulimit [-acdefHilnpqRrSstvx] [value]
toysh20 ulimit of 2**32, 2**31 (int overflow)

[toysh stdout] Expected 'one unlimited\ntwo 4294967296\nthree 2147483648\n' Got 'one two three '
[toysh status] Expected 0, got 127

stdout:
one two three 
stderr:
sh: ulimit: No such file or directory
sh: ulimit: No such file or directory
sh: ulimit: No such file or directory
sh: ulimit: No such file or directory
sh: ulimit: No such file or directory
sush20 ulimit of 2**32, 2**31 (int overflow)

[sush stdout] Expected 'one unlimited\ntwo 4294967296\nthree 2147483648\n' Got 'one two three '
[sush status] Expected 0, got 127

stdout:
one two three 
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 9: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 11: ulimit: command not found
mksh21 ulimit that is 64 bits

stdout:
stderr: 
ksh21 ulimit that is 64 bits

[ksh stdout] Expected 'before unlimited\nafter 9007199254740992\n' Got 'before unlimited\nafter 2097152\n'

stdout:
before unlimited
after 2097152
stderr:
toysh21 ulimit that is 64 bits

[toysh stdout] Expected 'before unlimited\nafter 9007199254740992\n' Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush21 ulimit that is 64 bits

[sush stdout] Expected 'before unlimited\nafter 9007199254740992\n' Got 'before after '
[sush status] Expected 0, got 127

stdout:
before after 
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 9: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 11: ulimit: command not found
dash22 arg that would overflow 64 bits is detected

stdout:
before unlimited
after 1
stderr:
ash22 arg that would overflow 64 bits is detected

[ash stdout] Expected 'before unlimited\nafter unlimited\n', got 'before unlimited\nafter 1\n'

stdout:
before unlimited
after 1
stderr:
zsh22 arg that would overflow 64 bits is detected

stdout:
before unlimited
after 1
stderr:
mksh22 arg that would overflow 64 bits is detected

stdout:
stderr: 
ksh22 arg that would overflow 64 bits is detected

[ksh stdout] Expected 'before unlimited\nafter unlimited\n', got 'before unlimited\nafter 1073741825\n'

stdout:
before unlimited
after 1073741825
stderr:
toysh22 arg that would overflow 64 bits is detected

[toysh stdout] Expected 'before unlimited\nafter unlimited\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush22 arg that would overflow 64 bits is detected

[sush stdout] Expected 'before unlimited\nafter unlimited\n', got 'before after '
[sush status] Expected 0, got 127

stdout:
before after 
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 9: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 10: ulimit: command not found
brush22 arg that would overflow 64 bits is detected

[brush stdout] Expected 'before unlimited\nafter unlimited\n', got 'before unlimited\nafter 1\n'

stdout:
before unlimited
after 1
stderr:
bash23 ulimit -f 1 prevents files larger 512 bytes

stdout:
512 status=0
513 status=0

 512 ok.txt
 513 too-big.txt
1025 total

stderr:
toysh23 ulimit -f 1 prevents files larger 512 bytes

[toysh stdout] Expected '512 status=0\n513 status=0\n\n 512 ok.txt\n 512 too-big.txt\n1024 total\n\nERROR: echo failed with status 1\n' Got '512 status=0\n513 status=0\n\n 512 ok.txt\n 513 too-big.txt\n1025 total\n\n'

stdout:
512 status=0
513 status=0

 512 ok.txt
 513 too-big.txt
1025 total

stderr:
sh: ulimit: No such file or directory
brush23 ulimit -f 1 prevents files larger 512 bytes

[brush stdout] Expected '512 status=0\n513 status=0\n\n 512 ok.txt\n 512 too-big.txt\n1024 total\n\nERROR: echo failed with status 1\n' Got '512 status=0\n513 status=0\n\n 512 ok.txt\n 512 too-big.txt\n1024 total\n\n'

stdout:
512 status=0
513 status=0

 512 ok.txt
 512 too-big.txt
1024 total

stderr:
ERROR i/o error: File too large (os error 27)
toysh24 write big file with ulimit

[toysh stdout] Expected 'inner=1\nouter=0\n', got 'inner=0\nouter=0\n'

stdout:
inner=0
outer=0
stderr:
sh: ulimit: No such file or directory
sush24 write big file with ulimit

[sush stdout] Expected 'inner=1\nouter=0\n', got 'inner=0\nouter=0\n'

stdout:
inner=0
outer=0
stderr:
big.sh: line 1: ulimit: command not found
dash25 ulimit -S for soft limit (default), -H for hard limit

stdout:
stderr: 
zsh25 ulimit -S for soft limit (default), -H for hard limit

stdout:
stderr: 
toysh25 ulimit -S for soft limit (default), -H for hard limit

[toysh stdout] Expected 'init\n unlimited\n unlimited\n\n-S\n 123456\n unlimited\n\n-H\n 123456\n 123457\n\nno flag\n 123455\n 123455\n\nGET\n 123454\n 123454\n 123455\n' Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush25 ulimit -S for soft limit (default), -H for hard limit

[sush stdout] Expected 'init\n unlimited\n unlimited\n\n-S\n 123456\n unlimited\n\n-H\n 123456\n 123457\n\nno flag\n 123455\n 123455\n\nGET\n 123454\n 123454\n 123455\n' Got 'init\n \n-S\n \n-H\n \nno flag\n \nGET\n '
[sush status] Expected 0, got 127

stdout:
init
    
-S
    
-H
    
no flag
    
GET
      
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 8: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 14: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 8: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 17: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 8: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 20: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 8: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 25: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 26: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 27: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 28: ulimit: command not found
brush25 ulimit -S for soft limit (default), -H for hard limit

[brush stdout] Expected 'init\n unlimited\n unlimited\n\n-S\n 123456\n unlimited\n\n-H\n 123456\n 123457\n\nno flag\n 123455\n 123455\n\nGET\n 123454\n 123454\n 123455\n' Got 'init\n unlimited\n unlimited\n\n-S\n 123456\n unlimited\n\n-H\n 123456\n 123457\n\nno flag\n 123455\n 123457\n\nGET\n 123454\n 123454\n 123457\n'

stdout:
init
  unlimited
  unlimited

-S
  123456
  unlimited

-H
  123456
  123457

no flag
  123455
  123457

GET
  123454
  123454
  123457
stderr:
dash26 Changing resource limit is denied

stdout:
stderr: 
mksh26 Changing resource limit is denied

stdout:
stderr: 
ksh26 Changing resource limit is denied

[ksh stdout] Expected 'both=0\nsoft=0\nsoft=0\nsoft OK\nhard OK\n', got 'both=1\nsoft=0\nsoft=0\nsoft fail\nhard fail\n'

stdout:
both=1
soft=0
soft=0
soft fail
hard fail
stderr:
E: ksh: <stdin>[6]: ulimit: bad time(cpu-seconds) limit: Invalid argument
toysh26 Changing resource limit is denied

[toysh stdout] Expected 'both=0\nsoft=0\nsoft=0\nsoft OK\nhard OK\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush26 Changing resource limit is denied

[sush stdout] Expected 'both=0\nsoft=0\nsoft=0\nsoft OK\nhard OK\n', got 'both=127\nsoft=127\nsoft=127\nsoft OK\nhard OK\n'

stdout:
both=127
soft=127
soft=127
soft OK
hard OK
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 9: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 12: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 15: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 22: ulimit: command not found
brush26 Changing resource limit is denied

[brush stdout] Expected 'both=0\nsoft=0\nsoft=0\nsoft OK\nhard OK\n', got 'both=1\nsoft=0\nsoft=0\nsoft fail\nhard fail\n'

stdout:
both=1
soft=0
soft=0
soft fail
hard fail
stderr:
ERROR i/o error: Invalid argument (os error 22)
dash27 ulimit -n limits file descriptors

stdout:
status=0
status=2
stderr:
dash: 1: cannot create out: Too many open files
toysh27 ulimit -n limits file descriptors

[toysh stdout] Expected 'status=0\nstatus=1\n', got 'status=0\nstatus=0\n'

stdout:
status=0
status=0
stderr:
sh: ulimit: No such file or directory
sh: ulimit: No such file or directory
sush27 ulimit -n limits file descriptors

[sush stdout] Expected 'status=0\nstatus=1\n', got 'status=0\nstatus=0\n'

stdout:
status=0
status=0
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: ulimit: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: ulimit: command not found
osh27 ulimit -n limits file descriptors

[osh stdout] Expected 'status=0\nstatus=1\n', got 'status=1\nstatus=1\n'

stdout:
status=1
status=1
stderr:
[ -c flag ]:1: I/O error applying redirect: Invalid argument
  ulimit -n 0; echo hi >out
                       ^
[ -c flag ]:1: Can't open 'out': Too many open files
[ -c flag ]:1: I/O error applying redirect: Too many open files
==4003637==Can't open /proc/4003623/task for reading.
==4003623==LeakSanitizer has encountered a fatal error.
==4003623==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==4003623==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)