aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2016-03-10Fix segfault in sed -e 'c\'.Andy Chu
Found by afl-fuzz.
2016-03-03Fix bzcat integer overflow reported by John Regehr.Rob Landley
2016-03-02Fix file for Java class files, improve script detection, and add tests.Elliott Hughes
2016-03-02Factor out command name at the start of test name, have runtest.sh print it.Rob Landley
2016-03-02Print command name at start of each test.Rob Landley
2016-03-02Split lsattr/chattr tests.Rob Landley
2016-03-02Command name at start of each test.Rob Landley
2016-03-02Add fstype test.Rob Landley
2016-03-02Try to consistently print command name at the start of each test.Rob Landley
2016-03-02split pgrep/pkill tests.Rob Landley
2016-02-19Add xxd -p and -r.Elliott Hughes
SELinux denials include hex-encoded paths in the log messages; xxd -r -p is a convenient way to decode them. The heuristics are a little weird to my mind, but match the documentation and observed behavior.
2016-02-17The perl build's attempt to escape spaces and such in LD_LIBRARY_PATH is _SAD_.Rob Landley
It uses a sed expression that assumes you can escape - to use it as a literal (you can't, it has to be first or last char of the range), and assumes you have to escape delimiters in sed [] context (you don't), and/or that non-printf escapes become the literal character (they don't, the backslash is preserved as a literal), meaning it winds up doing "s/[\-\]//" which is a length 1 range, which is officially undefined behavior according to posix, and regcomp errors out. But if we don't accept it (like other implementations do) the perl build breaks. So collapse [A-A] into just [A]. Testcae taken from perl 5.22.0 file Makefile.SH line 8. (While we're at it, remove an unused argument from a function.)
2016-02-17Testfile with the 3 different types of "not utf8 output" escaped chars in it.Rob Landley
2016-02-10toybox: tar: Fix support for long namesTom Marshall
Pathnames may be longer than the name field in the header, so use strncpy() instead of xstrncpy() to avoid bailing out. Also add unit tests to ensure proper handling of short and long pathnames. Change-Id: Id025891993746889564b479e5185cf9721b54a55
2016-02-10toybox: tar: Fix tar testsTom Marshall
Don't rely on ordering of readdir for tests. Change-Id: Ice24bb64ce453acb0006e3746677d619db933ab1
2016-02-10Add seq -w, suggested by izabera.Rob Landley
2016-02-05Fix segfault when `find -iname` gets no argument.Josh Gao
2016-02-04Fix -H and -n with -ABC, and add tests.Rob Landley
2016-01-31More testsuite tweaks.Rob Landley
2016-01-31chmod.test had umask assumptions which broke, so set explicit umask.Rob Landley
2016-01-31Fix broken test in cat.test.Rob Landley
"cat /proc/self/exe && cmp /proc/self/exe" won't see the same file if cat and cmp aren't both in a toybox multiplexer binary, so snapshot and pick one.
2016-01-31Fix blkid typo (label wasn't detected in murderfs).Rob Landley
2016-01-31Tweak to "find" tests.Rob Landley
2016-01-30Add grep -B -CRob Landley
2016-01-30Add grep -ARob Landley
2016-01-21Add a sed test from the posix mailing list.Rob Landley
2016-01-15More utf8 test files.Rob Landley
2016-01-15Fix sort -f, add tests, make TEST_HOST pass new tests.Rob Landley
2016-01-05Some utf8/unicode stress test files.Rob Landley
2015-12-06Enable matching any perm bits.Gilad Arnold
Includes tests for the new feature, and a failure case for the minimal perms test as well. Also some typo fixing / massaging the help text so it fits in 80 columns.
2015-12-04Tom Marshall reported that blkid was handling ext2 wrong.Rob Landley
Even though ext2 has a comment that it has to be at the start, I added swap to the start of the array (oops). The test suite was also wrong (it was matching the _incorrect_ output).
2015-12-04Replace duplicate sed test with case we hadn't covered yet.Rob Landley
2015-11-19Fix find -perm.Elliott Hughes
1) It read st_dev instead of st_mode. 2) It reversed the semantics of absolute vs minimal ('-' prefixed) tests. Add tests for these, and move the "unterminated -exec" test into the "Still fails" section because it's still dumping core for me.
2015-11-12Fix year parsing in date(1).Elliott Hughes
Four-digit years were being mangled by the code for two-digit years. Move all the two-digit year code into the "we only saw two digits" case. Add some new tests and fix existing tests.
2015-11-05Fix sed bug where any ] right after [ was skipped, not just first one in range.Rob Landley
2015-11-01Change grep -w to checking matches after the fact rather than modifing regex.Rob Landley
This lets '(x)\1' match, as reported by Isabella Parakiss.
2015-10-29Fix sed bug reported by Isabella Parakiss, where sed -e "/x/c\" -e "y" addedRob Landley
an extra newline because the test for whether we have an existing string to append a newline to was checking if struct step had data appended to it, and the /x/ regex is data appended to it. Change test to check for null terminator at ->arg1 offset.
2015-09-14Add find tests.Daniel K. Levy
2015-09-12Fix a find segfault.Rob Landley
Elliott Hughes found a bug https://android-review.googlesource.com/#/c/170020/ and Daniel K. Levy worked out the problem: the user/group/newer arguments to find weren't consuming their arguments when not checking the results of their comparison (because an earlier test had already caused their parenthetical group to fail). This confused the argument parsing logic and could lead to segfaults. I applied a different fix that reorganized the existing tests instead of adding a new test. (Looks like a big commit but it's mostly whitespace due to extra curly brackets changing indendentation levels.)
2015-09-06Switch HR_SI to HR_1000, make binary the default, make HR_B only affect bytes,Rob Landley
and update the tests.
2015-09-05Add seq -f tests, tweak help text, and catch one more error case.Rob Landley
2015-09-03Make human_readable() handle base 1024 units without floating point.Rob Landley
Rounds correctly via brute force, displayed digits are decimal even when working with powers of 2, shows at most 3 significant (decimal) digits. (So no "1023M" nonsense, that's 1.0G.)
2015-08-30Fix mv on overwrite.Elliott Hughes
We need to remove the destination, not the source, to be able to overwrite.
2015-08-11Fix more date bugs.Elliott Hughes
Correctly and portably check for non-normal dates, and explicitly show the "before" and "after" dates (in the format of the user's choosing). Clear the struct tm in date_main rather than parse_default because on one path the struct tm is actually initialized. Explicitly clear the tm_sec field in parse_default because -- experiment shows -- that should not be preserved. Only do the "what does this 2-digit year mean?" dance if we actually parsed a 2-digit year. Show the right string in the error message if strptime fails. Also add more tests, and use UTC in the tests to avoid flakiness.
2015-08-08Reject invalid dates in date(1).Elliott Hughes
Humans get upset when date(1) lets mktime(3) work out what the 99th day of the 99th month would be rather than rejecting the invalid date. For the subtly wrong cases, rather than get into the leap year business, let's rely on localtime_r(3).
2015-07-04Actually set time with touch -d and -t when you don't specify nanonseconds.Rob Landley
There's a nanoseconds field value that says use current time, which I set but forgot to clear in the right places. (Oops.)
2015-07-02The android guys sent in xxd. It doesn't share code with od and hexdump. Hmmm...Rob Landley
2015-07-01Fix segfault with "mount -o ro,remount".Elliott Hughes
Or any call to comma_scan where 'opt' appears as the last item in 'optlist'.
2015-05-12Set the executable bits on all the *.test files. (Wasn't consistent, is now.)Rob Landley
2015-04-28Fix truncate prefix bug and add truncate test suite entry.Rob Landley