[libcxx-dev] Broken libcxx-libcxxabi-libunwind bots due to Filesystem tests

Louis Dionne via libcxx-dev libcxx-dev at lists.llvm.org
Thu Apr 2 11:23:27 PDT 2020

> On Apr 2, 2020, at 14:05, Duncan Exon Smith <dexonsmith at apple.com> wrote:
>> It looks like the following bots assigned to you started failing recently:
> I agree the bots should be fixed, but...
>> I strongly suspect this is due to the fact that your builder is running as root. Libc++'s filesystem tests are known to fail when run as root, because some of them need to check for failure to access some files for which there's no permission. This doesn't seem to work when run as root.
> It seems like these tests could have a line like:
> ```
> REQUIRES: -user=root
> ```
> and libcxx's lit target could export a `user=root` feature when tests were being run as root.  WDYT?

I think you mean `// UNSUPPORTED: -user=root`? Yes, I think it would make sense. Either that or actually spend the time to make them work as root.

FWIW, I think the root cause of the issue is that "traverse" permissions in directories are not honoured when run as root:

    root $ d=$(mktemp -d)
    root $ touch $d/foo
    root $ chmod 000 $d
    root $ stat $d/foo
    16777221 234259215 -rw-r--r-- 1 root wheel 0 0 <...>

When I would expect:

    ldionne $ d=$(mktemp -d)
    ldionne $ touch $d/foo
    ldionne $ chmod 000 $d
    ldionne $ stat $d/foo
    stat: <...>/tmp.JoY6Ixmo/foo: stat: Permission denied

Does that make sense? I didn't know 'root' had a free pass like that.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libcxx-dev/attachments/20200402/d423be18/attachment.html>

More information about the libcxx-dev mailing list