<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 15, 2022 at 11:53 AM Rob Landley <<a href="mailto:rob@landley.net">rob@landley.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 4/15/22 12:21, enh-google wrote:<br>
> SIOCSIFNAME is always != 0 ... this causes a test failure on Android:<br>
> <br>
> |PASS: ifconfig dummy0 default ifconfig: '1269' > 4 bytes FAIL: ifconfig dummy0<br>
> mtu 1269 echo -ne '' | ifconfig dummy0 mtu 1269 && ifconfig dummy0 | grep 1269 |<br>
> wc -l --- expected 2022-04-13 23:00:46.511995473 +0000 +++ actual 2022-04-13<br>
> 23:00:46.523995472 +0000 @@ -1 +0,0 @@ -1 |<br>
> <br>
> i'm assuming this should have been |if (off == SIOCSIFNAME)|?<br>
<br>
Sigh, yes, my bad. I tested the new feature, but not for regressions. :P<br></blockquote><div><br></div><div>yeah, and it seems to have passed on github CI anyway, so i didn't notice until i tried to update AOSP.</div><div><br></div><div>maybe those tests are just skipped on github?</div><div><br></div><div> SKIP: ifconfig (not root)<br></div><div><br></div><div>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...)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I'm setting up the mkroot/qemu based testing to actually do this sort of thing<br>
as root in the vm (rather than "one typo and I lose all the open tabs on my dev<br>
machine"), but now that I've got time to work on this it turns out I have a HUGE<br>
BACKLOG of half-finished little things all of which need staring at to figure<br>
out what I was trying to accomplish and then doing them if they're still worth<br>
doing. (I don't have one dirty tree, I had SEVEN. Five now...)<br>
<br>
> (or more likely<br>
> |else if| --- seems like another bug that we call ioctl() twice for SIOCSIFMAP<br>
> as we appear to do at the moment?)<br>
<br>
No, that first if() is "if we're about to set, call get first". The macros are<br>
long and only differ by one G/S letter (blame the headers), but it's "get, poke,<br>
set" because mem_start, io_addr, and irq all live in the same struct. That get<br>
intentionally doesn't have an else because it needs the poke to update the one<br>
of the three we're changing.<br>
<br>
I'll add a comment line.<br></blockquote><div><br></div><div>thanks! let me know when it's in and i'll try another sync...</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Rob<br>
</blockquote></div></div>