Age | Commit message (Collapse) | Author |
|
Various fixes, cleanups and shrinkage:
saves 952 Bytes:
text data bss dec hex filename
1087742 15853 790632 1894227 1ce753 ../busybox/busybox.old
1086790 15853 790632 1893275 1ce39b busybox
via:
# scripts/bloat-o-meter ../busybox/busybox_unstripped.old busybox_unstripped
function old new delta
ipcrm_main 756 822 +66
getval - 61 +61
maybe_set_utc - 40 +40
udhcpc_main 2896 2912 +16
md5_hash_block 428 437 +9
opt 8 16 +8
qgravechar 106 110 +4
make_bitmap 292 295 +3
inflate_unzip 2056 2059 +3
add_partition 1412 1414 +2
__parsespent 156 158 +2
qrealloc 41 42 +1
format - 1 +1
catv_main 313 314 +1
watch_main 293 292 -1
varunset 81 80 -1
part 1 - -1
check_if_skip 837 836 -1
start_stop_daemon_main 840 837 -3
create_lost_and_found 175 172 -3
supress_non_delimited_lines 4 - -4
static.l 4 - -4
static.c 5 1 -4
bsd_sum_file 237 233 -4
eval2 338 332 -6
arithmetic_common 166 158 -8
cmpfunc 22 5 -17
cksum_main 294 275 -19
cmp_main 465 439 -26
dd_main 1535 1508 -27
rmmod_main 376 333 -43
cut_file 727 644 -83
ipcs_main 3809 3721 -88
cut_main 722 614 -108
date_main 1443 1263 -180
remove_ids 222 - -222
------------------------------------------------------------------------------
(add/remove: 3/4 grow/shrink: 11/18 up/down: 217/-853) Total: -636 bytes
|
|
fix than his, and shrank the code a bit on top of that so the net size is
smaller, and added a test to the test suite for this case. Plus I cleaned up
the #includes and removed unnecessary "const"s while I was there.
|
|
and nobody seemed interested in fixing it despite repeated complaints.
I'll worry about it in the 1.3 timeframe...
|
|
|
|
test case to the testsuite, plus another one that would have been broken by
the first attempt at a fix.
|
|
we can run our own testsuite under, and I want it to handle the full range of
strange and peverted behavior you can find in real world shell scripts.
In the meantime, I'll just say #!/bin/bash in places that may care.
|
|
text data bss dec hex filename
584 0 0 584 248 taskset.o.gcc-2.95
509 0 0 509 1fd taskset.o.gcc-3.3
505 0 0 505 1f9 taskset.o.gcc-3.4
506 0 0 506 1fa taskset.o.gcc-4.0
498 0 0 498 1f2 taskset.o.gcc-4.1
495 0 0 495 1ef taskset.o.gcc-4.2-HEAD
|
|
The patch for bug #887 seems to work for me..
|
|
|
|
|
|
- 'function fn_name\n{' breaks on older FreeBSD default shells, so use the more
widely supported 'fn_name () {'. This needs more fixing..
- test for integers ought to use the proper operators
- test for strings ought to use quoting of the strings to be fair to strange
implementations of test(1)
- make sure not to ignore return-codes != 0 from commands; Some shells exit
immediately on this (much like explicitely requesting set -e in e.g. bash)
TODO:
*) Some older shells do not allow a space after the test-condition in an "if"
statement. This doesn't work:
if [ $status -ne 0 ] ; then
as opposed to this:
if [ $status -ne 0 ]; then
or this
if [ $status -ne 0 ]
then
*) strict spacing between commands. In some shells you have to say:
foo ; bar ; baz
The affected shells barf on stuff like ommitting the space, so this doesn't
work:
foo; bar ;baz
*) $() vs. ``
The former isn't really portable as opposed to the latter.
*) fix frong assumption that the testsuite is run from the source-dir.
This is a complete misconception and renders the testsuite completely useless.
That said, i note that IMO a test-harness ought to do it's best to work in
a wide variety of environments, everything else defeats it's purpose.
|
|
|
|
|
|
|
|
|
|
|
|
for obsolet includes.
|
|
|
|
"seq two arguments equal, arbitrary negative step" fails but should pass..
|
|
it looks like the introduced support for character classes and
equivalence classes is not correct. The attached patch tries to fix
some symptoms and tries to make tr behave like gnu tr for the added
test cases. The patch
- removes if clauses with side effects
- fixes handling of buffer pointer (strcat added characters to the
buffer without increasing the buffer pointer)
- re-arranges character classes to match ASCII order
regards,
Jean
|
|
Thanks to P.J. Day.
|
|
|
|
|
|
|
|
|
|
when you move the testsuite directory outside of busybox and run it, but as
long as the test doesn't fail we're ok.)
|
|
|
|
|
|
disabling/breaking them
|
|
|
|
|
|
|
|
non-absolute paths.
|
|
how to (optionally) supply User Mode Linux to runtests.
|
|
|
|
$COMMAND environment variable, instead put full command line (including
command to run) in second argument. Modify $PATH to have test versions of
commands at start of path. (Also more infrastructure for testing as root,
work in progress...)
|
|
meaning we want to run them in a chroot environment. To help with this,
I worked out a utility function that makes it really easy to set up a chroot
environment.
|
|
|
|
1.1.1 issue.
|
|
|
|
|
|
|
|
options.
|
|
can be useful. Also tweak an if case to be more portable.
|
|
|
|
|
|
|
|
sed.tests file. My brain hurts now. (Lots of boggling at sed minutiae and
corner cases and going "why is gnu giving that output". The behavior of N
and n with regard to EOF are only understandable if you read the Open Group
spec, not if you read the sed info page, by the way...)
Some of the existing sed tests are just nuts. For example, sed-next-line is
testing for our behavior (which is wrong), and would fail if run against gnu
sed (which was getting it right. Again, this was a spec-boggling moment,
with much head scratching. I've got to add a debug mode where the stuff
output by the p command is a different color from the stuff output by normal
end of script printing (when not suppressed by -n).)
As for sed-handles-unsatisifed-backrefs: what is this test trying to _do_? I
ran it against gnu sed and got an error message, and this behavior sounds
perfectly reasonable. (It _is_ an unsatisfied backref.) The fact we
currently ignore this case (and treat \1 as an empty string) isn't really
behavior we should have a test depend on for success.
The remaining one is sed-aic-commands, which is long and complicated. I'm
trying to figure out if I should chop this into a number of smaller tests, or
if having one big "does-many-things" test is a good idea.
In any case, the _next_ step is to go through the Open Group standard and
make tests for every case not yet covered. (And there are plenty. There
are few comments in the file already.) Plus I have notes about corner
cases from development that I need to collate and put into here. This file
is maybe the first 1/3 of a truly comprehensive sed test.
Rob
|
|
|
|
COMMAND=sort ./sort.tests
So we can compare against non-busybox versions, and possibly our testsuite
will be useful to somebody like the Linux Test Project someday.
Redid testing.sh to add new command, "optional", to skip tests that require
certain features. (use: `optional FEATURE_SORT_BIG`, or `optional ""` to
stop skipping.) Note that optional is a NOP if the environment variable
"OPTIONFLAGS" is blank, so although we're marking up the tests with busybox
specific knowledge, it doesn't interfere with running the tests without
busybox.
Moved setting the "OPTIONFLAGS" environment variable to runtest. Philosophy:
busybox-specific stuff belongs in runtest; both testing.sh and the tests
themselves should be as busybox-agnostic as possible.
Moved detecting that a command isn't in busybox at all (hence skipping the
entire command.tests file) to runtests. Rationale: optional can't currently
test for more than one feature at a time, so if we clear anything with
optional "" we might perform tests we don't want to.
Marked up busybox.tests to know which tests need CAT enabled. Fixed up other
tests to be happy with new notation.
I suspect egrep should be appended to grep. It's a sub-feature, really...
|