[compiler-rt] r351134 - [compiler-rt] UBSan: just completely disable two alignment-assumption tests for now.

Roman Lebedev via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 15 12:46:44 PST 2019


On Tue, Jan 15, 2019 at 9:51 PM Matt Morehouse <mascasa at google.com> wrote:
>
> We generally use compiler-rt tests to test the end-to-end behavior, so it makes sense to test the different ways the report can trigger.
Ok, good to know this for sure. Though i don't think every single path
always has tests.
(e.g. i didn't add compiler-rt tests for compound assignment handling
of implicit conversion sanitizer.)

Looks like that the rewritten tests fixed all the bot complaints,
i fail to see any bots that are still unhappy with v2 commit.

Roman.

> On Mon, Jan 14, 2019 at 11:11 PM Roman Lebedev <lebedev.ri at gmail.com> wrote:
>>
>> On Tue, Jan 15, 2019 at 6:48 AM Vlad Tsyrklevich <vlad at tsyrklevich.net> wrote:
>> >
>> > Hi Roman, unfortunately '*' is not handled for UNSUPPORTED like it is for XFAIL.
>> Oh well, good to know i suppose :)
>> I guess i should have simply deleted those two tests instead.
>>
>> > I considered submitting the change below but don't have time to investigate how to write an appropriate test for lit. At first I submitted a change to make the UNSUPPORTED an XFAIL but realized the semantics are different. I've reverted your changes in r351159.
>> Thanks.
>> I'll change the testing approach like i wondered in the commit message
>> and resubmit, hopefully that will do it.
>>
>> Also, i'm not quite sure what these compiler-rt tests should be testing.
>> It is my belief that they should only be testing the handler itself,
>> so testing the every way it can be triggered is not really necessary.
>>
>> > --- a/llvm/utils/lit/lit/Test.py
>> > +++ b/llvm/utils/lit/lit/Test.py
>> > @@ -345,6 +345,10 @@ class Test:
>> >          triple = getattr(self.suite.config, 'target_triple', "")
>> >
>> >          try:
>> > +            # If this is the wildcard, it's always unsupported.
>> > +            if item == '*':
>> > +                return ['*']
>> > +
>> >              return [item for item in self.unsupported
>> >                      if BooleanExpression.evaluate(item, features, triple)]
>> >          except ValueError as e:
>>
>> Roman.
>>
>> > On Mon, Jan 14, 2019 at 2:48 PM Roman Lebedev via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>> >>
>> >> Author: lebedevri
>> >> Date: Mon Jan 14 14:44:19 2019
>> >> New Revision: 351134
>> >>
>> >> URL: http://llvm.org/viewvc/llvm-project?rev=351134&view=rev
>> >> Log:
>> >> [compiler-rt] UBSan: just completely disable two alignment-assumption tests for now.
>> >>
>> >> And they are faling on clang-cmake-armv7-full too.
>> >> *ONLY* these two.
>> >> I'm not sure what to make of it.
>> >>
>> >> Perhaps doing a malloc and checking that pointer will
>> >> make them fail as expected?
>> >>
>> >> Modified:
>> >>     compiler-rt/trunk/test/ubsan/TestCases/Pointer/alignment-assumption-attribute-alloc_align-on-function-variable.cpp
>> >>     compiler-rt/trunk/test/ubsan/TestCases/Pointer/alignment-assumption-attribute-alloc_align-on-function.cpp
>> >>
>> >> Modified: compiler-rt/trunk/test/ubsan/TestCases/Pointer/alignment-assumption-attribute-alloc_align-on-function-variable.cpp
>> >> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/Pointer/alignment-assumption-attribute-alloc_align-on-function-variable.cpp?rev=351134&r1=351133&r2=351134&view=diff
>> >> ==============================================================================
>> >> --- compiler-rt/trunk/test/ubsan/TestCases/Pointer/alignment-assumption-attribute-alloc_align-on-function-variable.cpp (original)
>> >> +++ compiler-rt/trunk/test/ubsan/TestCases/Pointer/alignment-assumption-attribute-alloc_align-on-function-variable.cpp Mon Jan 14 14:44:19 2019
>> >> @@ -1,7 +1,5 @@
>> >> -// FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=316
>> >> -// I'm not sure this is actually *that* issue, but this seems oddly similar to the other XFAIL'ed cases.
>> >> -// UNSUPPORTED: android
>> >> -// UNSUPPORTED: ios
>> >> +// FIXME: Fails on android, armv7. Not sure what is going on.
>> >> +// UNSUPPORTED: *
>> >>
>> >>  // RUN: %clang   -x c   -fsanitize=alignment -O0 %s -o %t && %run %t 2>&1 | FileCheck %s --implicit-check-not=" assumption " --implicit-check-not="note:" --implicit-check-not="error:"
>> >>  // RUN: %clang   -x c   -fsanitize=alignment -O1 %s -o %t && %run %t 2>&1 | FileCheck %s --implicit-check-not=" assumption " --implicit-check-not="note:" --implicit-check-not="error:"
>> >>
>> >> Modified: compiler-rt/trunk/test/ubsan/TestCases/Pointer/alignment-assumption-attribute-alloc_align-on-function.cpp
>> >> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/Pointer/alignment-assumption-attribute-alloc_align-on-function.cpp?rev=351134&r1=351133&r2=351134&view=diff
>> >> ==============================================================================
>> >> --- compiler-rt/trunk/test/ubsan/TestCases/Pointer/alignment-assumption-attribute-alloc_align-on-function.cpp (original)
>> >> +++ compiler-rt/trunk/test/ubsan/TestCases/Pointer/alignment-assumption-attribute-alloc_align-on-function.cpp Mon Jan 14 14:44:19 2019
>> >> @@ -1,7 +1,5 @@
>> >> -// FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=316
>> >> -// I'm not sure this is actually *that* issue, but this seems oddly similar to the other XFAIL'ed cases.
>> >> -// UNSUPPORTED: android
>> >> -// UNSUPPORTED: ios
>> >> +// FIXME: Fails on android, armv7. Not sure what is going on.
>> >> +// UNSUPPORTED: *
>> >>
>> >>  // RUN: %clang   -x c   -fsanitize=alignment -O0 %s -o %t && %run %t 2>&1 | FileCheck %s --implicit-check-not=" assumption " --implicit-check-not="note:" --implicit-check-not="error:"
>> >>  // RUN: %clang   -x c   -fsanitize=alignment -O1 %s -o %t && %run %t 2>&1 | FileCheck %s --implicit-check-not=" assumption " --implicit-check-not="note:" --implicit-check-not="error:"
>> >>
>> >>
>> >> _______________________________________________
>> >> 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