Age | Commit message (Collapse) | Author |
|
|
|
|
|
It turns out that zlib defaults to just copying data verbatim if the
input isn't in gzip format, rather than rejecting it. Explicitly add a
check that zlib isn't doing that. (The toybox inflation path already
errors out.)
Also add the missing test.
|
|
|
|
Add basic smoketest while we're at it.
|
|
|
|
|
|
|
|
|
|
POSIX only mentions -i/stdin, but GNU patch -- and Larry Wall's patch 1.3,
found via https://en.wikipedia.org/wiki/Patch_(Unix) -- also support
supplying the name of the file to patch and the name of the patch file
as optional arguments.
The AOSP build makes use of this syntax to patch snakeyaml to remove
references to java.beans.* stuff.
|
|
|
|
|
|
|
|
|
|
An Android engineer complained that they were seeing this when not
running as root:
$ adb shell ls
ls: ./postinstall: Invalid argument
ls: ./init: Permission denied
ls: ./data_mirror: Invalid argument
ls: ./init.environ.rc: Invalid argument
ls: ./metadata: Invalid argument
acct
adb_keys
apex
From strace, it was here:
newfstatat(4, "adb_keys", 0x7fc67eca88, AT_SYMLINK_NOFOLLOW) = -1 EACCES (Permission denied)
readlinkat(4, "adb_keys", 0x5e843c7720, 4095) = -1 EINVAL (Invalid argument)
So stop looking at st.st_mode (and then deciding to do a readlinkat())
if we didn't actually successfully stat().
|
|
When we "losetup" success need mount loop device.
Found this issue on AndroidQ
|
|
|
|
|
|
None of the current tests are relevant on the Mac because small
symlinks are inlined into inodes, as are empty directories, so
everything's using zero blocks.
|
|
|
|
(Also show unknown values on Linux in hex rather than just "unknown".)
|
|
We still prefer C.UTF-8 for predictability, but macOS doesn't have that.
|
|
Move longopts after their corresponding shortopts instead of before
|
|
::2 can legitimately be part of an IPv6 address, causing the test to
fail because the grep matches an unrelated part of the output. Be more
explicit about what we're actually searching for (as the previous test
already was) to avoid flakiness.
|
|
|
|
All three have been in use for the Android build for a while now,
and all the tests pass.
|
|
|
|
The Mac iconv_open(3) doesn't follow Unicode TR#22 rules for charset
alias matching that bionic and glibc do (and, strictly, POSIX doesn't
say you have to even though it's obviously a good idea), so we have
to say exactly "UTF-8" rather than "utf8".
Additionally, the 2006-era bash 3.2 on current versions of macOS
(because it was the last GPLv2 bash) seems to have bugs that cause
it to mangle UTF-8 input, so we can't reliably echo a UTF-8 sequence
into a file. Use \x in the tests to work around this.
|
|
BSDs call the root group "wheel" instead.
Also remove the duplicated "id id" from the progress output.
|
|
Major/minor device encoding is not portable. No two BSDs agree with
each other, and Darwin is different again.
Everyone does agree on having major()/minor()/makedev() macros, but
they disagree whether they should be in <sys/types.h> (the BSDs
including Darwin, and old versions of glibc) or <sys/sysmacros.h>
(glibc >= 2.26 and bionic).
This fixes `ls -l /dev/zero` and `stat /dev/zero` on Mac.
|
|
|
|
|
|
/proc/self/exe doesn't exist, but $C already gives us the path to
the binary. /dev/full doesn't have any equivalent afaik, so skip
that test if /dev/full is missing.
|
|
(If DIRTREE_SYMFOLLOW returns ENOENT, skipping the second fstatat() would
also skip the else goto error)
|
|
Check that the filename we fed in is output to stderr.
|
|
(So much jetlag.)
|
|
Includes new tests.
|
|
This was failing on macOS because it was calling the system env(1).
|
|
fallocate is fairly new, but I'm not sure why we didn't have stat
on the list already. Having it fixes the truncate tests.
|
|
|
|
|
|
One is really "the command is too long for me to ever call it given
other constraints", so leave "argument too long" for the case where it's
actually an argument causing the issue.
|
|
|
|
and #define/#undef a second symbol for the else case.
|
|
|
|
but the problem is some vertical sort arrangements are impossible, and that's
what it was testing for. For example, showing 29 entries in 9 columns with
horizontal sort requires 4 rows:
1 2 3 4 5 6 7 8 9
10 11 12 13 14 15 16 17 18
19 20 21 22 23 24 25 26 27
29 29 x x x x x x x
But with vertical sort that would be:
1 5 9 13 17 21 25 29 x
2 6 10 14 18 22 26 x x
3 7 11 15 19 23 27 x x
4 8 12 16 20 24 28 x x
It still doesn't fit in 3 rows (3x9=27) but with 4 rows the 7 leftover spaces
eats a whole column, so you _can't_ have 9 columns with vertical sort.
|
|
in whitespace accounting, eliminate lastcol, same sort[next] in dt, don't
count trailing whitespace on last entry in row.
|
|
Bug #69 was fixed recently by commit
0b2cfcb8fdea9673f3c2e0940f1b16d5825e16ea. Add the two tests from the
bug so we can close it out.
Fixes #69.
|
|
glibc doesn't set errno when getpw* fails, so the perror_exit() looked
fine. bionic sets ENOENT and the trailing "No such file or directory"
looks silly, so switch to error_exit().
Additionally, the default format tests fail on Android because of
SELinux (but for a different reason than usual!). There's no id
--no-context flag, so use sed to just throw away any SELinux context.
|
|
The previous patch broke -nG, so move the -G code back to showone()
which handles -n.
Add the missing tests for the various uses of -n.
Also refactor the code to avoid the need to test optflags directly.
|