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

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 29 13:03:44 PDT 2016


> On Mar 29, 2016, at 1:00 PM, Sean Silva <chisophugis at gmail.com> wrote:
> 
> 
> 
> On Tue, Mar 29, 2016 at 12:55 PM, Vedant Kumar <vsk at apple.com> wrote:
> Darwin is funny. I tried an empty string also, but the test failed :(.
> 
> Interesting. Are the quotes necessary? For the record, for PS4, both `"/"` (your patch), `/`, and `` (i.e. empty) work. 

It actually fails (i.e, proceeds with the write) with and without the quotes.


> 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?

vedant

> 
> -- Sean Silva
>  
> 
> vedant
> 
> > On Mar 29, 2016, at 12:52 PM, Sean Silva <chisophugis at gmail.com> wrote:
> >
> > An empty string also works for me and is probably more portable (i.e. `env LLVM_PROFILE_FILE= LLVM_PROFILE_VERBOSE_ERRORS=1 %run ...`). Does that work for you?
> >
> > -- Sean Silva
> >
> > On Tue, Mar 29, 2016 at 12:24 PM, Vedant Kumar via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> > Author: vedantk
> > Date: Tue Mar 29 14:24:58 2016
> > New Revision: 264773
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=264773&view=rev
> > Log:
> > [profile] Make a test work if run by the super-user
> >
> > Modified:
> >     compiler-rt/trunk/test/profile/instrprof-error.c
> >
> > Modified: compiler-rt/trunk/test/profile/instrprof-error.c
> > URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/instrprof-error.c?rev=264773&r1=264772&r2=264773&view=diff
> > ==============================================================================
> > --- compiler-rt/trunk/test/profile/instrprof-error.c (original)
> > +++ compiler-rt/trunk/test/profile/instrprof-error.c Tue Mar 29 14:24:58 2016
> > @@ -1,8 +1,5 @@
> >  // RUN: %clang_profgen -o %t -O3 %s
> > -// RUN: touch %t.profraw
> > -// RUN: chmod -w %t.profraw
> > -// RUN: env LLVM_PROFILE_FILE=%t.profraw LLVM_PROFILE_VERBOSE_ERRORS=1 %run %t 1 2>&1 | FileCheck %s
> > -// RUN: chmod +w %t.profraw
> > +// RUN: env LLVM_PROFILE_FILE="/" LLVM_PROFILE_VERBOSE_ERRORS=1 %run %t 1 2>&1 | FileCheck %s
> >
> >  int main(int argc, const char *argv[]) {
> >    if (argc < 2)
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> >
> 
> 



More information about the llvm-commits mailing list