[Toybox] [PATCH] roadmap update: Android switched to toybox ls today.
enh
enh at google.com
Sat May 16 13:43:43 PDT 2015
actually, this is the one outstanding patch you _shouldn't_ apply --- i had
to revert the switch to ls late last night after it broke a surprising
amount of infrastructure.
(the toolbox ls didn't columnate, and "adb shell ..." creates a pty on the
remote side, so toybox ls sees that and defaults to -C rather than -1.
callers can't use -1 to say what they want, because toolbox ls didn't
support that, and even if we add it today they still need to deal with a
mix of old and new devices. similarly, the pty creation is on the adbd
side, so although i'll fix that to be like ssh(1), that will only help new
devices. i suspect we'll have to disable the isatty test in ls_main for the
next ten years. there's also code that parses the toolbox ls -l format,
which doesn't have the "nlink" column, so i'll need to find and fix those
regular expressions. but first i need to talk to the ddmlib folks to see
why they're parsing ls output at all, when using the adb sync protocol
queries would seem like a better idea...)
but there's plenty of other stuff like the hwclock fix and the find -inum
addition and the xxd for pending to keep you busy, plus -- as you said --
there's smack for the flight :-) (rather than make things more confusing
and risk slowing things down even further, i'm waiting until the smack
changes are in before i worry about SELinux. what i've seen looks plausible
though so i'm not anticipating problems.)
btw, on the subject of testing --- i noticed that a command that SEGVs gets
a "PASS". i've been meaning to fix that and send a patch, but since it's
been two weeks since i noticed already, i should at least report it...
On Sat, May 16, 2015 at 10:26 AM, Rob Landley <rob at landley.net> wrote:
> On 05/15/2015 08:17 PM, enh wrote:
> > roadmap update: Android switched to toybox ls today.
>
> Sorry, been sucked away into $DAYJOB recently, flying back to Japan
> tomorrow
> and trying to get stuff done before then. I am _waaaaay_ behind on the
> list, and need to basically reread this whole month's web archive and
> deal with stuff in order. (I've downloaded smack-10 to look at on the
> plane.)
>
> The dirtree_parentfd() stuff not working is because the filehandle gets
> closed by the time dirtree_recurse() returns (see line 330 where we dup()
> one to avoid that), which means we have to read the xattr string and store
> it during the traversal. The actual callback that collects this data is
> filter(), so that's the logical place to snapshot it, but ->extra is
> already
> used to signal this argument came from the command line (I don't remember
> why). I can malloc a struct but don't want to if I can avoid it.
>
> Looking at ls_main() and the strange way we have an empty top of tree
> node crated with (0,0), I vaguely remember this was to get some aspect of
> the ls -R behavior right (when to print or not print directory labels?)
> and this is when, before I start fiddling with it, I REALLY want there to
> be a tests/ls.test with regression tests for all these weird corner cases
> I had to get right at the time and am worried about breaking now just
> because
> I don't remember what they all _are_.
>
> So I was briefly happy to see there's an ls.test, but it's an external
> contribution that doesn't actually test any of the things I'm worried about
> breaking here. (This is why I need a "pending" directory for the test
> suite.
> And really need to spend lots of time making what I consider to be proper
> test suite entries for each command.)
>
> So my next todo item there is working out why I implemented it that way,
> and if I can easily test that top-of-tree thing at runtime and thus
> repurpose dirtree->extra without mallocing an extra struct for it.
> (The painful bit would be mallocing _just_ the flag in the non-lsm-label
> case.) I think I can, but need to work through to be sure.
>
> But meanwhile, I'm back looking at the smack-10 branch starting from
> the new lib files, which is another message...
>
> Rob
>
--
Elliott Hughes - http://who/enh - http://jessies.org/~enh/
Android native code/tools questions? Mail me/drop by/add me as a reviewer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20150516/f72b3176/attachment-0004.htm>
More information about the Toybox
mailing list