Commit Graph

73 Commits

Author SHA1 Message Date
Denys Vlasenko
bac0a25f72 slightly better wording in comments
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-21 03:47:50 +01:00
Denys Vlasenko
b12553faa8 ash: fix ash-signals/signal8 testcase failure
function                                             old     new   delta
killcmd                                              109     224    +115
kill_main                                            882     910     +28
changepath                                           194     195      +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 144/0)             Total: 144 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-21 03:22:20 +01:00
Denys Vlasenko
8ee2adab21 echo: do not retry on write errors
function                                             old     new   delta
echo_main                                            297     336     +39
stpcpy                                                 -      22     +22
run_pipe                                            1561    1566      +5
pseudo_exec_argv                                     187     192      +5
hush_exit                                             75      80      +5
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 4/0 up/down: 98/0)               Total: 76 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-07 02:03:51 +01:00
Denys Vlasenko
fb132e4737 whitespace cleanup
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 11:46:52 +02:00
Denys Vlasenko
b563f62bbb ash: fix signal and "set -e" interaction
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-09-25 17:15:13 +02:00
Denys Vlasenko
bed7c81ea2 shell/math: deconvolute and explain ?: handling. Give better error message
function                                             old     new   delta
arith_apply                                         1271    1283     +12

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-16 11:50:46 +02:00
Denys Vlasenko
063847d6bd shell/math: return string error indicator, not integer
function                                             old     new   delta
expand_and_evaluate_arith                             87     106     +19
expand_one_var                                      1563    1570      +7
arith                                                 12      18      +6
evaluate_string                                      678     680      +2
arith_apply                                         1269    1271      +2
builtin_umask                                        133     132      -1
ash_arith                                            118      75     -43
expand_vars_to_list                                 1094    1038     -56
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/3 up/down: 36/-100)           Total: -64 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-15 13:33:02 +02:00
Denys Vlasenko
36f774a0cd hush: add support for ${var/pattern/repl}, conditional on bash compat
function                                             old     new   delta
expand_vars_to_list                                 2386    2833    +447
expand_string_to_string                               69     110     +41
parse_dollar                                         681     721     +40
hush_main                                            963     945     -18
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 528/-18)           Total: 510 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-05 14:47:58 +02:00
Denys Vlasenko
e298ce69ba hush: fix handling of backslashes in variable assignment
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-04 19:52:44 +02:00
Denys Vlasenko
f7a8433535 ash: add another ${v/a/b} test we currently fail
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-08-30 13:54:12 +02:00
Denys Vlasenko
33bbb27e45 ash: fix another bit of var_bash4 bug
But it _still_ doesn't pass! quoted case is a tough nut to crack

