Commit Graph

454 Commits

Author SHA1 Message Date
Denys Vlasenko
57aeb62f83 randconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-12 03:15:36 +02:00
Denys Vlasenko
2dbbf823ef randconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-11 23:48:28 +02:00
Denys Vlasenko
69c8c699aa randconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-11 16:27:55 +02:00
Denys Vlasenko
28b00ce6ff awk: support "length" form of "length()". Closes 8371
function                                             old     new   delta
parse_expr                                           805     848     +43
tokenlist                                            447     448      +1

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-02 02:41:39 +02:00
Denys Vlasenko
8aa7cf305b sort: fix -kN,M handling (was including last separator into the comparison)
Testcase:

$ printf '%s\n' a/a:a a:b | sort -t: -k1,1
a:b
a/a:a

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-09-19 22:06:40 +02:00
Aaro Koskinen
ad27a6d326 diff.tests: add testcases for -B and single line changes
Add testcases for -B and single line changes.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-07-31 16:51:15 +02:00
Thiago Jung Bauermann
17b16223f3 bzcat.tests: Run both .gz and .bz2 tests, and add .Z tests
Signed-off-by: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-05-11 17:19:22 +02:00
Denys Vlasenko
63f4d32c98 sed: implement ",+N" range end
function                                             old     new   delta
add_cmd                                             1115    1173     +58
process_files                                       2226    2253     +27
sed_main                                             696     702      +6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 91/0)               Total: 91 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-04-17 14:24:55 +02:00
Bernhard Reutner-Fischer
70e30e8eec dc: tweak parsing
https://bugs.debian.org/538685
dc requires whitespace between language elements.

We were requiring
1 2 + p
instead of the abbreviated
1 2+p
(for example).

function                                             old     new   delta
stack_machine                                         97     126     +29
dc_main                                              117      79     -38
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 29/-38)             Total: -9 bytes

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-16 17:12:04 +01:00
Denys Vlasenko
39f017293a diff: fix a bug in diffing against stdin. Closes 7784
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-11 16:41:54 +01:00
Denys Vlasenko
11775edbfc randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-12-22 19:37:05 +01:00
Denys Vlasenko
9caea2448e sed: fix a buglet in s///NUM handling
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-09-16 01:11:13 +02:00
Denys Vlasenko
34cc6c91a2 grep: fix "grep -r PATTRN SYMLINK_TO_DIR"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-08-28 15:50:09 +02:00
Denys Vlasenko
98654b995b test: fix mishandling of "test '(' = '('" and similar
function                                             old     new   delta
test_main                                            246     350    +104

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-07-01 14:16:28 +02:00
Denys Vlasenko
5f8daefb83 awk: fix handling of "if ... break ; else ..." - closes 7226
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-06-26 16:40:28 +02:00
Denys Vlasenko
6be3a5242c find: exit code fixes for find -exec
function                                             old     new   delta
func_exec                                            127     100     -27

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-06-19 11:32:11 +02:00
Denys Vlasenko
83e49ade57 grep: fix -w match if first match isn't a word, but second is. Closes 4520
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-27 14:56:12 +01:00
Bartosz Golaszewski
3ba2df874c grep: properly handle grep -w "^str" in !EXTRA_COMPAT case too
function                                             old     new   delta
grep_file                                           1267    1288     +21

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-07 17:15:56 +01:00
Michael Tokarev
bf2f2229bb testsuite: fix last "which" change
In commit afa63b2dcd I replaced `type -p' with
`command -pv'.  But actually it is wrong, the right
substitution is `command -v'.  We need to find our
busybox which is in the first directory in $PATH, so
`command -p' should not be used because it uses
default PATH, not current value of PATH where our
busybox binary resides.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-23 14:41:53 +01:00
Bartosz Golaszewski
5c13ab41bb sort: check global flags on fallback sort
Sort now performs global reverse on fallback sort if -r is set. Before
only key local flags were checked.

function                                             old     new   delta
compare_keys                                         712     738     +26

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-19 09:10:14 +01:00
Denys Vlasenko
6eb0cbe07e find: fix a regression introduced with -HLP support
function                                             old     new   delta
find_main                                            294     342     +48

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-09 16:08:09 +01:00
Denys Vlasenko
cd55f2d933 grep: fix two bugs with -w
Unfortunately, with !EXTRA_COMPAT, "grep -w ^str" still erroneously matches "strstr".

