Commit Graph

134 Commits

Author SHA1 Message Date
Rob Landley
12d9419273 Revert taskset for 1.2.0. It emits a warning, breaks building under RH9,
and nobody seemed interested in fixing it despite repeated complaints.
I'll worry about it in the 1.3 timeframe...
2006-06-30 22:20:43 +00:00
Rob Landley
641c3537c0 Add a test from Glenn. 2006-06-24 22:55:13 +00:00
Rob Landley
39218932b1 Fix bug found by Joey Hess and forwarded by Bastian Bunk. Add Joey Hess's
test case to the testsuite, plus another one that would have been broken by
the first attempt at a fix.
2006-06-15 20:50:38 +00:00
Rob Landley
cd82c3c041 Don't do workarounds for broken shells. Busybox is about to grow a shell that
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.
2006-06-15 20:07:57 +00:00
Bernhard Reutner-Fischer
16d3e4e0af - add applet taskset to set/retrieve the CPU affinity of a process
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
2006-06-07 15:44:59 +00:00
Bernhard Reutner-Fischer
1e34731a6a - add testcase for grep bug (http://busybox.net/bugs/view.php?id=887)
The patch for bug #887 seems to work for me..
2006-06-04 18:40:48 +00:00
Mike Frysinger
9c03cb920a check for queueing dependancy dependancies typos 2006-05-26 01:41:04 +00:00
Mike Frysinger
3354487393 queuing is spelled correctly 2006-05-26 01:38:19 +00:00
Bernhard Reutner-Fischer
89a22ea5d9 make the testsuite a little less brittle:
- '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.
2006-05-25 13:24:02 +00:00
Mike Frysinger
96087332e7 make sure script is executable 2006-05-06 05:27:19 +00:00
Rob Landley
42bd987e22 Add an "optional" line for FEATURE_READLINK_FOLLOW. 2006-05-05 22:22:30 +00:00
Rob Landley
c008c7440d New test from Natanael Copa. 2006-05-05 21:07:41 +00:00
Rob Landley
67d5b8b5b1 Minor tweaks: remove traces of old $COMMAND environment variable. 2006-05-02 21:39:04 +00:00
Mike Frysinger
02fe81033f detect more obsolete headers 2006-04-29 04:44:08 +00:00
Bernhard Reutner-Fischer
15545b1db9 - print "Obsolet headers" instead of "Obsolete function usage" when checking
for obsolet includes.
2006-04-28 19:53:48 +00:00
Rob Landley
d5b9428bb6 Re-wordwrap the new tests, and fix seq.c to pass them. 2006-04-27 22:36:32 +00:00
Bernhard Reutner-Fischer
a345dc855f - add two regression tests for seq.
"seq two arguments equal, arbitrary negative step" fails but should pass..
2006-04-27 13:46:56 +00:00
Rob Landley
998dbee6d9 Patch from Jean Wolter:
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
2006-04-19 22:22:06 +00:00
Bernhard Reutner-Fischer
18260d5099 - typo: s/derefernce/dereference/g
Thanks to P.J. Day.
2006-04-18 14:17:49 +00:00
Bernhard Reutner-Fischer
074fe347b7 - add typo s/deamon/daemon/g 2006-04-18 11:15:19 +00:00
Bernhard Reutner-Fischer
9b68dbd878 - add grep for typo s/algorithic/algorithmic/g 2006-04-18 08:44:19 +00:00
Mike Frysinger
d017d73399 add a check for obsolete headers 2006-04-16 21:14:59 +00:00
Mike Frysinger
dbd8c3b295 add some tests for common typos and for obsolete functions 2006-04-16 06:09:46 +00:00
Rob Landley
3b84dfc2a8 Avoid spurious error message. (Technically applet order should be "SKIPPED"
when you move the testsuite directory outside of busybox and run it, but as
long as the test doesn't fail we're ok.)
2006-04-04 15:39:23 +00:00
Mike Frysinger
819b56b64a work outside of the srctree 2006-04-01 20:38:22 +00:00
Mike Frysinger
b0c5445bf5 new test for source code sanity 2006-04-01 01:36:32 +00:00
Mike Frysinger
5dd1236f49 move source code tests out into a sep file rather than just disabling/breaking them 2006-04-01 01:36:13 +00:00
Mike Frysinger
81834531aa remove bogus " 2006-04-01 01:35:52 +00:00
Mike Frysinger
2cf38523a1 silence error if busybox.links doesnt exist and run tests that begin with "all_" 2006-04-01 01:35:33 +00:00
Rob Landley
2324a7c9e5 Fix "seq 1 1". 2006-03-22 17:11:44 +00:00
Rob Landley
6bc10635f8 Make the new chroot environment creation infrastructure more flexible about
non-absolute paths.
2006-03-18 03:01:57 +00:00
Rob Landley
dcb2122e85 My mount testsuite. Not automatically run at the moment, need to figure out
how to (optionally) supply User Mode Linux to runtests.
2006-03-18 03:00:22 +00:00
Rob Landley
2824ded677 More test updates. 2006-03-16 16:02:06 +00:00
Rob Landley
4bb1b04fd1 Redo test suite to be able to test more than one command at a time. Eliminate
$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...)
2006-03-16 15:20:45 +00:00
Rob Landley
3a324754f8 I'm about to introduce tests that need to run as root (like mount.tests),
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.
2006-03-09 22:04:33 +00:00
Rob Landley
93f2286e6e When gnu fails this one we shouldn't let it _hang_... 2006-03-01 16:32:35 +00:00
Rob Landley
e8e7811fb4 Yet more sed tests. Passing these is a to-do item for 1.1.2 or 1.2, not a
1.1.1 issue.
2006-03-01 16:32:01 +00:00
Rob Landley
5c22c11de2 Add a test suite for seq. 2006-02-24 01:45:58 +00:00
Rob Landley
6b6edf959d Lots of tests the fix to sed needs to pass... 2006-02-23 23:13:16 +00:00
Mike Frysinger
23ca7253be test to make sure applets are in alphabetical order 2006-02-22 23:38:57 +00:00
Rob Landley
5c1cd5fdd3 Putting together OPTIONFLAGS, sed needs the global flag to handle multiple
options.
2006-02-16 09:25:31 +00:00
Rob Landley
006fa2d45b When setting an environment variable by piping something into grep, backquotes
can be useful.  Also tweak an if case to be more portable.
2006-02-16 09:00:57 +00:00
Mike Frysinger
546a99db1d use LC_ALL, not LANG, for forcing C 2006-01-25 22:46:25 +00:00
Tim Riker
7d501a8673 ignore whitespace 2006-01-25 00:25:37 +00:00
Tim Riker
7dd4cbf2bf LANG=C should help 2006-01-25 00:17:47 +00:00
Rob Landley
990025a7d9 Ok, I've converted the contents of the "testing/sed" directory into a
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
2005-11-10 06:26:40 +00:00
Rob Landley
c98a359a16 It was a bit out of date. 2005-11-07 09:06:34 +00:00
Rob Landley
48c6157eb9 Fix the test suite so that individual *.tests files can be run ala
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...
2005-11-07 08:50:53 +00:00
Bernhard Reutner-Fischer
82338d8460 - add a few basic tests for pidof(8) 2005-10-06 12:50:11 +00:00
Bernhard Reutner-Fischer
e34e8782a9 - support make check V=1 to run the checks in verbose mode
- pass verbose from runtest to testing.sh
2005-10-06 12:48:03 +00:00