[Toybox] [landley/toybox] Add "ifconfig eth0 rename NEWNAME". (f22bec1)

enh enh at google.com
Fri Apr 15 16:10:15 PDT 2022


On Fri, Apr 15, 2022 at 11:53 AM Rob Landley <rob at landley.net> wrote:

> On 4/15/22 12:21, enh-google wrote:
> > SIOCSIFNAME is always != 0 ... this causes a test failure on Android:
> >
> > |PASS: ifconfig dummy0 default ifconfig: '1269' > 4 bytes FAIL: ifconfig
> dummy0
> > mtu 1269 echo -ne '' | ifconfig dummy0 mtu 1269 && ifconfig dummy0 |
> grep 1269 |
> > wc -l --- expected 2022-04-13 23:00:46.511995473 +0000 +++ actual
> 2022-04-13
> > 23:00:46.523995472 +0000 @@ -1 +0,0 @@ -1 |
> >
> > i'm assuming this should have been |if (off == SIOCSIFNAME)|?
>
> Sigh, yes, my bad. I tested the new feature, but not for regressions. :P
>

yeah, and it seems to have passed on github CI anyway, so i didn't notice
until i tried to update AOSP.

maybe those tests are just skipped on github?

  SKIP: ifconfig (not root)

yep. (ideally i'd run the tests _twice_ on Android: once as root and once
not as root, but that's a lot harder and hasn't bitten us _yet_ so "just as
root" it is...)


> I'm setting up the mkroot/qemu based testing to actually do this sort of
> thing
> as root in the vm (rather than "one typo and I lose all the open tabs on
> my dev
> machine"), but now that I've got time to work on this it turns out I have
> a HUGE
> BACKLOG of half-finished little things all of which need staring at to
> figure
> out what I was trying to accomplish and then doing them if they're still
> worth
> doing. (I don't have one dirty tree, I had SEVEN. Five now...)
>
> > (or more likely
> > |else if| --- seems like another bug that we call ioctl() twice for
> SIOCSIFMAP
> > as we appear to do at the moment?)
>
> No, that first if() is "if we're about to set, call get first". The macros
> are
> long and only differ by one G/S letter (blame the headers), but it's "get,
> poke,
> set" because mem_start, io_addr, and irq all live in the same struct. That
> get
> intentionally doesn't have an else because it needs the poke to update the
> one
> of the three we're changing.
>
> I'll add a comment line.
>

thanks! let me know when it's in and i'll try another sync...


> Rob
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20220415/a92a4f4c/attachment-0001.htm>


More information about the Toybox mailing list