On 04/26/2017 03:38 PM, Bernd Edlinger wrote:
> I think however, that only one extra call frame can ever
> be seen, because the stack frames are only created by instrumentation
> at instrumented function begin and end statements.
> 
> So probably the test expectations could be more strict than in the
> proposed patch.

Hi.

I'm sending more restricted version of patch that works both on x86_64 and 
ppcl64.

Ready for trunk?
Martin
>From 76af8598879977fdf7c924f5576c04b8d9260013 Mon Sep 17 00:00:00 2001
From: marxin <mli...@suse.cz>
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  <mli...@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 | 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..def1d47de7b 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 "(    #0 \[^\n\r\]*(\n|\r\n|\r))?" } */
+/* { dg-output "    #\[01\] (__)?pthread_mutex_init \[^\n\r\]* (.)*" } */
+/* { dg-output "    #\[12\] Thread1.* .*(race_on_mutex.c:12|\\?{2}:0) .*" } */
-- 
2.12.2

Reply via email to