[Toybox] [PATCH] Specify owner when testing tar with /dev/null

enh enh at google.com
Thu Dec 7 08:26:03 PST 2023


On Wed, Dec 6, 2023 at 6:44 PM Rob Landley <rob at landley.net> wrote:
>
> On 12/6/23 18:15, Colin Cross wrote:
> >> Who _does_ own /dev/null in your test environment?
> >
> > "nobody":
> >
> >     FAIL: tar pass /dev/null
> >     echo -ne '' | tar c --mtime @0 --group sys /dev/null 2>/dev/null | LST
> >     --- expected 2023-12-07 00:03:55.797797713 +0000
> >     +++ actual 2023-12-07 00:03:55.805797762 +0000
> >     @@ -1 +1 @@
> >     -crw-rw-rw- root/sys 1,3 1970-01-01 00:00 dev/null
> >     +crw-rw-rw- nobody/sys 1,3 1970-01-01 00:00 dev/null
> >     external/toybox/toybox-gtests.cpp:168: Failure
> >     Expected equality of these values:
> >       exit_status
> >         Which is: 1
> >       0
>
> Does bionic still have getuid() stubbed out? (I.E. does toybox's "stat -c %U/%G
> /dev/null" work?)

you mean getpwuid(), i assume? but i don't think that's relevant,
because i think ccross is talking about host testing. that's in an
nsjail set up by build/soong/ui/build/sandbox_linux.go.

> Rob
> _______________________________________________
> Toybox mailing list
> Toybox at lists.landley.net
> http://lists.landley.net/listinfo.cgi/toybox-landley.net


More information about the Toybox mailing list