Age | Commit message (Collapse) | Author |
|
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 $[.
|
|
|
|
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.
|
|
|
|
The test shouldn't assume there's a toybox binary on the path.
|
|
|
|
The argument to help_exit is a char*, not a FILE*.
|
|
utimensat takes atime in [0] and mtime in [1], but since we're overwriting
with UTIME_OMIT, we actually want to flip the comparison so -a blats 1 and
-m blats 0.
|
|
busybox uudecode supports this, and POSIX explicitly mentions it (albeit
only in the "STDOUT" section). Plus Android doesn't have /dev/stdout and
/dev/stdin, so this lets us rewrite the uudecode tests so they pass on
Android too.
|
|
While we're at it, ls -m wordwrap was one column early.
|
|
Also try to only kill processes we created.
|
|
Parsing file(1) output isn't a good way to determine file system type anyway.
|
|
Also make the cleanup kill more focused.
|
|
Also use a much stricter regex in the regex test to avoid killing innocent
bystanders.
|
|
|
|
check in two converted commands.
|
|
|
|
|
|
isn't obviously useful.)
|
|
Also refactor so that legacy mode gets all the new functionality too, and
add -S to make it easier to test legacy mode on 3.5 or newer kernels (at least
on the host; on Android the syslog(2) system call is no longer allowed).
Bug: http://b/36090178
|
|
not to have it, and implementing our own means a pattern like
"Time %%%s%%" is expensive to handle the corner cases of.
|
|
(or April 31 in any year). Some normalization allowed, exclusions are just
what http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html says.
|
|
with range checks for seconds, minutes, hours, day of month, and month.
|
|
`ps -A | cat` shouldn't have different output depending on the size of
your terminal window.
|
|
Fixes:
toys/android/getprop.c:56:39: warning: incompatible pointer types
passing 'void (void *, const char *, const char *)' to parameter of
type 'void (*)(void *, const char *, const char *, uint32_t)'
(aka 'void (*)(void *, const char *, const char *, unsigned int)')
[-Wincompatible-pointer-types]
__system_property_read_callback(pi, read_callback, NULL);
^~~~~~~~~~~~~
|
|
so throw them in the "requests" category so they show up in status.html.
|
|
|
|
|
|
Also add trivial tests.
|
|
exist, which can hit ps when /proc isn't there or /proc/$PID/task isn't
there (because process exited between the time we checked its contents
and the time we looked for its threads).
|
|
|
|
and make uptime use it.
|
|
|
|
|
|
|
|
|
|
|
|
(Recent "show + for last char when truncated" change broke that, putting it
back.)
|
|
Recent-ish clang doesn't like self-assignment. Google/Android code always
uses the [template-based moral equivalent of] __attribute__((__unused__))
to keep both compilers happy.
|
|
to unify the two codepaths in Elliott's rewrite.
|
|
I never use these, so I didn't notice I'd broken them until someone who
does bringup complained.
The "one weird trick" with SEEK_DATA is documented at the URL we already
point to. SEEK_DATA was added in Linux 3.1 (2011) and isn't available in
glibc 2.19 (2014), so I've added that to "portability.h" for the benefit
of Ubuntu 14.04.
Also make -c and -C mutually exclusive.
Also fix some of the formatting I introduced earlier. (A clang-format file
would help prevent these mistakes...)
|
|
|
|
|
|
If we can read and write bzip2 files, we should be able to identify them
too...
|
|
|
|
|
|
|
|
|
|
to be left justified again.
|
|
|