aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-07-14toysh: honor nosplit, expand_one_arg shouldn't free (that's what del list for)Rob Landley
2020-07-12Fixing up failing tests cases.Rob Landley
2020-07-11Chunk of job control plumbing and start of ${x:1:3} variable slicing support.Rob Landley
2020-07-05wget: do not append toybox version at runtimeAriadne Conill
The sprintf() call, while technically valid (17 bytes fits in an 18 byte allocation) trips Alpine fortify-headers due to checking for allocations that could potentially overrun. The call is pointless anyway -- as we are appending a constant to another constant, it is better to just let the compiler do so and calculate the size. This is supported by ISO C89 and later, and thus any compiler that would be used to compile toybox. Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
2020-07-05toys.h already includes poll.hRob Landley
2020-07-05dhcp6: use portable s6_addr instead of linux kernel-specific __in6_u.__u6_addr8Ariadne Conill
The glibc headers also provide that member, but s6_addr is the portable way. This fixes compilation on musl libc. Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
2020-06-27The bionic/clang asan plumbing slows the test down >10x, so expand timeout.Rob Landley
2020-06-27Add github action support to build with MacOS and Ubuntu * Builds at 02:00 ↵Eric Molitor
each day * Builds on each push
2020-06-23William Djupström reported tar --exclude wasn't working. Fix and add test.Rob Landley
(Also fix -v output going to stderr when it shouldn't.)
2020-06-23More sh tests.Rob Landley
2020-06-19Bugfix: the code to trim \n off xgetline() was using allocated not read length.Rob Landley
2020-06-19More sh testsRob Landley
2020-06-18More shell tests.Rob Landley
2020-06-16Have "make tests" fail if any of the tests failed.Rob Landley
This is sort of a hack because I want to move the individual tests to subshells, which means they don't have a shared shell context. Functions and variables not persisting into later tests is a good thing (test environments polluting each other), but it makes accumulating FAILCOUNT more awkward.
2020-06-16file: add GIF version information.Elliott Hughes
This let me compare against the host for #225.
2020-06-16Ryan Prichard reported that file wasn't getting gif heights right.Rob Landley
2020-06-16Zach Van Rijn wanted his handle capitalized.Rob Landley
2020-06-14Fix test not to use shell builtin.Rob Landley
2020-06-11hwclock: just assume /dev/rtc0.Elliott Hughes
(Apologies for the length of this commit message, but it's not entirely clear how we arrived at our present state, and right now all three of toybox, busybox, and util-linux differ from each other. And it took a week of arguments behind the scenes to agree on what we thought was the right behavior, which seemed worth capturing for posterity.) This reverts my change ef0546d4f536f42a57af4c32bd37f7fd752d10c2 from 2015. The commit message back then claimed: For systems using /dev/rtcN, /dev/rtc0 isn't necessarily the RTC that's used to provide the system time at boot time. We need to search for the RTC whose /sys/class/rtc/rtcN/hctosys contains "1". A few things to note here: 1. I can't find any historical motivation for this change. There's no bug, there's no internal email thread, and I can't even find anything referring to devices using anything other than /dev/rtc0. 2. It turns out (though this wasn't true at the time) that the kernel since 4.19 interprets hctosys as the RTC that *did* set the clock, not the RTC that *should* set the clock. 3. That's not an academic difference. If you have a cheap RTC that isn't battery-backed, or you have an RTC whose battery died, and you're using Linux 4.19 or later, you will boot with no RTC having hctosys=1. 4. An actual SoC vendor has hit this in practice. My original toybox patch appears to be equivalent to code in the Android frameworks, which -- under the auspices of the SoC vendor's bug -- I'm about to replace with code that checks "/dev/rtc" first, then "/dev/rtc0", then fails hard. (Strictly, it's this copy of the search that's causing the SoC vendor issues. AFAIK no-one's using hwclock/rtcwake except interactively. And even if they are, Android devices ship with [at least] two copies of toybox, so code/scripts on the vendor partition will continue to run the vendor copy of toybox they were developed against, and a newer toybox elsewhere on the system won't affect them.) All Android devices (and emulators) available to me at the moment use /dev/rtc0, but supporting /dev/rtc gives a workaround for anyone who really insists on using an RTC other than /dev/rtc0. That said, the Generic Kernel Image (GKI) always assumes /dev/rtc0, so going forward /dev/rtc0 is always the right choice. I did consider making toybox hwclock try /dev/rtc, /dev/rtc0, and /dev/misc/rtc -- and even wrote the code for that first -- but strace shows that busybox and util-linux's hwclock implementations differ in the order in which they try these (busybox tries /dev/rtc first, util-linux tries /dev/rtc0 first). Given that util-linux seems like the more canonical precedent, trying /dev/rtc0 and then falling back to /dev/rtc would offer no advantage to Android users (and would seem to be just another stumbling block in getting everyone to a world where /dev/rtc0 is "the" system RTC). Note that rtcwake is unaffected by all this, because the toybox and util-linux implementations both default to only trying /dev/rtc0 already. Bug: https://issuetracker.google.com/158051176
2020-06-10Chunk of job control pumbing.Rob Landley
2020-06-09chmod: fix -R and dangling symlinks.Elliott Hughes
Found trying to run the libc++ tests. For coreutils, `info chmod` says: 'chmod' ignores symbolic links encountered during recursive directory traversals. Bug: http://b/155809792
2020-06-09Tests for tar memory fix.Rob Landley
2020-06-09tar: fix bugs with adding hardlinks to archiveWilliam Djupström via Toybox
2020-06-09Inline/remove block_end() and skip_andor(). Add ->end pointer to sh_pipelineRob Landley
pointing to end of current block so we don't have to search for it later.
2020-06-08Tweak comments and error handlingRob Landley
2020-06-08Add tar test for long filenames.Rob Landley
2020-06-08tar: fix extracting long file pathsWilliam Djupström
2020-06-08xexec() shouldn't call a builtin when it's given a path to a command, butRob Landley
adding symlink indirection support put the basename() in the wrong place.
2020-06-05Fix DNS 2 is the DHCP client.Erik Moqvist
2020-06-02Build works fine on glibc but breaks on musl, add a workaround.Rob Landley
2020-06-02Fix AF_INET6 hostlookupsEric Molitor
2020-06-02Autodetect if IPv6 address is used and display warningEric Molitor
2020-06-02Cleanup setRoute and resolve warnings about alignment and NULL argsEric Molitor
2020-06-02Implement hostname lookups in display_routesEric Molitor
2020-06-02Remove getevent from roadmap: it's an android board bringup tool built byRob Landley
running a python script against the kernel headers, more or less a hardware debugging tool that doesn't really benefit from being in-tree nor does it need to ship on deployed systems. (And it should probably be a kernel module.)
2020-06-01Fix tests.Rob Landley
Includes removing a test that's just gratuitously checking whether or not a corner case gratuitously differs from coreutils. (So what? Who cares?)
2020-06-01Let $PENDING select more commands out of pending to enable.Rob Landley
2020-06-01Ahem. The new copy_file_range() check needs the config symbol probe.Rob Landley
2020-06-01Use copy_file_range() when available.Rob Landley
2020-05-31sed: add -s to the synopsis too.Elliott Hughes
2020-05-30Ethan Sommer pointed out an unnecessary return.Rob Landley
2020-05-29Fluff out the FAQ some more and flush pending README changes.Rob Landley
Yes, I need to convert to README.md, it's on the todo list...
2020-05-29Replace more SKIP_HOST with toyonly.Rob Landley
SKIP_HOST won't run a test when TEST_HOST set, but toyonly runs its arguments whenever testing toybox (including when the host version is toybox).
2020-05-29Annotate sed tests with toyonly.Rob Landley
2020-05-29Add tests for sed -sRob Landley
2020-05-29Add sed -sRob Landley
2020-05-28remove unneeded ; after GLOBALSEthan Sommer
2020-05-28portability.c: fix macOS build.Elliott Hughes
I suspect the rest of the non-POSIX signals might end up like this, but this is the subset that needs to be #ifdef'ed to fix the macOS build.
2020-05-27route: remove unused get_hostname()Ethan Sommer
2020-05-27Trivial cleanup.Rob Landley