[PATCH] Add new lit argument: --exec-feature=FEATURE

Alexey Samsonov samsonov at google.com
Mon Feb 25 06:04:09 PST 2013


On Sat, Feb 23, 2013 at 1:53 AM, Daniel Dunbar <daniel at zuster.org> wrote:

> On Fri, Feb 22, 2013 at 1:29 AM, Alexey Samsonov <samsonov at google.com>wrote:
>
>>
>>   Hi Daniel,
>>
>>   Thanks for pointing out at llvm_use_intel_jitevents! I think we can
>> benefit from adding a build configuration options that would tell
>>   the build system to build LLVM/Clang under ASan/MSan/whatever. Then we
>> can setup the correct compile flags, alter llvm-lit options
>>   etc.
>>
>>   Still, I think this is somewhat orthogonal to this patch: we want to
>> mark certain tests as "xfailing" under ASan, not "unsupported".
>>   It's also good if we have per-test granularity instead of per-directory
>> offered by lit.site.cfg (which is far less discoverable).
>>
>>   Probably, there is another way to achieve the goal - specify "asan" in
>> --param flag, but this would also require untrivial
>>   changes to lit to make it respect --param values in XFAIL: lines.
>>
>
>
Ok, I looked at tests/lit.cfg and got your point :) As it's convenient for
us to define a configuration option of the form "LLVM_USE_SANITIZER", we may
later pass necessary values to lit either via --param or using configurable
tests/lit.site.cfg.in. I'll revisit this patch later. Thanks!


> That's not exactly what I meant. The way I envision things to work is that
> --param is used to pass in parameters to the test suite configuration. It's
> up to the individual test suite logic to then use those parameters to set
> features appropriately.
>
> So, the way to do this just using --param is to require something like
> "--param=asan_enabled", and then in LLVM's lit.cfg add:
> --
> if lit.params.get('asan_enabled'):
>   config.available_features.add(...)
> --
>
> The goal is that the test suite configuration file has precise control
> over the features, and user's can't munge them directly except by using
> test-suite ordained parameters.
>
> The reason why I want this division is that in the long term I hope to
> allow test suites to declare the options they accept more explicitly, so
> that users (and developers) can see precisely what knobs and switches the
> test suite honor.
>
>  - Daniel
>
>
>>   P.S. One more random crazy idea: we can later pull --vg and --vg-leak
>> under --exec-feature flag :)
>>
>> http://llvm-reviews.chandlerc.com/D413
>>
>
>


-- 
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130225/dad48150/attachment.html>


More information about the llvm-commits mailing list