OSDN Git Service

android-x86/external-toybox.git
6 years agoMake -c work with unicode chars, and first stab at -C measuring columns.
Rob Landley [Thu, 26 Oct 2017 01:27:33 +0000 (20:27 -0500)]
Make -c work with unicode chars, and first stab at -C measuring columns.

6 years agoInsmod dummy for ifconfig tests, and "pointopoint" only has two t's.
Rob Landley [Sun, 22 Oct 2017 18:36:02 +0000 (13:36 -0500)]
Insmod dummy for ifconfig tests, and "pointopoint" only has two t's.

6 years agoAdd stat to index.
Rob Landley [Sun, 22 Oct 2017 16:52:32 +0000 (11:52 -0500)]
Add stat to index.

6 years agoI ended up writing a new find from scratch, so remove old unfinished cleanup log.
Rob Landley [Sun, 22 Oct 2017 16:42:59 +0000 (11:42 -0500)]
I ended up writing a new find from scratch, so remove old unfinished cleanup log.

6 years agoTypo.
Rob Landley [Sun, 22 Oct 2017 16:41:27 +0000 (11:41 -0500)]
Typo.

6 years agoUse char for exitval and wasroot (first capped at 8 bits and second's a flag).
Rob Landley [Sat, 21 Oct 2017 14:53:14 +0000 (09:53 -0500)]
Use char for exitval and wasroot (first capped at 8 bits and second's a flag).

6 years agoUse setlocale(LC_CTYPE, "C.UTF-8") for more targeted locale enable:
Rob Landley [Sat, 21 Oct 2017 14:48:24 +0000 (09:48 -0500)]
Use setlocale(LC_CTYPE, "C.UTF-8") for more targeted locale enable:
(only enable character parsing, force utf8, "C" semantics otherwise.)

6 years agoElliott wants to add TOYBOX_VENDOR.
Rob Landley [Thu, 19 Oct 2017 21:49:52 +0000 (16:49 -0500)]
Elliott wants to add TOYBOX_VENDOR.

6 years agoFix groups(1) and id -G.
Elliott Hughes [Fri, 29 Sep 2017 22:20:26 +0000 (15:20 -0700)]
Fix groups(1) and id -G.

Both should only output the groups.

6 years agoAllow ro. properties to have arbitrary lengths
Tom Cherry [Thu, 12 Oct 2017 16:43:32 +0000 (09:43 -0700)]
Allow ro. properties to have arbitrary lengths

Android now allows ro. properties to have arbitrary lengths.  Two
changes need to happen to support this:

1) The length check in setprop.c before attempting to set a property
   needs to be removed for ro. properties
2) __system_property_read_callback() must be used in place of
   __system_property_get() in getprop.c as only the former is capable
   of reading properties with size > 92 characters.

Bug: 23102347
Bug: 34954705
Change-Id: Ib8565a3e6d987dd5e6a5fe790e804ecf8ad1e020

6 years agoTweak help_exit() to show "See %s --help" message on the same line.
Rob Landley [Tue, 10 Oct 2017 23:16:08 +0000 (18:16 -0500)]
Tweak help_exit() to show "See %s --help" message on the same line.

6 years agoComplete rewrite of cut. Handle multipe ranges, add -DFO options, start
Rob Landley [Tue, 10 Oct 2017 16:24:11 +0000 (11:24 -0500)]
Complete rewrite of cut. Handle multipe ranges, add -DFO options, start
of utf8 support (not finished yet)...

Adds new loopfiles_lines() wrapper to lib.c that calls do_lines from loopfiles.

6 years agoWorkaround from Patrick Oppenlander for a bug in config2help.h that resulted
Rob Landley [Tue, 3 Oct 2017 08:29:38 +0000 (03:29 -0500)]
Workaround from Patrick Oppenlander for a bug in config2help.h that resulted
in segfaults on newer toolchains. (That entire section is due for a rewrite.)

