Age | Commit message (Collapse) | Author |
|
Used near the end of the AOSP build. Almost there!
(This patch also fiddles with the help text to be able to slip the new
options in without requiring so much extra space.)
|
|
(`kill -l HUP` and `kill -l 1` both said "HUP" instead of giving you
back the one you didn't provide, before my real-time signal patch.)
|
|
Gentoo packages that build multiple variants, like once for every
version of a slotted dependency, currently fail to install if their
source dir includes a relative symlink to own child. Affects lots of
Python infrastructure, for example meson and setuptools. You've already
run into this issue, since cp.test has a todo. It's from 2008 though, so
I guess I'll bump with an expanded test case. Libc is musl-1.1.22.
|
|
|
|
|
|
(which doesn't handle "VAR=blah thingy" right if thingy is a function,
the variable winds up staying set after the function returns.)
|
|
|
|
Used quite a lot, especially with `--exclude-dir=.git`.
|
|
|
|
|
|
Add test to show failure case.
|
|
|
|
Also, debian's lsattr is producing longer output lines with new fields,
possibly an ioctl switch from FS_IOC_GETFLAGS -> FS_IOC_FSGETXATTR? Anyway,
todo items here...
|
|
Iterate over MANPATH and ordered sections using a manpath() helper
equivalent of indenting logic of man x, man 1 x, and man -k each with a
strsep loop.
|
|
This is a 15 year old freebsd extension (presumably thus also available on
MacOS) that glibc adopted in 2004, uClibc adopted in 2005, and bionic
supports. The only thing that DOESN'T support it is musl, once again
because its maintainer explicitly decided not to
(https://www.openwall.com/lists/musl/2013/01/15/26), so add an #ifdef
to let musl stay uniquely broken. (It'll stop at first NUL, everything
else can match NULs).
Finally fixes "s/x/y/g on a megabyte line of x's takes forever" issue.
|
|
Found when trying to update the toybox prebuilt used for the Android
build.
Also add the corresponding test.
|
|
|
|
POSIX finally gave us a way to use echo in a portable way despite
differences of opinion about whether to default interpretation of escape
sequences to on or off: -e enables and -E disables (as already
implemented by busybox and coreutils).
http://austingroupbugs.net/view.php?id=1222
|
|
Exec -k value as regex on basename, and on the first content line
outside a tag or on a referenced see-other, whichever appears earlier.
Reuse zcat choice as a function when looping over files. Fix \-\- and
glob.h include leftover. Handle man-pages example newlines. Clarify the
todos, naming package and issue. Remaining items are more of a wishlist
than a plan. Remove `<1>2` because it doesn't let `-k .` work, please
look into that.
|
|
|
|
Also fix the non-tty output.
Also tweak our output so the tests pass with TEST_HOST=1 too.
|
|
Use a real .class file and add tests for the other formats that file(1)
recognizes and we already have sample input in tests/files/.
|
|
We keep regressing on this, and the ELF stuff is quite complicated, so
even though checking in binaries isn't my first choice, this seems like
a good use of 20KiB...
|
|
|
|
|
|
To look up docs on my netbook and server. Practically deroff.1, with
heuristic for where to put spaces and newlines. How would you simplify
file resolution and bzcat? What have I got wrong when escaping slashes,
because while \-\^\- is -- ok, \-\- becomes -\-, e.g. in git-pull.1?
|
|
leaking memory), and mod env command to test it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A trivial test, but it would have caught the previous bug...
|
|
and fix tests to pass on host too.
|
|
Gentoo removes verbosely when building packages, for example vim-core:
https://github.com/gentoo/gentoo/blob/665eaa8/app-editors/vim-core/vim-core-8.1.0648.ebuild#L120
Implement like toy cp, without prepending an escape sign to quotation
marks in filenames. Document in a test this difference from coreutils
but similarity to busybox. How do other implementations handle such
escapes? If it matters, would you approach it with a loop and multiple
prints or somehow else?
Short help description follows 141a075, consistent with other commands.
|
|
The return value of -exec was the command's exit code, which did not
account for the fact that an exit code of zero means success, while in
C, zero means failure. From POSIX:
> the primary shall evaluate as true if the utility returns a zero
> value as exit status
This commit flips the return value, and adds two tests.
|
|
|
|
Also be a bit more consistent about `COMMAND [ARG...]` in usage text.
|
|
This one with a little cleanup of unnecessary duplication.
|
|
|
|
Also add a test, and add a test for timeout now it's been fixed.
|
|
I'm not worried about hard-coding the *century* in the other test. We'll
be long dead before that's an issue, and it's easier to read this way.
|
|
Sunday's transition in the US broke a bunch of the tests. Worse, it
broke some of the QA folks' scripts. Finally, the boil that is date's
handling of time zones and daylight time has come to a head...
This patch fixes the newly-failing tests *and* the other tests that were
checked in failing to serve as TODOs.
I've resolved the test TODOs about whether implied year/century in POSIX
format should mean the current year or 1900 in favor of the current
year. Both busybox and coreutils agree, and Rob fixed the code recently
so toybox agrees too, but without fixing the tests.
I've switched tests from Europe/London to Europe/Berlin to avoid
disagreements between C libraries about whether to say "GMT" or "UTC"
when daylight savings is not in force.
The majority of this patch implements what I'd been unsuccessfully
trying to explain on the list: that to correctly implement the distinct
input and output time zones (as demonstrated in the three failing tests
we've been carrying around for a while), we should switch to working
with time_t internally rather than struct tm. I've also added the code
to temporarily switch to the input time zone (and back again).
All the tests now pass.
|
|
were identical, so add a small delay.
|
|
--signal is simply a synonym for the exiting -s.
--foreground disables functionality we didn't yet have: putting the
child into a new process group. I've added the functionality and the
flag to disable it.
--preserve-status also makes it clear that our exit statuses didn't match
the coreutils version. In addition to callers that use --preserve-status
to get away from this madness, I also have callers that check for
specific exit values. This patch implements --preserve-status but also
fixes all the other exit statuses.
(The "125" exit value is broken for toybox in the same way that
`toybox grep --whoops ; echo $?` is. To fix this, we'd need some way to
signal that command-line parsing failures should exit with a different
value than the usual 1 --- 2 for grep, 125 for timeout. I've done as much
as grep manages, and left a TODO.)
Also add timeout tests. I couldn't think of an easy test for
--foreground, so I tested that manually with strace.
Also add some newlines to the `toybox --help` output to make it easier
to find the different sections, and expand the section on durations to
call out that fractions are supported as a matter of policy.
As long as timeout and sleep have text describing the duration syntax,
make them the same. (Personally I'd remove both in favor of the `toybox
--help` output, but as long as they're duplicated, keep them consistent.)
Also remove the SLEEP_FLOAT variant --- xparsetime means that sleep no
longer requires floating point to support sub-second resolution.
|
|
Needed to improve cp(1) testing.
|
|
Plus new tests.
|