function                                             old     new   delta
redirect                                            1281    1286      +5
subevalvar                                          1141    1142      +1

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-07 22:24:36 +02:00
Denys Vlasenko
c8d305d89f var_bash4.tests: better wording in comment
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-06 19:28:04 +02:00
Denys Vlasenko
f56fe82542 update var_bash4 test. one more bug revealed by it now...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-06 17:21:52 +02:00
Denys Vlasenko
6814cbc928 ash: extend var_bash4.tests; nocode changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-05 18:29:13 +02:00
Denys Vlasenko
b0fbe4b540 ash: add a testcase for bug 2281 (currently fails). Small code cleanups.
function                                             old     new   delta
changepath                                           195     192      -3
subevalvar                                          1204    1200      -4
readtoken1                                          3247    3240      -7
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-14)             Total: -14 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-05 17:19:27 +02:00
Alexander Shishkin
ccb9771861 ash: fix $! value when traps are set
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-25 13:07:39 +02:00
Denys Vlasenko
fd33e17a2b ash: fix obscure case of replacing + globbing + backslashes
function                                             old     new   delta
subevalvar                                          1152    1178     +26
readtoken1                                          3267    3275      +8
redirect                                            1284    1286      +2
expandarg                                            957     958      +1
expdir                                                 4       -      -4
evalcommand                                         1219    1209     -10
expmeta                                              481     469     -12
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 4/2 up/down: 37/-26)             Total: 11 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-26 22:55:44 +02:00
Andreas Bühmann
da75f44844 ash: <> redir should not truncate
Signed-off-by: Andreas Bühmann <buehmann@users.berlios.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-24 04:32:37 +02:00
Denys Vlasenko
7df28bbb8f ash: fix unset in standalone mode
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-18 14:23:47 +02:00
Denys Vlasenko
08d8b3cee1 ash: fix redirection of fd 0 in scripts are sourced from interactive ash
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-03 04:28:28 +02:00
Denys Vlasenko
42c4b2e3b5 ash: fix var_leak.tests so that it actually catches the NOFORK bug
+ document the bug better

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-18 16:13:56 +02:00
Denys Vlasenko
238bf187ba ash: fix bug which causes signal6.tests to fail
function                                             old     new   delta
trapcmd                                              271     277      +6
localcmd                                             277     275      -2

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-18 15:49:07 +02:00
Denys Vlasenko
51b4a9e2f1 ash: fix var_leak testcase
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-18 14:35:20 +02:00
Denys Vlasenko
5e2d572381 ash: fix testsuite false positives
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-18 14:11:21 +02:00
Denys Vlasenko
cd10dc40e4 ash: fix ". empty_file" exitcode. +5 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 17:10:46 +02:00
Denys Vlasenko
786cce1871 fix false positive in signal5.tests
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 10:14:20 +02:00
Denys Vlasenko
0f01b00d74 add two more tests which currently fail
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 04:57:55 +02:00
Denys Vlasenko
7c1ed9fbde ash: fix signal5.tests
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 04:42:40 +02:00
Denys Vlasenko
27ff681cfa ash: add two testcases for (not yet fixed) ash bugs
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 02:56:18 +02:00
Denys Vlasenko
496d5bf4c6 ash: trap with bad signal name should not abort
function                                             old     new   delta
trapcmd                                              236     271     +35

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26 15:52:24 +01:00
Denys Vlasenko
7426920461 fix bug 1087. Fix by Leonid (lly.dev AT gmail.com)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-21 01:26:42 +01:00
Denys Vlasenko
7306727d1b shell: split read builtin from ash
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-12 22:11:24 +01:00
Denys Vlasenko
8cd04d1cb6 ash: fix for read $IFS splitting. Closes bug 235
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-08 15:44:07 +01:00
Denys Vlasenko
e3c6e19015 laguage and copyright date corrections, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-09 23:35:30 +02:00
Denys Vlasenko
3dc4a3e4dc ash: make one testsuite entry more robust
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-09 23:08:28 +02:00
Denys Vlasenko
e74aaf9385 ash,hush: make trap output short signal names, without SIG prefix
function                                             old     new   delta
evalvar                                             1373    1371      -2
builtin_trap                                         457     441     -16
trapcmd                                              260     236     -24

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-27 02:05:45 +02:00
Denys Vlasenko
21d87d495a ash: better handling of EXIT trap in trap hack
function                                             old     new   delta
forkchild                                              -     602    +602
trapcmd                                              255     347     +92
ash_main                                            1362    1375     +13
evalvar                                             1371    1373      +2
popstring                                            140     134      -6
forkshell                                            835     248    -587
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/2 up/down: 709/-593)          Total: 116 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-25 00:06:51 +02:00
Denys Vlasenko
844f990926 ash: fix trap
function                                             old     new   delta
forkshell                                            738     810     +72
popstring                                            134     140      +6
parse_command                                       1460    1463      +3
evalvar                                             1373    1371      -2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 81/-2)              Total: 79 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-23 03:25:52 +02:00
Denys Vlasenko
795633463a add a testcase for reopened bug 585 (not fixed yet)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-16 14:04:07 +02:00
Denys Vlasenko
9f2e82ad2e ash: add testsuite for bug 585
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-29 20:37:09 +02:00
Denys Vlasenko
82a6fb3ea6 ash: fix . builtin
Also, move [[ ]] comment to test.c and expand it

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-14 19:42:12 +02:00
Denis Vlasenko
46aeab9a34 ash: fix $IFS handling in read. closes bug 235 2009-03-31 19:18:17 +00:00
Denis Vlasenko
727752d2d2 ash: better fix for ash -c 'echo 5&' and ash -c 'sleep 5&'
with testcase
2008-11-28 03:41:47 +00:00
Denis Vlasenko
6214941a3a ash: add testcase for bug 5304 2008-10-27 14:33:03 +00:00
Denis Vlasenko
078323010b dc: conditionalize parts which require libm 2008-10-20 08:43:10 +00:00
Denis Vlasenko
b730474bda ash: fix NOEXEC mode - we were forgetting to pass environment!
env: promote to NOEXEC
hd: promote to NOEXEC, as hexdump is NOEXEC already
2008-10-20 08:15:51 +00:00
Denis Vlasenko
d1660cb9ad ash: fix a bug in standalone mode (corrupted getopt() state) 2008-10-20 07:52:33 +00:00
Denis Vlasenko
34c73c499b ash: fix "(cat < file)" hang introduced by rev 22944. 2008-08-16 11:48:02 +00:00
Denis Vlasenko
c90e1be01b ash: bash compat: "shift $BIGNUM" is equivalent to "shift 1" 2008-07-30 15:35:05 +00:00
Denis Vlasenko
8dbea7dbb1 ash: add slightly different testcase 2008-07-26 14:20:04 +00:00