[PATCH] Fix test-case on ppc64le (PR testsuite/79455).
Martin Liška
mliska@suse.cz
Tue Apr 25 09:41:00 GMT 2017
On 04/24/2017 05:19 PM, Jakub Jelinek wrote:
> On Mon, Apr 24, 2017 at 03:04:43PM +0200, Martin Liška wrote:
>> gcc/testsuite/ChangeLog:
>>
>> 2017-04-24 Martin Liska <mliska@suse.cz>
>>
>> * c-c++-common/tsan/race_on_mutex.c: Make the scanned pattern
>> more generic.
>> ---
>> gcc/testsuite/c-c++-common/tsan/race_on_mutex.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/gcc/testsuite/c-c++-common/tsan/race_on_mutex.c b/gcc/testsuite/c-c++-common/tsan/race_on_mutex.c
>> index ae30d053c92..80c193789d7 100644
>> --- a/gcc/testsuite/c-c++-common/tsan/race_on_mutex.c
>> +++ b/gcc/testsuite/c-c++-common/tsan/race_on_mutex.c
>> @@ -40,6 +40,6 @@ int main() {
>> /* { dg-output " Atomic read of size 1 at .* by thread T2:(\n|\r\n|\r)" } */
>
> In that case you should also change the above 1 to \[0-9]\+ or so.
Yes
>
>> /* { dg-output " #0 pthread_mutex_lock.*" } */
>> /* { dg-output " #1 Thread2.* .*(race_on_mutex.c:22|\\?{2}:0) (.*)" } */
>> -/* { dg-output " Previous write of size 1 at .* by thread T1:(\n|\r\n|\r)" } */
>> -/* { dg-output " #0 pthread_mutex_init .* (.)*" } */
>> -/* { dg-output " #1 Thread1.* .*(race_on_mutex.c:12|\\?{2}:0) .*" } */
>> +/* { dg-output " Previous write of size . at .* by thread T1:(\n|\r\n|\r)" } */
>
> And here too instead of . Also, the .* will accept newlines, so you want to
> use \[^\n\r]* instead of .* everywhere.
Fixed that. I need to conditionaly catch line:
#0 memset ../../../../libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:558 (libtsan.so.0+0x000000036194)
>
>> +/* { dg-output " #. .*pthread_mutex_init .* (.)*" } */
>> +/* { dg-output " #. Thread1.* .*(race_on_mutex.c:12|\\?{2}:0) .*" } */
>
> Why the (.)* ? Is anything matching that?
There should be just (__)?
Martin
>
> Jakub
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-test-case-on-ppc64le-PR-testsuite-79455.patch
Type: text/x-patch
Size: 1646 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170425/5f68455c/attachment.bin>
More information about the Gcc-patches
mailing list