function                                             old     new   delta
grep_file                                           1499    1510     +11

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-07 14:59:30 +01:00
Denys Vlasenko
7625811d25 testsuite: remove forgotten debug hack
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-12-31 23:25:46 +01:00
Denys Vlasenko
198b02f7dd fix failures found by randomconfig builds
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-12-31 23:22:36 +01:00
Denys Vlasenko
61be8e46a8 testsuite: disable tests for no longer supported bbox-specific date formats
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-12-31 18:57:39 +01:00
Denys Vlasenko
e85e260e47 testsuite: fix false positives for du
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-12-20 02:55:16 +01:00
Denys Vlasenko
bd0e221620 awk: fix a bug in argc counting in recent change
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-21 15:09:55 +01:00
Denys Vlasenko
0545e3b69a tar: prevent empty file to be treated as valid tarball
function                                             old     new   delta
tar_main                                             879     895     +16

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-19 17:17:48 +01:00
Denys Vlasenko
dd1d8ab506 fix a copy/paste error in last tar testcase name
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-19 16:56:26 +01:00
Denys Vlasenko
1cbc642bed tar: add a testcase for previous commit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-19 14:52:02 +01:00
Michael Tokarev
afa63b2dcd fix bashisms in testsuite/
These places use ${var/search/replace}, $((n++) and
`type -p' constructs which are not-so-standard.
Replace with equivalent constructs.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-11-10 22:06:06 +01:00
Denys Vlasenko
c44539fcd3 sed: fix "sed clusternewline" testcase
function                                             old     new   delta
process_files                                       2197    2226     +29
flush_append                                          47      54      +7
get_next_line                                        184     189      +5
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 41/0)               Total: 41 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-10-30 14:25:22 +01:00
Denys Vlasenko
7985bc109e awk: fix length(array)
function                                             old     new   delta
evaluate                                            3526    3548     +22

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-10-12 04:51:54 +02:00
Bernhard Reutner-Fischer
a060a1ad96 awk: Fix handling of functions with empty body
ammend b79a0fef99 to properly
handle functions defined in another scope.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-07-31 21:51:14 +02:00
Denys Vlasenko
b855460adc awk.tests: add test for recent large integer fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-22 11:49:06 +02:00
Denys Vlasenko
b0e9b72915 sed: fix matching of newlines by $
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-21 22:09:44 +02:00
James Hogan
5fc0585c01 grep: fix grep -x to not set REG_NOSUB
When -F isn't specified (and !ENABLE_EXTRA_COMPAT), grep -x uses
regexec's regmatch_t output to determine if the match was the entire
line. However it also set the REG_NOSUB flag which makes it ignore the
regmatch_t argument.

Add an exception to the setting of REG_NOSUB for OPT_x and add some test
cases to test the behaviour of -x.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Natanael Copa <ncopa@alpinelinux.org>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-16 14:47:05 +02:00
Bartosz Golaszewski
414db791d0 grep: don't bail out on first mismatch if '-w' option is set
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-15 09:20:40 +02:00
Bernhard Reutner-Fischer
b79a0fef99 awk: Fix handling of functions with empty body
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-13 09:47:07 +01:00
Kang Kai
03b614739b testsuite/du/du-k-works: fix false positive
Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-28 14:02:51 +01:00
Denys Vlasenko
0cfba07fcd fix testsuite false positive
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-21 08:28:37 +01:00
Denys Vlasenko
4609f477c7 mdev: fix mode of dir1 in =dir1/dir2/file rule
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-21 01:22:12 +01:00
Denys Vlasenko
2f5b5beb28 grep: fix grep -Fw not respecting the -w option. Closes 5792
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-20 16:57:19 +01:00
Lauri Kasanen
b8173b603f sha3sum: new applet
function                                             old     new   delta
KeccakF                                                -     496    +496
KeccakF_RoundConstants                                 -     192    +192
sha3_hash                                              -     171    +171
sha3_end                                               -      40     +40
hash_file                                            274     299     +25
KeccakF_RotationConstants                              -      25     +25
KeccakF_PiLane                                         -      25     +25
packed_usage                                       29213   29232     +19
sha3_begin                                             -      18     +18
KeccakF_Mod5                                           -      10     +10
applet_names                                        2445    2453      +8
applet_main                                         1420    1424      +4
applet_nameofs                                       710     712      +2
------------------------------------------------------------------------------
(add/remove: 8/0 grow/shrink: 9/7 up/down: 1049/-54)         Total: ~995 bytes

Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14 05:20:50 +01:00
Yao Zhao
e565383fd5 testsuite: make mkfs.minix test not fail spuriously on big endian
Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-24 13:58:12 +02:00
Denys Vlasenko
df8066a78c awk: fix FS assignment behavior. Closes 5108
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-11 01:27:15 +02:00
Denys Vlasenko
ea664dde87 awk: make -F STR interpret escape sequences. Closes 5126
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-22 18:41:01 +02:00
Denys Vlasenko
c9a13116a4 mount: fix the wrongly stored fs creation time
This bug made our ext2 images non-mountable by ext4 driver.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-21 16:50:46 +02:00
Tanguy Pruvot
0a393cf7da testsuite: some more awk tests related to conditions
Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-11 10:33:45 +02:00
Denys Vlasenko
37ca36a711 sed: yet another fix on top of zero length match code
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-08 10:25:31 +02:00