Age | Commit message (Collapse) | Author |
|
This set of patches adds a simple unit-testing framework to Busybox
unit-tests: add some helper macros for unit-test framework implementation
unit-tests: implement the unit-testing framework
unit-tests: add basic documentation on writing the unit test cases
unit-tests: modify the Makefile 'test' target to run unit-tests too
unit-tests: add two example test cases
unit-tests: modify the existing strrstr test code to use the unit-test framework
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
bb_sc_clk_tck - 10 +10
timescmd 118 113 -5
print_route 1763 1758 -5
mpstat_main 1288 1283 -5
iostat_main 1947 1942 -5
INET_setroute 879 871 -8
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/5 up/down: 10/-28) Total: -18 bytes
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
The find utility uses a hardcoded value of 32 * 1024 as the limit of
the command-line length when calling 'find -exec ... {} +'. This results
in over 4 times more execve() calls than in coreutils' find.
This patch uses the limit defined in system headers.
Based on the patch by Bartosz Golaszewski <bartekgola@gmail.com>.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
func_exec 127 100 -27
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
do_exec - 309 +309
parse_params 1416 1487 +71
find_main 342 406 +64
packed_usage 29958 30014 +56
func_exec 138 127 -11
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/1 up/down: 500/-11) Total: 489 bytes
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Always unlink + reopen, rather than sometimes using ftruncate();
using a single code-path reduces the opportunity for either
mistakes or duplicate code.
Signed-off-by: Joshua Judson Rosen <jrosen@harvestai.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Joshua Judson Rosen <jrosen@harvestai.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Forgetting to re-set log_file->size after truncating to zero
discards log-data for the next 1 second following an oversize-induced purge,
when we shouldn't necessarily throw that data away.
Signed-off-by: Joshua Judson Rosen <jrosen@harvestai.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
With FEATURE_VERBOSE off, practically no size change.
With it on:
function old new delta
remove_file 493 556 +63
install_main 719 765 +46
bb_make_directory 383 419 +36
rmdir_main 162 191 +29
copy_file 1516 1544 +28
mv_main 502 525 +23
cmp_main 677 693 +16
bbconfig_config_bz2 5264 5279 +15
mkdir_main 158 168 +10
install_longopts 66 76 +10
rm_main 167 175 +8
nexpr 840 846 +6
scan_tree 275 280 +5
fsck_main 1807 1811 +4
ed_main 2541 2545 +4
expand_one_var 1574 1575 +1
swap_on_off_main 420 418 -2
parse_command 1443 1440 -3
redirect 1279 1274 -5
do_load 946 918 -28
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 16/4 up/down: 304/-38) Total: 266 bytes
Based on the patch by Igor Živković.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
which_main 237 212 -25
Signed-off-by: Tito Ragusa <farmatito@tiscali.it>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
which_main 237 212 -25
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
English speakers complained that it sounded awfully broken.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
find_execable 81 86 +5
exists_execable 71 66 -5
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
rtcwake_main 482 462 -20
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
rtc_xopen 77 139 +62
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
fork_job 343 456 +113
load_crontab 688 777 +89
crond_main 1456 1434 -22
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 202/-22) Total: 180 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Slight change in behavior: now -l 5 will enable the same messages
formerly only enabled for -d 5. (Old behavior was non-sensical).
function old new delta
reopen_logfile_to_stderr - 34 +34
log8 - 26 +26
log7 - 26 +26
log5 - 26 +26
load_crontab 706 688 -18
rescan_crontab_dir 157 137 -20
crond_main 1486 1456 -30
fork_job 389 343 -46
crondlog 108 38 -70
------------------------------------------------------------------------------
(add/remove: 4/0 grow/shrink: 0/5 up/down: 112/-184) Total: -72 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
bb_verror_msg 380 386 +6
syslog_level - 1 +1
crondlog 165 108 -57
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
packed_usage 29736 29740 +4
crond_main 1485 1486 +1
load_crontab 712 706 -6
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Closes 627 and 7034.
Commonly seen case is (un)loading of an alias
which matches ata_generic and a more specific ata module.
For example:
modprobe [-r] pci:v00008086d00007010sv00000000sd00000000bc01sc01i80
(ata_generic and pata_acpi)
modprobe [-r] pci:v00001106d00000571sv00001509sd00009022bc01sc01i8a
(ata_generic and pata_via)
function old new delta
process_module 615 728 +113
parse_module 309 395 +86
find_alias 621 653 +32
pathname_matches_modname 78 79 +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 232/0) Total: 232 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Before this cahnge, sometimes they were used after the next packet
from another peer was received, because we did updare some peer stats
from high delay packet before dropping it.
function old new delta
recv_and_process_peer_pkt 922 966 +44
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
parse_module 309 395 +86
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
string_checker 97 92 -5
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
hush_main 1056 1128 +72
ash_main 1442 1487 +45
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
POSIX.1-2008 removed the usleep function, provide a fallback
implementaion using the recommended nanosleep().
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
read_lines 685 733 +48
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
file_insert 301 315 +14
init_text_buffer 179 171 -8
colon 2889 2878 -11
file_size 37 - -37
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/2 up/down: 14/-56) Total: -42 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
init_text_buffer 156 190 +34
undo_push 360 382 +22
count_lines 74 72 -2
undo_pop 246 222 -24
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/2 up/down: 56/-26) Total: 30 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
undo_push 414 395 -19
do_cmd 4803 4761 -42
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
undo_push - 411 +411
undo_pop - 288 +288
do_cmd 4160 4426 +266
char_insert 363 483 +120
undo_queue_commit - 61 +61
text_hole_delete 108 163 +55
string_insert 94 127 +33
colon 2864 2882 +18
yank_delete 92 101 +9
vi_main 273 280 +7
dot_scroll 88 93 +5
dot_right 29 34 +5
dot_prev 20 25 +5
dot_next 20 25 +5
dot_left 24 29 +5
dot_end 20 25 +5
dot_begin 20 25 +5
init_text_buffer 154 156 +2
text_hole_make 145 142 -3
file_insert 333 318 -15
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 15/2 up/down: 1305/-18) Total: 1287 bytes
(without queuing it's ~870 bytes)
Signed-off-by: Jody Bruchon <jody@jodybruchon.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
For certain cross build scenarios the LD variable is overridden
to use the gcc executive to ensure all the target tuning parameters
are used. In these cases, the executive errors out as shown below
but since this step is only linking to a .o file the standard libs
are not needed.
$ make LD=gcc applets/built-in.o
LD applets/built-in.o
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
make[1]: *** [applets/built-in.o] Error 1
make: *** [applets_dir] Error 2
Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Tito Ragusa <farmatito@tiscali.it>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
1) real swapon/swapoff handles also devices on the commandline with -a;
2) xstat(device) in swap_enable_disable aborts on error when cycling through
fstab so some devices are not handled;
3) duplicated code for ENABLE_FEATURE_SWAPON_DISCARD and
ENABLE_FEATURE_SWAPON_PRI was moved to functions.
4) silence some error messages with -a;
5) minor cleanups and code refactoring reduced the size as per bloat-check:
6) I also added support for /proc/swaps handling to swapoff:
"When the -a flag is given, swapping is disabled on all known swap devices
and files (as found in /proc/swaps or /etc/fstab)."
So now swapoff first cycles through /proc/swaps and then through fstab
to swapoff all devices.
function old new delta
set_discard_flag - 106 +106
swap_enable_disable 147 238 +91
set_priority_flag - 79 +79
retrieve_file_data 470 467 -3
swap_on_off_main 638 418 -220
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 1/2 up/down: 276/-223) Total: 53 bytes
Signed-off-by: Tito Ragusa <farmatito@tiscali.it>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Matt Whitlock <busybox@mattwhitlock.name>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Swap entries in /etc/fstab inherit the priority specified on the command line unless they have 'pri' in their mount options.
Signed-off-by: Matt Whitlock <busybox@mattwhitlock.name>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Also, the maximum allowable value of swap priority is technically SWAP_FLAG_PRIO_MASK >> SWAP_FLAG_PRIO_SHIFT.
Signed-off-by: Matt Whitlock <busybox@mattwhitlock.name>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
add_peers - 98 +98
packed_usage 29470 29511 +41
ntp_init 407 428 +21
pw_encrypt 14 27 +13
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/0 up/down: 173/0) Total: 173 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|