[cfe-dev] [llvm-dev] [clang] Running a single testcase

Sedat Dilek via cfe-dev cfe-dev at lists.llvm.org
Mon May 7 08:46:53 PDT 2018


On Mon, May 7, 2018 at 5:19 PM, Brian Cain <brian.cain at gmail.com> wrote:
>
>
> On Mon, May 7, 2018 at 10:13 AM, Sedat Dilek <sedat.dilek at gmail.com> wrote:
>>
>> ...
>
>
>>
>> sdi at iniza:~/src/llvm-toolchain/build$ ./bin/llvm-lit -v
>> ./tools/clang/test/Sema/asm.c
>> llvm-lit:
>> /home/sdi/src/llvm-toolchain/llvm/utils/lit/lit/llvm/config.py:334:
>> note: using clang: /home/sdi/src/llvm-toolchain/build/bin/clang
>> -- Testing: 1 tests, 1 threads --
>> PASS: Clang :: Sema/asm.c (1 of 1)
>> Testing Time: 0.10s
>>   Expected Passes    : 1
>>
>> This now looks good to me.
>>
>> How can I force to use a different clang than
>> "/home/sdi/src/llvm-toolchain/build/bin/clang"?
>> I have no symlink to /usr/bin/clang.
>>
>
>  Can you give a little more context?  What is your ultimate goal for this
> activity?  Why would you want to run the test in this fashion and what
> meaning would you attribute to the test passing or failing?
>

When compiling a Linux-kernel I hit a problem in the
KVM/paravirtualization area and "clobbering RCX" on Debian/testing
AMD64.
The question came up, is this is a compiler bug or not.
Details see [1].

Thus, I was looking for a reproducible testcase.
I have seen that clang ships some tests.
So, I was curious to run a single one.
Not sure if clang/test/Sema/asm.c is suitable here to see "clobbering
RCX" on Debian/x86-64.

On my host I have installed a clang-7 package from <apt.llvm.org>.
I wanted to test against that version.

Does this help you?

- Sedat -

[1] https://lkml.org/lkml/2018/4/24/1227



More information about the cfe-dev mailing list