[Toybox] [PATCH] find.test: add missing tests for "accidentally" fixed bug.

2019-11-04 Thread enh via Toybox
Bug #69 was fixed recently by commit 0b2cfcb8fdea9673f3c2e0940f1b16d5825e16ea. Add the two tests from the bug so we can close it out. Fixes #69. --- tests/find.test | 5 + 1 file changed, 5 insertions(+) From 7fe54848543f291c0829fe378555fd23edd9cd6a Mon Sep 17 00:00:00 2001 From: Elliott

[Toybox] [PATCH] id: fix Android issues.

2019-11-04 Thread enh via Toybox
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!).

[Toybox] [PATCH] id.c: fix -nG.

2019-11-04 Thread enh via Toybox
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. --- tests/id.test | 3 +++ toys/posix/id.c | 65

Re: [Toybox] [PATCH] id: various fixes.

2019-11-04 Thread enh via Toybox
On Mon, Nov 4, 2019 at 8:12 PM Rob Landley wrote: > > > > On 11/4/19 12:43 PM, enh via Toybox wrote: > > Handle unknown groups (fixes #117). > > > > Fix -G to show *all* groups, not just all supplementary groups. > > > > Fix -Z output to not include "context=". > > Sigh: > > - if (!FLAG(Z)) { >

Re: [Toybox] [PATCH] id: various fixes.

2019-11-04 Thread Rob Landley
On 11/4/19 12:43 PM, enh via Toybox wrote: > Handle unknown groups (fixes #117). > > Fix -G to show *all* groups, not just all supplementary groups. > > Fix -Z output to not include "context=". Sigh: - if (!FLAG(Z)) { + if (!(toys.optflags&(FLAG_g|FLAG_Z))) { I need some kind of

Re: [Toybox] [landley/toybox] Add ln -r (#145)

2019-11-04 Thread Rob Landley
On 11/4/19 12:50 PM, enh wrote: > On Mon, Nov 4, 2019 at 6:10 AM Andrew Ilijic wrote: > > i'm generally pro long-options because i think they're easier to > remember. rob is generally anti; in particular he really doesn't like > cases where there's a long option without any corresponding short >

Re: [Toybox] [landley/toybox] Add ln -r (#145)

2019-11-04 Thread enh via Toybox
On Mon, Nov 4, 2019 at 6:10 AM Andrew Ilijic wrote: > > Just a quick update and some questions. I have `realpath` implemented > in the `readlink` file. I am using the `readlink` tests as a rough > template and working on implementing them and getting them to pass for > `realpath`. > >

[Toybox] [PATCH] id: various fixes.

2019-11-04 Thread enh via Toybox
Handle unknown groups (fixes #117). Fix -G to show *all* groups, not just all supplementary groups. Fix -Z output to not include "context=". --- tests/id.test | 3 +++ toys/posix/id.c | 53 + 2 files changed, 26 insertions(+), 30 deletions(-)

Re: [Toybox] [PATCH] id: support numeric lookup.

2019-11-04 Thread enh via Toybox
On Mon, Nov 4, 2019 at 1:25 AM Rob Landley wrote: > > On 11/3/19 11:31 PM, enh wrote: > > i hit this bug in practice, but it did remind me of the reported id(1) > > bug https://github.com/landley/toybox/issues/117. re-reading that, > > I need to go through those again, but I have _years_ of todo

Re: [Toybox] I've introduced you to kisslinux

2019-11-04 Thread Andrew Ilijic
It seems similar to Alpine Linux. Reading their website I learned about ShellCheck, nice. https://www.shellcheck.net/ ~Andrew On Sun, Nov 3, 2019 at 8:33 PM scsijon wrote: > > Hope you don't mind this, their posix based. > > The url is https://github.com/kisslinux/repo/issues/113 , with the

Re: [Toybox] [landley/toybox] Add ln -r (#145)

2019-11-04 Thread Andrew Ilijic
Just a quick update and some questions. I have `realpath` implemented in the `readlink` file. I am using the `readlink` tests as a rough template and working on implementing them and getting them to pass for `realpath`. http://man7.org/linux/man-pages/man1/realpath.1.html

Re: [Toybox] Testing: how to check return code (Rob Landley)

2019-11-04 Thread scsijon
Message: 2 Date: Sun, 3 Nov 2019 19:01:14 -0600 From: Rob Landley To: toybox@lists.landley.net Subject: Re: [Toybox] Testing: how to check return code Message-ID: Content-Type: text/plain; charset=utf-8 On 10/30/19 1:56 PM, enh via Toybox wrote: I am with you enh. In this case, I wanted