aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* hush: two NOMMU fixes for bugs 877 and 883Denys Vlasenko2010-01-122-0/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: plug a memory leakDenys Vlasenko2010-01-122-0/+31
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix exitcodes of killed processesDenys Vlasenko2010-01-042-0/+14
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: improve HUSH_BRACE_EXP code (still disabled). ~0 bytesDenys Vlasenko2009-11-172-0/+8
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix handling of words with braces. +65 bytesDenys Vlasenko2009-11-162-0/+14
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix exit code propagation from `cmd`. +45 bytesDenys Vlasenko2009-11-162-8/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: wait for `cmd` to complete, and immediately store its exitcode in $?Denys Vlasenko2009-11-152-0/+2
| | | | | | | function old new delta expand_vars_to_list 2129 2197 +68 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix exec builtin in a better way (+ "glob in exec" bug fixed)Denys Vlasenko2009-10-191-3/+2
| | | | | | | | | | | | function old new delta execvp_or_die - 50 +50 static.pseudo_null_str 3 - -3 builtin_exec 83 57 -26 pseudo_exec_argv 200 163 -37 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/2 up/down: 50/-66) Total: -16 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix handling of empty argumentsDenys Vlasenko2009-10-184-4/+26
| | | | | | | | | | | | function old new delta builtin_exec 25 83 +58 parse_stream 2242 2261 +19 run_pipe 1782 1787 +5 static.pseudo_null_str - 3 +3 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/0 up/down: 85/0) Total: 85 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: handle empty execsMike Frysinger2009-10-182-0/+30
| | | | | | | | Sometimes variable expansions yield empty strings, and if they happen to be a command someone wants to run like `$foo`, then hush currently segfaults. So handle `` and $(). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* typo fix in a comment in a testcase. oh well...Denys Vlasenko2009-09-301-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash,hush: make trap output short signal names, without SIG prefixDenys Vlasenko2009-09-272-9/+9
| | | | | | | | | 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>
* hush: do not reset to default "" traps in subshellDenys Vlasenko2009-09-252-0/+26
| | | | | | | | function old new delta reset_traps_to_defaults 164 211 +47 builtin_umask 123 121 -2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: better handling of EXIT trap in `trap` hackDenys Vlasenko2009-09-252-2/+10
| | | | | | | | | | | | | | 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>
* ash,hush: fix trap reporting: s/SIGEXIT/EXIT/Denys Vlasenko2009-09-241-6/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix `trap`Denys Vlasenko2009-09-232-0/+9
| | | | | | | | function old new delta expand_variables 2217 2280 +63 static.argv - 8 +8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: do not process options after non-option argsDenys Vlasenko2009-08-202-0/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hust test: complain if busybox binary can't be foundDenys Vlasenko2009-08-121-6/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix \<newline> handling on NOMMUDenys Vlasenko2009-08-123-10/+29
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush tests: remove the requirement that .config is in ../..Denys Vlasenko2009-08-121-4/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: do not use ps -o in leak_argv1; do not hardcode path in negateDenys Vlasenko2009-08-124-50/+17
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: specially handle [[ - suppress globbing & multiword expansionDenys Vlasenko2009-06-092-0/+26
| | | | | | It's a bashism, but is surprisingly easy to do and costs very little code. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: add support for local builtinDenys Vlasenko2009-06-034-0/+29
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush_test: stop mixing tabs/spaces for indentationMike Frysinger2009-06-011-37/+37
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* hush: add support for special vars in bracesMike Frysinger2009-06-016-8/+6
| | | | | | | Some people like to use ${?} rather than $?, so make sure we support all the special single char vars that use this form. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* hush_test: filter test output to avoid C lib differencesMike Frysinger2009-06-011-0/+4
| | | | | | | | The getopt function in some C libraries wraps the option in single quotes while others do not. Avoid the issue by running sed on the output and strip all quotes. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* hush: fix bug 353 (wrong handling of \x in assignments)Denys Vlasenko2009-05-282-0/+16
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* make compound.tests executableDenys Vlasenko2009-05-231-0/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix problems with case in subshells and with "case esac"Denys Vlasenko2009-05-233-7/+18
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush_test: add some pathological compound list testsMike Frysinger2009-05-212-0/+35
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* hush_test: test for subshell function syntaxMike Frysinger2009-05-212-0/+12
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* hush_test: add subshelled case testsMike Frysinger2009-05-211-0/+12
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* hush_test: update test output to match new getopt() outputMike Frysinger2009-05-211-1/+1
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* hush_test: ignore generated filesMike Frysinger2009-05-211-0/+4
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* TODO: add someDenys Vlasenko2009-05-131-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: add more complex case to leak testcase, fix found breakageDenys Vlasenko2009-05-041-5/+4
| | | | | | | | | | | | | | | | | function old new delta unset_local_var_len - 167 +167 run_list 2350 2457 +107 set_vars_and_save_old - 87 +87 free_pipe 207 227 +20 builtin_unset 220 229 +9 builtin_exit 49 47 -2 free_strings_and_unset 53 - -53 set_vars_all_and_save_old 87 - -87 unset_local_var 168 - -168 ------------------------------------------------------------------------------ (add/remove: 2/3 grow/shrink: 3/1 up/down: 390/-310) Total: 80 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix bug where in "var=val func" var's value is not visible in funcDenys Vlasenko2009-05-042-2/+0
| | | | | | | | | | | | | | | | | | | function old new delta unset_local_var - 168 +168 set_vars_all_and_save_old - 87 +87 get_ptr_to_local_var - 77 +77 free_strings_and_unset - 53 +53 builtin_export 266 274 +8 get_local_var_value 31 33 +2 putenv_all 27 - -27 free_strings_and_unsetenv 53 - -53 get_local_var 68 - -68 run_list 2475 2350 -125 builtin_unset 380 220 -160 ------------------------------------------------------------------------------ (add/remove: 4/3 grow/shrink: 2/2 up/down: 395/-433) Total: -38 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix \<newline> handlingDenys Vlasenko2009-05-033-0/+8
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix multiple redirections of the same fd (bug 227)Denys Vlasenko2009-05-022-0/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* make leak test more robust by unsetting all varsDenis Vlasenko2009-04-261-2/+5
|
* hush: make getopt32 usable in builtins. use it in unset.Denis Vlasenko2009-04-261-3/+2
| | | | | | | | | | more uses are expected in the future. function old new delta getopt32 1356 1393 +37 builtin_export 256 266 +10 builtin_unset 418 380 -38
* hush: nommu fix for function passingDenis Vlasenko2009-04-263-0/+11
|
* hush: fix SEGV in % expansionDenis Vlasenko2009-04-263-3/+5
| | | | | | function old new delta expand_variables 2203 2217 +14
* hush: export -n supportDenis Vlasenko2009-04-202-0/+47
| | | | | | | | function old new delta builtin_export 206 256 +50 set_local_var 248 265 +17 expand_variables 2204 2203 -1
* hush: add two testcasesDenis Vlasenko2009-04-204-0/+23
|
* hush: fix stdin of backgrounded pipe Denis Vlasenko2009-04-202-0/+17
| | | | | | function old new delta run_list 2450 2502 +52
* hush: fix "export not_yet_defined_var", fix parsing of "cmd | }"Denis Vlasenko2009-04-192-0/+3
| | | | | | | | | | corner case; improve hush_leaktool.sh; fix some false positives in testsuite function old new delta builtin_export 191 206 +15 parse_stream 2196 2200 +4
* hush: fix handling of } which is not a closing one in { cmd; }Denis Vlasenko2009-04-195-1/+9
| | | | | | | function old new delta parse_stream 2176 2302 +126 builtin_unset 381 387 +6
* hush: return builtin by Bayram Kurumahmut (kbayram AT ubicom.com)Denis Vlasenko2009-04-172-0/+12
| | | | | ~+200 bytes
* hush: fix "if { echo foo; } then { echo bar; } fi" parsingDenis Vlasenko2009-04-163-1/+22
| | | | | | | function old new delta done_word 728 793 +65 parse_stream 2084 2098 +14