[compiler-rt] r304941 - Fix tsan test for Darwin. NFCI.

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 7 14:11:24 PDT 2017


Done in r30494{3, 4}.

vedant

> On Jun 7, 2017, at 2:08 PM, Vedant Kumar via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> Thanks for pointing this out. I'll revert this and mark the test as unsupported on darwin.
> 
> vedant
> 
>> On Jun 7, 2017, at 2:02 PM, Vitaly Buka <vitalybuka at google.com <mailto:vitalybuka at google.com>> wrote:
>> 
>> Actually it depends on return value.
>> Test is for char* version of function. It will probably fail for int version.
>> 
>> Probably better just:
>> // UNSUPPORTED: darwin
>> 
>> On Wed, Jun 7, 2017 at 1:43 PM, Vedant Kumar via llvm-commits <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote:
>> Author: vedantk
>> Date: Wed Jun  7 15:43:15 2017
>> New Revision: 304941
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=304941&view=rev <http://llvm.org/viewvc/llvm-project?rev=304941&view=rev>
>> Log:
>> Fix tsan test for Darwin. NFCI.
>> 
>> On Darwin, strerror_r returns an int, not a char*. I don't think this
>> test really depends on what strerror_r returns, so I've used something
>> else in place of the result of the call to strerror_r.
>> 
>> Modified:
>>     compiler-rt/trunk/test/tsan/strerror_r.cc
>> 
>> Modified: compiler-rt/trunk/test/tsan/strerror_r.cc
>> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/strerror_r.cc?rev=304941&r1=304940&r2=304941&view=diff <http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/strerror_r.cc?rev=304941&r1=304940&r2=304941&view=diff>
>> ==============================================================================
>> --- compiler-rt/trunk/test/tsan/strerror_r.cc (original)
>> +++ compiler-rt/trunk/test/tsan/strerror_r.cc Wed Jun  7 15:43:15 2017
>> @@ -10,7 +10,8 @@
>>  char buffer[1000];
>> 
>>  void *Thread(void *p) {
>> -  return strerror_r(TEST_ERROR, buffer, sizeof(buffer));
>> +  (void)strerror_r(TEST_ERROR, buffer, sizeof(buffer));
>> +  return p;
>>  }
>> 
>>  int main() {
>> 
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits>
>> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170607/d5362d14/attachment.html>


More information about the llvm-commits mailing list