aboutsummaryrefslogtreecommitdiff
path: root/testsuite (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'busybox' into mergeRon Yorston2021-07-171-7/+20
|\
| * awk: disallow break/continue outside of loopsDenys Vlasenko2021-07-141-7/+2
| | | | | | | | | | | | | | | | | | | | function old new delta .rodata 104139 104186 +47 chain_group 610 633 +23 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 70/0) Total: 70 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * awk: fix printf "%-10c", 0Denys Vlasenko2021-07-121-0/+8
| | | | | | | | | | | | | | function old new delta awk_printf 596 626 +30 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * awk: unbreak "cmd" | getlineDenys Vlasenko2021-07-111-0/+5
| | | | | | | | | | | | | | function old new delta evaluate 3337 3343 +6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * awk: undo TI_PRINT, it introduced a bug (print with any redirect acting as ↵Denys Vlasenko2021-07-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | printf) function old new delta evaluate 3329 3337 +8 Patch by Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2021-07-051-0/+32
|\|
| * awk: fix beavior of "exit" without parameterDenys Vlasenko2021-07-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | function old new delta evaluate 3336 3339 +3 awk_exit 93 94 +1 awk_main 829 827 -2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 4/-2) Total: 2 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * awk: evaluate all, even superfluous function argsDenys Vlasenko2021-06-301-1/+7
| | | | | | | | | | | | | | function old new delta evaluate 3128 3135 +7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * awk: allow empty fuinctions with no arguments, disallow function redefinitionsDenys Vlasenko2021-06-301-0/+10
| | | | | | | | | | | | | | | | | | | | | | function old new delta .rodata 103681 103700 +19 parse_program 303 307 +4 evaluate 3145 3141 -4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 23/-4) Total: 19 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * awk: fix parsing of expressions such as "v (a)"Denys Vlasenko2021-06-291-0/+11
| | | | | | | | | | | | | | function old new delta next_token 812 825 +13 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2021-06-283-4/+29
|\|
| * cp,mv: fix -t DIR optionRon Yorston2021-06-251-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When the '-t DIR' option is used the loop over the remaining arguments should terminate when a NULL pointer is reached. function old new delta mv_main 585 590 +5 cp_main 492 496 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 9/0) Total: 9 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unlzma: fix a case where we could read before beginning of bufferDenys Vlasenko2021-06-152-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Testcase: 21 01 01 00 00 00 00 00 e7 01 01 01 ef 00 df b6 00 17 02 10 11 0f ff 00 16 00 00 Unfortunately, the bug is not reliably causing a segfault, the behavior depends on what's in memory before the buffer. function old new delta unpack_lzma_stream 2762 2768 +6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2021-05-142-0/+6
|\|
| * dd: support iflag=count_bytesRafał Miłecki2021-04-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It allows passing amount of bytes in the count= function old new delta packed_usage 33599 33617 +18 static.iflag_words 29 41 +12 dd_main 1601 1607 +6 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 36/0) Total: 36 bytes Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * start-stop-daemon: explain -x + -a testDenys Vlasenko2021-03-091-0/+5
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2021-03-012-0/+10
|\|
| * bc/dc: fix length(0) and length(0.000nnn) resultDenys Vlasenko2021-02-262-0/+10
| | | | | | | | | | | | | | function old new delta zxc_vm_process 6464 6498 +34 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2021-02-053-0/+68
|\|
| * nl: ensure '-b n' option displays file contentRon Yorston2021-02-022-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The command 'nl -b n' should output no line numbers, just some spaces as a placeholder followed by the actual file content. Add tests for line numbering by cat and nl. The correct results were obtained from coreutils. function old new delta print_numbered_lines 152 157 +5 .rodata 182456 182453 -3 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 5/-3) Total: 2 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * awk: allow printf('%c') to output NUL, closes 13486Ron Yorston2021-02-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Treat the output of printf as binary rather than a null-terminated string so that NUL characters can be output. This is considered to be a GNU extension, though it's also available in mawk and FreeBSD's awk. function old new delta evaluate 3487 3504 +17 awk_printf 504 519 +15 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 32/0) Total: 32 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2021-01-1410-90/+127
|\|
| * bc,dc: make BC_LINE_LENGTH/DC_LINE_LENGTH more compatible with GNUDenys Vlasenko2020-12-296-89/+87
| | | | | | | | | | | | | | function old new delta xc_vm_init 640 682 +42 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * randomconfig fixesDenys Vlasenko2020-12-292-1/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * factor: detect squaresDenys Vlasenko2020-12-221-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have a square, the speedup can be extremely large (in best case example below, it's ~40000 times faster): $ time ./busybox_old factor 18446743988964486098 18446743988964486098: 2 3037000493 3037000493 real 0m4.246s $ time ./busybox factor 18446743988964486098 18446743988964486098: 2 3037000493 3037000493 real 0m0.000s function old new delta isqrt_odd - 57 +57 print_w - 36 +36 factorize 218 236 +18 print_h - 7 +7 factorize_numstr 65 72 +7 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 2/0 up/down: 125/0) Total: 125 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * awk: add a test that $NF is emptyDenys Vlasenko2020-12-041-2/+9
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * awk: FS regex matches only non-empty separators (gawk compat)Denys Vlasenko2020-12-021-0/+7
| | | | | | | | | | | | | | function old new delta awk_split 484 553 +69 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2020-11-123-0/+61
|\|
| * hexdump: fix dup block comparisonDenys Vlasenko2020-10-201-0/+19
| | | | | | | | | | | | | | function old new delta bb_dump_dump 1523 1520 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * xxd: fix printing of trailing spacesDenys Vlasenko2020-10-201-0/+34
| | | | | | | | | | | | | | | | | | | | function old new delta bb_dump_dump 1497 1523 +26 xxd_main 459 466 +7 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 33/0) Total: 33 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * xargs: fix -I SUBSTR behaviourDenys Vlasenko2020-09-301-0/+8
| | | | | | | | | | | | | | function old new delta process_stdin_with_replace 165 204 +39 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2020-08-231-0/+8
|\|
| * grep: for -L, exitcode 0 means files *without* matches were found, closes 13151Denys Vlasenko2020-08-151-0/+8
| | | | | | | | | | | | | | | | | | This is a recent change in GNU grep as well (after 3.1) function old new delta grep_file 1215 1228 +13 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2020-07-095-7/+48
|\|
| * randomconfig fixesDenys Vlasenko2020-06-241-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * randomconfig fixesDenys Vlasenko2020-06-232-5/+5
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sysctl: do report EACCES errors on writeDenys Vlasenko2020-06-091-2/+2
| | | | | | | | | | | | | | | | | | | | function old new delta sysctl_act_recursive 165 179 +14 sysctl_act_on_setting 467 471 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 18/0) Total: 18 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unexpand: correct behavior for --first-only --tabs=4Mark Edgar2020-06-091-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | Prior to the patch, both -f and --first-only are in all cases either no-op or ignored. Without --tabs, --first-only is the default so specifying it is a no-op. With --tabs, --all is implied, and --first-only is intended to reset this. function old new delta expand_main 690 694 +4 Signed-off-by: Mark Edgar <medgar123@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * awk: disallow "str"++, closes bug 12981Denys Vlasenko2020-06-091-0/+8
| | | | | | | | | | | | | | function old new delta parse_expr 887 896 +9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeFRP-3466-g53c09d0e1Ron Yorston2020-05-291-0/+18
|\|
| * grep: add proper support for pattern_listSören Tempel2020-04-301-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From POSIX.1-2008: The pattern_list's value shall consist of one or more patterns separated by <newline> characters; As such, given patterns need to be split at newline characters. Without doing so, busybox grep will interpret the newline as part of the pattern which is not in accordance with POSIX. See also: https://bugs.busybox.net/show_bug.cgi?id=12721 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * grep: Fix -f FILE when FILE is empty and -x providedGray Wolf2020-04-291-0/+6
| | | | | | | | | | | | | | | | | | | | Grep currently special-cased empty pattern file to be the same as pattern file with one empty line (empty pattern). That does mirror how GNU grep behaves, except when -x is provided. In that case .* pattern needs to be used instead. Signed-off-by: Gray Wolf <wolf@wolfsden.cz> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * xargs: restore correct behaviour of -n optionRon Yorston2020-04-291-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 1ff7002b1 (xargs: fix handling of quoted arguments, closes 11441) the -n option hasn't worked properly: $ echo 1 2 3 | xargs -n 1 echo 1 2 3 $ Because state is now remembered between calls to process_stdin() it's necessary to update the state before any premature return. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | xargs: restore correct behaviour of -n optionRon Yorston2020-03-291-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 1ff7002b1 (xargs: fix handling of quoted arguments, closes 11441) the -n option hasn't worked properly: $ echo 1 2 3 | xargs -n 1 echo 1 2 3 $ Because state is now remembered between calls to process_stdin() it's necessary to update the state before any premature return.
* | Merge branch 'busybox' into mergeRon Yorston2020-02-152-1/+31
|\|
| * awk: fix more "length" cases, closes 12486Denys Vlasenko2020-02-021-1/+22
| | | | | | | | | | | | | | function old new delta next_token 808 831 +23 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * xargs: fix handling of quoted arguments, closes 11441Ron Yorston2020-01-291-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported in bug 11441 when presented with a large number of quoted arguments xargs can return 'argument line too long': seq 10000 29999 | sed -e 's/^/"/' -e 's/$/"/' | busybox xargs echo This happens because the variant of process_stdin() which handles quoted arguments doesn't preserve state between calls. If the allowed number of characters is exceeded part way through a quoted argument the next call to process_stdin() incorrectly treats the terminating quote as a starting quote, thus quoting all of the argument separators. function old new delta process_stdin 274 303 +29 xargs_main 731 745 +14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 43/0) Total: 43 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2020-01-082-0/+40
|\|
| * bc: fix comparison bug, closes 12336Denys Vlasenko2019-11-231-0/+5
| | | | | | | | | | | | | | function old new delta bc_num_cmp 249 259 +10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dc: Parse error & fix out of bounds read in xc_program_printStringBrian Foley2019-09-051-0/+20
| | | | | | | | | | | | | | | | function old new delta xc_program_print 712 735 +23 Signed-off-by: Brian Foley <bpfoley@google.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>