From patchwork Tue Apr 25 09:30:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 754661 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wBydg3njvz9s2G for ; Tue, 25 Apr 2017 19:31:35 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="tRlwrEXZ"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=skiU97sAp40m+rYkJ 81ZzBu62w6YEHnAyA02o7xmh3HZQLZhpre9Rvuw552bYSOT8JfSRq/BWw/GMmIRq gNVDxvgD5C/veNp4vjDKfxDKsclvYu+s0IQ1sI8ltNX2HDNGHhj7THvih81tRN9t tFQ/BwIBYuA5pslbV8mgGyXvf8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=sKCFyLW7/qUeTObMYk18c3G /8vw=; b=tRlwrEXZSdILIF3LsVXKJHO2EDsFydfUtXrD+jqxts6vUlUOwNLns8l wSTcoUPapS3nvQ5lsD6FWsN2DWX++5E/XR938ka8mMxiBEbYhgYorgKX0DKPfMQV cJn34uVj77vG6z76vfG00lCDvWALwyKG5mEL6RSmD6Vt6jZcPUtE= Received: (qmail 130541 invoked by alias); 25 Apr 2017 09:31:03 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 130417 invoked by uid 89); 25 Apr 2017 09:31:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.2 spammy=scanned X-Spam-User: qpsmtpd, 3 recipients X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 25 Apr 2017 09:30:59 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7D6B7AB07; Tue, 25 Apr 2017 09:30:59 +0000 (UTC) Subject: Re: [PATCH] Fix test-case on ppc64le (PR testsuite/79455). To: Jakub Jelinek References: <0fca1de5-0203-f14a-d59e-e70664ce57ec@suse.cz> <20170424151939.GP1809@tucnak> Cc: GCC Patches , Segher Boessenkool , wschmidt@gcc.gnu.org, kelvin@gcc.gnu.org From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: Date: Tue, 25 Apr 2017 11:30:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170424151939.GP1809@tucnak> X-IsSubscribed: yes 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 >> >> * 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 > From 8001530f2041a0a390e62a710f28ef42ef730cc7 Mon Sep 17 00:00:00 2001 From: marxin Date: Mon, 24 Apr 2017 14:59:18 +0200 Subject: [PATCH] Fix test-case on ppc64le (PR testsuite/79455). gcc/testsuite/ChangeLog: 2017-04-24 Martin Liska * c-c++-common/tsan/race_on_mutex.c: Make the scanned pattern more generic. --- gcc/testsuite/c-c++-common/tsan/race_on_mutex.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 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..b3274a60ce5 100644 --- a/gcc/testsuite/c-c++-common/tsan/race_on_mutex.c +++ b/gcc/testsuite/c-c++-common/tsan/race_on_mutex.c @@ -37,9 +37,10 @@ int main() { } /* { dg-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */ -/* { dg-output " Atomic read of size 1 at .* by thread T2:(\n|\r\n|\r)" } */ +/* { dg-output " Atomic read of size \[0-9]\+ at .* by thread T2:(\n|\r\n|\r)" } */ /* { 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 \[0-9]\+ at .* by thread T1:(\n|\r\n|\r)" } */ +/* { dg-output "( #. \[^\n\r\]*(\n|\r\n|\r))?" } */ +/* { dg-output " #. (__)?pthread_mutex_init \[^\n\r\]* (.)*" } */ +/* { dg-output " #. Thread1.* .*(race_on_mutex.c:12|\\?{2}:0) .*" } */ -- 2.12.2