6 years agoFix xargs to obey POSIX's ARG_MAX restrictions.
Elliott Hughes [Wed, 20 Sep 2017 20:53:23 +0000 (13:53 -0700)]
Fix xargs to obey POSIX's ARG_MAX restrictions.

This avoids "xargs: exec echo: Argument list too long" errors in practice.

find(1) needs to be fixed too, but that's a bit more complicated and a working
xargs provides a workaround.

Bug: http://b/65818597
Test: find /proc | strace -f -e execve ./toybox xargs echo > /dev/null

6 years agoBasic Mach-O support in file(1).
Elliott Hughes [Mon, 25 Sep 2017 16:59:48 +0000 (09:59 -0700)]
Basic Mach-O support in file(1).

The Nexus Player build was subtly broken in that it assumed that the host was
using ELF. No-one noticed until a Mac user tried to flash their build, which
contained a Mach-O x86 binary instead of an ELF x86 binary. Hilarity ensued.

(On the same day, file(1) was able to explain a mixup with an ELF hexagon
binary. Next time we see a Mach-O binary on an Android device, we'll be ready!)

Bug: http://b/66741960

6 years agoAdd #warning about musl intentionally breaking chrt.
Rob Landley [Thu, 21 Sep 2017 20:33:01 +0000 (15:33 -0500)]
Add #warning about musl intentionally breaking chrt.

6 years agoFix URL typo
Zach Riggle [Wed, 13 Sep 2017 17:15:45 +0000 (12:15 -0500)]
Fix URL typo

6 years agoLast commit used xstrtod(), forgot to check it in.
Rob Landley [Sun, 10 Sep 2017 03:05:10 +0000 (22:05 -0500)]
Last commit used xstrtod(), forgot to check it in.

6 years agoRedo/add seq precision logic.
Rob Landley [Sun, 10 Sep 2017 02:35:19 +0000 (21:35 -0500)]
Redo/add seq precision logic.

Josh Gao hit a case where "seq 1000000 1000001" output 1e+06, and while he
was there changed several things to work like existing seq implementations.
I changed a couple back (commenting out the test cases) until somebody
came come up with a reason (or existing use case) to do it that way.

6 years agoTighten up wc -m tests (which no longer depend on $LANG).
Rob Landley [Wed, 6 Sep 2017 11:12:09 +0000 (06:12 -0500)]
Tighten up wc -m tests (which no longer depend on $LANG).

6 years agoReplace remaining mb*towc() calls with utf8towc().
Rob Landley [Wed, 6 Sep 2017 02:04:43 +0000 (21:04 -0500)]
Replace remaining mb*towc() calls with utf8towc().

6 years agoTweak utf8towc() to return -1 earlier sometimes (instead of -2), and add test
Rob Landley [Tue, 5 Sep 2017 07:36:24 +0000 (02:36 -0500)]
Tweak utf8towc() to return -1 earlier sometimes (instead of -2), and add test
program to compare against libc output.

6 years agoutf8towc() has to be in lib.c if strlower() is going to use it, because
Rob Landley [Sun, 3 Sep 2017 01:40:24 +0000 (20:40 -0500)]
utf8towc() has to be in lib.c if strlower() is going to use it, because
scripts/*.c builds against lib.c but not linestack.c.

6 years agoIn wc, replace mbrtowc() with new utf8towc() which doesn't have a context struct
Rob Landley [Sat, 2 Sep 2017 23:15:09 +0000 (18:15 -0500)]
In wc, replace mbrtowc() with new utf8towc() which doesn't have a context struct
or care about locale.

6 years agoAnother try at fixing the ps segfault resulting from /proc entries vanishing
Rob Landley [Thu, 31 Aug 2017 21:50:27 +0000 (16:50 -0500)]
Another try at fixing the ps segfault resulting from /proc entries vanishing
out from under us due to asyncronous process exit.

The directory we're traversing vanishing can result in DIRTREE_ABORTVAL
being returned, which we turn into a NUL entry, but then we were trying to
look at that null entry's children. Oops.

6 years agoFix iconv build and add trivial test.
Elliott Hughes [Tue, 22 Aug 2017 21:03:45 +0000 (14:03 -0700)]
Fix iconv build and add trivial test.

6 years agolsof cleanup.
Rob Landley [Fri, 18 Aug 2017 02:50:27 +0000 (21:50 -0500)]
lsof cleanup.

6 years agoCheck for .git before setting GITHASH.
Rob Landley [Mon, 7 Aug 2017 01:42:34 +0000 (20:42 -0500)]
Check for .git before setting GITHASH.

The GITHASH problem was building a tarball version under an existing git repo,
where git describe found ../../../../.git so only call git if we have a .git
directory in the source.

6 years agoAllow GITHASH to be set on the command line, to work around a yocto bug.
Rob Landley [Sun, 6 Aug 2017 01:12:57 +0000 (20:12 -0500)]
Allow GITHASH to be set on the command line, to work around a yocto bug.

6 years agoDon't unnecessarily use printf in wc.test when echo will do.
Elliott Hughes [Fri, 4 Aug 2017 00:13:20 +0000 (17:13 -0700)]
Don't unnecessarily use printf in wc.test when echo will do.

(And is much faster if your shell doesn't have a builtin printf.)

6 years agoTest that our rm -rf can zap chmod 000 directories. (Skip test on host
Rob Landley [Tue, 25 Jul 2017 20:13:16 +0000 (15:13 -0500)]
Test that our rm -rf can zap chmod 000 directories. (Skip test on host
because ubuntu's can't.)

6 years agoAdd basic env.test
Rob Landley [Sun, 23 Jul 2017 19:32:27 +0000 (14:32 -0500)]
Add basic env.test

6 years agotestcmd should only use absolute path to command when not doing TEST_HOST.
Rob Landley [Sat, 22 Jul 2017 22:00:11 +0000 (17:00 -0500)]
testcmd should only use absolute path to command when not doing TEST_HOST.

6 years agoTypo (env -0 was checking the flag wrong).
Rob Landley [Sat, 22 Jul 2017 21:44:00 +0000 (16:44 -0500)]
Typo (env -0 was checking the flag wrong).

6 years agonetcat: make -l exit after handling a request.
Josh Gao [Fri, 9 Jun 2017 17:51:18 +0000 (10:51 -0700)]
netcat: make -l exit after handling a request.

Bug: http://b/62305466

6 years agotypo
Rob Landley [Mon, 17 Jul 2017 10:37:05 +0000 (05:37 -0500)]
typo

6 years agoRedo ping plumbing. Actual ping part isn't there yet because kernel weirdness.
Rob Landley [Mon, 17 Jul 2017 10:24:34 +0000 (05:24 -0500)]
Redo ping plumbing. Actual ping part isn't there yet because kernel weirdness.

6 years agoSplit out xgetaddrinfo() from xconnect()
Rob Landley [Mon, 17 Jul 2017 10:23:45 +0000 (05:23 -0500)]
Split out xgetaddrinfo() from xconnect()

6 years agoDon't remove "remount" from the option list during early parsing, the mount
Rob Landley [Tue, 11 Jul 2017 10:17:35 +0000 (05:17 -0500)]
Don't remove "remount" from the option list during early parsing, the mount
flag doesn't get set right otherwise and it tries to overmount instead.

6 years agocomma_scan()'s clean option wasn't removing entry at end of list.
Rob Landley [Tue, 11 Jul 2017 10:16:09 +0000 (05:16 -0500)]
comma_scan()'s clean option wasn't removing entry at end of list.

6 years agodd cleanup: binary search is overkill, eliminate struct pair,
Rob Landley [Sun, 9 Jul 2017 07:13:00 +0000 (02:13 -0500)]
dd cleanup: binary search is overkill, eliminate struct pair,
simplify strstarteq, use local variable "conv" instead of toys.optargs.

6 years agoFix -Wformat compiler warning in expr.c.
Elliott Hughes [Fri, 7 Jul 2017 20:06:36 +0000 (13:06 -0700)]
Fix -Wformat compiler warning in expr.c.

Android forces -Wformat on for all source.

  toys/pending/expr.c:116:28: warning: field precision should have type 'int',
                                       but argument has type 'long' [-Wformat]
      ret->s = xmprintf("%.*s", m[1].rm_eo-m[1].rm_so, target+m[1].rm_so);
                         ~~^~   ~~~~~~~~~~~~~~~~~~~~~

6 years agoPosix says strings should only output hits that end with NUL or newline.
Rob Landley [Fri, 7 Jul 2017 21:36:45 +0000 (16:36 -0500)]
Posix says strings should only output hits that end with NUL or newline.
We don't currently do that, but a test suite checking that we don't
do that is requiring us to violate posix to pass it.

6 years agostrings -t oxd tests
Ilya Kuzmich [Mon, 29 May 2017 14:57:09 +0000 (17:57 +0300)]
strings -t oxd tests

6 years agoMake dd use atolx_range(), and teach atolx_range() about "w" suffix (word, *2).
Rob Landley [Fri, 7 Jul 2017 08:51:47 +0000 (03:51 -0500)]
Make dd use atolx_range(), and teach atolx_range() about "w" suffix (word, *2).

6 years agoFix dd tests so TEST_HOST passes. (Ubuntu's dd doesn't support hex values
Rob Landley [Fri, 7 Jul 2017 08:43:24 +0000 (03:43 -0500)]
Fix dd tests so TEST_HOST passes. (Ubuntu's dd doesn't support hex values
and don't expect a specific error message, just that it errored.)

6 years agoAdd -t, deviations from posix, redo loop to have fewer duplicate tests.
Rob Landley [Mon, 3 Jul 2017 02:39:32 +0000 (21:39 -0500)]
Add -t, deviations from posix, redo loop to have fewer duplicate tests.

6 years agostrings tests and bugfixes
Ilya Kuzmich [Mon, 29 May 2017 04:05:16 +0000 (07:05 +0300)]
strings tests and bugfixes

Fixes missing newline in output if last byte of the input is string.
Fixes one-off offset bug.
Adds strings tests.

Signed-off-by: Ilya Kuzmich <ilya.kuzmich@gmail.com>
6 years agowhitespace/comment tweaks.
Rob Landley [Tue, 27 Jun 2017 19:57:28 +0000 (14:57 -0500)]
whitespace/comment tweaks.

6 years agoteach head -c
Ilya Kuzmich [Sun, 28 May 2017 15:29:19 +0000 (18:29 +0300)]
teach head -c

Not POSIX, but implemented in coreutils, busybox and freebsd.

6 years agoMost things seem to want the "b" suffix to mean 512 instead of 1.
Rob Landley [Mon, 26 Jun 2017 20:32:27 +0000 (15:32 -0500)]
Most things seem to want the "b" suffix to mean 512 instead of 1.
(According to the git history I added "b" for "od" but the man page says 512
there too.)

6 years agoPast time for 0.7.4.
Rob Landley [Mon, 19 Jun 2017 17:34:50 +0000 (12:34 -0500)]
Past time for 0.7.4.

6 years agoManually inline TOP_COMMON and PGKILL_COMMON help text until I can teach
Rob Landley [Mon, 19 Jun 2017 12:51:58 +0000 (07:51 -0500)]
Manually inline TOP_COMMON and PGKILL_COMMON help text until I can teach
the help infrastructure to handle it.

(The lifetime rules are all wrong for hunks that get reused. Needs a largeish
rewrite.)

6 years agoGrep exits with 2 for errors, which can happen at any time ( > /dev/full).
Rob Landley [Wed, 14 Jun 2017 16:23:01 +0000 (11:23 -0500)]
Grep exits with 2 for errors, which can happen at any time ( > /dev/full).

6 years agoconfig2help.c: Rename trim() to skip_spaces(), fluff out comments a bit.
Rob Landley [Tue, 13 Jun 2017 21:33:13 +0000 (16:33 -0500)]
config2help.c: Rename trim() to skip_spaces(), fluff out comments a bit.

6 years agoAdd grep -M match and -S skip supporting wildcard patterns.
Rob Landley [Mon, 12 Jun 2017 16:26:07 +0000 (11:26 -0500)]
Add grep -M match and -S skip supporting wildcard patterns.

They don't imply -r because you might do find . -type f | xargs -S blah regex

6 years agoTwitter's code of conduct page went down, so mirror the old archive.org version.
Rob Landley [Sun, 11 Jun 2017 20:39:03 +0000 (15:39 -0500)]
Twitter's code of conduct page went down, so mirror the old archive.org version.
Move link from README to header.html menu bar.

6 years agoProvide error messages for files we can open but not read (ala directories).
Rob Landley [Sun, 11 Jun 2017 17:23:00 +0000 (12:23 -0500)]
Provide error messages for files we can open but not read (ala directories).

7 years agoFix bug where grep stopped at first dangling symlink and error_exited().
Rob Landley [Sat, 10 Jun 2017 18:17:31 +0000 (13:17 -0500)]
Fix bug where grep stopped at first dangling symlink and error_exited().

7 years agoPromote dmesg back to lsb.
Rob Landley [Fri, 9 Jun 2017 20:01:07 +0000 (15:01 -0500)]
Promote dmesg back to lsb.

7 years agoCleanup dmesg (as posted to the list).
Rob Landley [Fri, 9 Jun 2017 19:59:51 +0000 (14:59 -0500)]
Cleanup dmesg (as posted to the list).

7 years agoAdd comment explaining strend()
Rob Landley [Tue, 6 Jun 2017 18:21:03 +0000 (13:21 -0500)]
Add comment explaining strend()

7 years agoHave help_exit() give a brief "See %s --help" message instead of the
Rob Landley [Tue, 6 Jun 2017 02:22:02 +0000 (21:22 -0500)]
Have help_exit() give a brief "See %s --help" message instead of the
full help text, and put it back in the args constraint failures.

7 years agoDon't add cpio TRAILER!!! entry by default, add new --trailer option if you
Rob Landley [Sun, 4 Jun 2017 18:15:51 +0000 (13:15 -0500)]
Don't add cpio TRAILER!!! entry by default, add new --trailer option if you
want that. (This lets you concatenate cpio archives with "cat". Kernel's
initramfs extractor doesn't need it.)

7 years agoAllow ':' in property names.
Elliott Hughes [Wed, 31 May 2017 18:01:11 +0000 (11:01 -0700)]
Allow ':' in property names.

Bug: http://b/62114389
Test: setprop
Change-Id: I165bcc01bb2422d991f746c5e6490cbdfb74472f

7 years agoteach head -v and -q
Ilya Kuzmich [Sun, 28 May 2017 14:03:26 +0000 (17:03 +0300)]
teach head -v and -q

Not POSIX, but implemented in coreutils and busybox.
Tests use sed to compensate for the stdin naming difference.

Signed-off-by: Ilya Kuzmich <ilya.kuzmich@gmail.com>
7 years agoReplace two space indents with tab indents in help text (for consistency).
Rob Landley [Sat, 27 May 2017 20:54:16 +0000 (15:54 -0500)]
Replace two space indents with tab indents in help text (for consistency).

7 years agoAdd separators in help -a with command name.
Rob Landley [Sat, 27 May 2017 19:57:45 +0000 (14:57 -0500)]
Add separators in help -a with command name.

7 years agoBe more consistent about periods in help text.
Elliott Hughes [Fri, 26 May 2017 00:56:11 +0000 (17:56 -0700)]
Be more consistent about periods in help text.

7 years agoAdd -0 to env.
Rob Landley [Thu, 25 May 2017 18:27:22 +0000 (13:27 -0500)]
Add -0 to env.

7 years agoTeach env that - as first argument means -i for some reason. (Posix!)
Rob Landley [Thu, 25 May 2017 18:00:00 +0000 (13:00 -0500)]
Teach env that - as first argument means -i for some reason. (Posix!)

7 years agoAdd and use xmmap.
Elliott Hughes [Wed, 24 May 2017 00:35:49 +0000 (17:35 -0700)]
Add and use xmmap.

Everyone forgets that mmap returns MAP_FAILED rather than NULL on failure.
Every use of mmap in toybox was either doing the wrong check, or no check
at all (including the two I personally added).

7 years agoAdd minof/maxof macros that autodetect type. Make xzcat use them.
Rob Landley [Tue, 23 May 2017 20:48:26 +0000 (15:48 -0500)]
Add minof/maxof macros that autodetect type. Make xzcat use them.

7 years agofixup code style
Joyounger [Tue, 23 May 2017 16:36:35 +0000 (00:36 +0800)]
fixup code style

Signed-off-by: Joyounger <aquanox@163.com>
7 years agoPromote chrt
Rob Landley [Sun, 21 May 2017 18:23:34 +0000 (13:23 -0500)]
Promote chrt

7 years agoCleaup chrt
Rob Landley [Sun, 21 May 2017 18:11:42 +0000 (13:11 -0500)]
Cleaup chrt

7 years agoAdd bzip2 support to tar.
Elliott Hughes [Sat, 13 May 2017 01:30:03 +0000 (18:30 -0700)]
Add bzip2 support to tar.

Also trivial cleanup of pipe -> xpipe.

Bug: http://b/38215123

7 years agoImplement date %N, loosely inspired by Elliott Hughes's patch.
Rob Landley [Fri, 19 May 2017 17:35:36 +0000 (12:35 -0500)]
Implement date %N, loosely inspired by Elliott Hughes's patch.

I didn't implement %37N's ability to insert zeroes, so removed those
two tests. If you really need it, I can add the divide loop back.

7 years agofactor shouldn't give incorrect answers for >64-bit integers.
Elliott Hughes [Sat, 13 May 2017 19:48:35 +0000 (12:48 -0700)]
factor shouldn't give incorrect answers for >64-bit integers.

7 years agoMinor tweaks to install.sh.
Rob Landley [Sun, 14 May 2017 20:10:29 +0000 (15:10 -0500)]
Minor tweaks to install.sh.

7 years agoSwitch to testcmd and add "-e all but \c" test.
Rob Landley [Thu, 11 May 2017 17:31:43 +0000 (12:31 -0500)]
Switch to testcmd and add "-e all but \c" test.

7 years agoMake fewer assumptions about the shell in echo.test.
Elliott Hughes [Wed, 10 May 2017 20:51:44 +0000 (13:51 -0700)]
Make fewer assumptions about the shell in echo.test.

This test fails with mksh, but we're not here to test mksh.

7 years agoMove strend() to lib/lib.c
Rob Landley [Tue, 9 May 2017 04:01:06 +0000 (23:01 -0500)]
Move strend() to lib/lib.c

7 years agoRemove old uClibc compatibility glue. It's been 5 years since the last release.
Rob Landley [Tue, 9 May 2017 03:09:08 +0000 (22:09 -0500)]
Remove old uClibc compatibility glue. It's been 5 years since the last release.
See http://lists.busybox.net/pipermail/buildroot/2016-December/180102.html
for a full post-mortem on the project.

7 years agoNow that xopen() no longer returns stdio, !fd doesn't need strcmp("-") to verify
Rob Landley [Mon, 8 May 2017 23:25:22 +0000 (18:25 -0500)]
Now that xopen() no longer returns stdio, !fd doesn't need strcmp("-") to verify

7 years agoFix error in writing output that was causing zcat to always fail.
Mike Moreton [Fri, 23 Sep 2016 07:46:11 +0000 (08:46 +0100)]
Fix error in writing output that was causing zcat to always fail.

7 years agoError if we can't autodetect filesystem type.
Rob Landley [Mon, 8 May 2017 03:48:44 +0000 (22:48 -0500)]
Error if we can't autodetect filesystem type.

7 years agoAndroid NDK doesn't have cutils/sched_policy.h so add a probed config symbol.
Rob Landley [Sun, 30 Apr 2017 07:46:36 +0000 (02:46 -0500)]
Android NDK doesn't have cutils/sched_policy.h so add a probed config symbol.

7 years agoAndroid needs -llog to link.
Elliott Hughes [Fri, 28 Apr 2017 22:25:56 +0000 (15:25 -0700)]
Android needs -llog to link.

7 years agoBuilding mkpasswd on Android makes no sense.
Elliott Hughes [Fri, 28 Apr 2017 22:21:36 +0000 (15:21 -0700)]
Building mkpasswd on Android makes no sense.

And won't work anyway because we don't have crypt(3).

7 years agoImplement zlib-based gzip/gunzip/zcat.
Elliott Hughes [Wed, 26 Apr 2017 22:01:41 +0000 (15:01 -0700)]
Implement zlib-based gzip/gunzip/zcat.

7 years agoElliott wants to run the toybox tests on android host and there's an sh but
Rob Landley [Wed, 26 Apr 2017 21:36:19 +0000 (16:36 -0500)]
Elliott wants to run the toybox tests on android host and there's an sh but
it isn't toysh, so test for a bash alias.

7 years agoForgot to check in one of the files for bzcat.test
Rob Landley [Tue, 25 Apr 2017 07:21:39 +0000 (02:21 -0500)]
Forgot to check in one of the files for bzcat.test

7 years agoAnother FAQ, and some related tweaks as long as I was there.
Rob Landley [Tue, 25 Apr 2017 00:01:33 +0000 (19:01 -0500)]
Another FAQ, and some related tweaks as long as I was there.

7 years agoAdd ls -ll (with --full-time as a compatibility synonym) to show nanoseconds.
Rob Landley [Wed, 19 Apr 2017 06:44:16 +0000 (01:44 -0500)]
Add ls -ll (with --full-time as a compatibility synonym) to show nanoseconds.
(And, for some reason, timezone. Individual files have timezones?)

7 years agoThe kernel needs bc to build because
Rob Landley [Tue, 18 Apr 2017 18:19:07 +0000 (13:19 -0500)]
The kernel needs bc to build because
https://landley.net/notes-2013.html#28-03-2013 so add it to the airlock install.

7 years agoUse $(( rather than $[ for arithmetic in expand.test.
Elliott Hughes [Sat, 15 Apr 2017 18:27:18 +0000 (11:27 -0700)]
Use $(( rather than $[ for arithmetic in expand.test.

I can't find any reference to $[ for arithmetic on the bash man page, but it
seems to be a synonym for $((. mksh doesn't support this, so the expand tests
that use it fail on Android. No other toybox tests are using $[.

7 years agoMake ls.test work without awk.
Elliott Hughes [Fri, 14 Apr 2017 20:43:16 +0000 (13:43 -0700)]
Make ls.test work without awk.

7 years agoSpeed up tail.test for shells without builtin printf.
Elliott Hughes [Sat, 8 Apr 2017 06:15:52 +0000 (23:15 -0700)]
Speed up tail.test for shells without builtin printf.

The test only needs echo, and Android currently doesn't use mksh's
builtin printf; the toybox printf is fuller featured and less buggy,
but a lot slower to call in a loop like this (and mksh doesn't fall
back to the printf on the path if given something it can't handle,
so we can't have the best of both worlds).

Without this hack, the tail test takes as long as all the other
tests put together.

7 years agoDefault to -b rather than -q when output is to a tty.
Rob Landley [Wed, 12 Apr 2017 18:41:10 +0000 (13:41 -0500)]
Default to -b rather than -q when output is to a tty.