[compiler-rt] r264773 - [profile] Make a test work if run by the super-user

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 29 17:49:10 PDT 2016


On Tue, Mar 29, 2016 at 1:25 PM, Vedant Kumar <vsk at apple.com> wrote:

> > Yes, this test case passes on Darwin (i.e, with `"/"`). However, it does
> not pass with `` or `""` on Darwin.
> >
> > I'm a bit curious about this. Wouldn't this test always fail if we pass
> a directory name instead of a file name?
>
> Yes, this was my intent. It lets us check the verbose logging.
>
>
> > Then we would call `fopen("some-directory-name/", ...)` which should
> fail even as root. It seems a bit less magical for the test to use
> `LLVM_PROFILE_FILE=%t/` or something. Does that work for you?
>
> Works for me, I'll go ahead and make this change if no one objects soon.
>


Thanks!

-- Sean Silva


>
> vedant
>
>
> >
> >
> > -- Sean Silva
> >
> >
> >
> > > > That said, it's important the test is portable. I'll revert and try
> again if the Windows bots have issues.
> > > >
> > > > I haven't tested a windows-targeting configuration (and don't know
> if we have a bot for that). The closest I have is windows-hosted targeting
> PS4.
> > >
> > > Hm, it could be that the public Windows bots have never run
> check-profile. The old version of the code used chmod etc. without a
> `REQUIRES: shell` line.
> > >
> > > Should we add a require line to avoid breaking future Windows bots?
> > >
> > > Let's see if anything breaks first.
> >
> > Ok, fair enough.
> >
> > vedant
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160329/bf32707c/attachment.html>


More information about the llvm-commits mailing list