On 12/15/20 12:59 PM, enh via Toybox wrote:
> 
> If a chmod test fails it can leave files/directories in a state
> that causes successive runs to suffer bogus failures, and that `make
> clean` can't clean up without manual intervention.

I thought I'd taught toybox rm -rf to chmod directories it couldn't delete and
try again, but I guess the host rm isn't doing that? How about:

diff --git a/Makefile b/Makefile
index 21d3359f..52602d25 100644
--- a/Makefile
+++ b/Makefile
@@ -63,6 +63,7 @@ root_clean:
        @echo root cleaned

 clean::
+       @chmod -fR 700 generated || true
        @rm -rf toybox generated change .singleconfig*
        @echo cleaned


While doing that, apparently host chmod -f on a directory that doesn't currently
exist returns an error (which would make your && not continue and recreate it).
rm -f thingy is happen if thingy doesn't already exist, but chmod -f isn't.

> Also, macOS seems to disallow +s in /tmp (but not otherwise), so
> allow those tests to be skipped. This is why I was seeing macOS
> test failures locally (because I pretty much always work on toybox
> in /tmp) that we weren't seeing on the github CI runs (which
> presumably don't run in /tmp).
> 
> With this, all the tests are passing locally for me on macOS again.
Needing to repeat skipnot before each line is awkward, lemme stare at it this
evening...

Rob
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to