public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, testsuite]: Improve check_effective_target_fsanitize_thread
@ 2016-02-03 13:54 Uros Bizjak
  2016-02-03 13:59 ` Jakub Jelinek
  2016-02-03 14:36 ` Eric Botcazou
  0 siblings, 2 replies; 10+ messages in thread
From: Uros Bizjak @ 2016-02-03 13:54 UTC (permalink / raw)
  To: gcc-patches; +Cc: Eric Botcazou

[-- Attachment #1: Type: text/plain, Size: 1441 bytes --]

Hello!

Attached patch improves detection of working -fsanitize=thread option.
Check for working -fsanitize=thread option timeouts with older glibcs,
so tsan_init detects this case and sets default compile flags to
compile.

Recently Eric changed check_effective_target_fsanitize_thread to a
runtime test, and we *again* unnecessarily waste 5 minutes of test
time here, waiting for a test to timeout.

Attached patch moves the detection to
check_effective_target_fsanitize_thread function. Now, the function
first checks if the compiler is able to create executable (and exits
early if not) and later in the function sets what to do by default,
depending on the outcome of the runtime test.

BTW: The dg-do-what-default link was chosen to avoid the testsuite
error due to the usage of additional-sources in some testcases). Also,
we don't need additional compile flags for check_no_compiler_messages
and check_runtime since TEST_ALWAYS_FLAG is always set.

2016-02-03  Uros Bizjak  <ubizjak@gmail.com>

    * lib/tsan-dg.exp (tsan_init): Move check if tsan executable
    works from here ...
    (check_effective_target_fsanitize_thread): ... to here.  Do not
    specify additional compile flags for the test source.
    * lib/asan-dg.exp (check_effective_target_fsanitize_address): Do not
    specify additional compile flags for the test source.

Patch was tested on x86_64-linux-gnu (CentOS 5.11 and Fedora 23).

OK for mainline?

Uros.

[-- Attachment #2: t.diff.txt --]
[-- Type: text/plain, Size: 1999 bytes --]

diff --git a/gcc/testsuite/lib/asan-dg.exp b/gcc/testsuite/lib/asan-dg.exp
index 994160e..a1198c0 100644
--- a/gcc/testsuite/lib/asan-dg.exp
+++ b/gcc/testsuite/lib/asan-dg.exp
@@ -20,7 +20,7 @@
 proc check_effective_target_fsanitize_address {} {
     return [check_no_compiler_messages fsanitize_address executable {
 	int main (void) { return 0; }
-    } "-fsanitize=address"]
+    }]
 }
 
 proc asan_include_flags {} {
diff --git a/gcc/testsuite/lib/tsan-dg.exp b/gcc/testsuite/lib/tsan-dg.exp
index eb1f3a9..5745fe7 100644
--- a/gcc/testsuite/lib/tsan-dg.exp
+++ b/gcc/testsuite/lib/tsan-dg.exp
@@ -15,12 +15,30 @@
 # <http://www.gnu.org/licenses/>.
 
 # Return 1 if compilation with -fsanitize=thread is error-free for trivial
-# code, 0 otherwise.
+# code, 0 otherwise.  Also set what to do by default here.
 
 proc check_effective_target_fsanitize_thread {} {
-    return [check_runtime fsanitize_thread {
+    global individual_timeout
+    global dg-do-what-default
+
+    if ![check_no_compiler_messages fsanitize_thread executable {
 	int main (void) { return 0; }
-    } "-fsanitize=thread"]
+    }] {
+        return 0
+    }
+
+    # Lower timeout value in case test does not terminate properly.
+    set individual_timeout 20
+    if [check_runtime_nocache tsan_works {
+	int main () { return 0; }
+    }] {
+	set dg-do-what-default run
+    } else {
+	set dg-do-what-default link
+    }
+    unset individual_timeout
+
+    return 1
 }
 
 #
@@ -101,22 +119,6 @@ proc tsan_init { args } {
 	    set TEST_ALWAYS_FLAGS "$link_flags -fsanitize=thread -g"
 	}
     }
-
-    set dg-do-what-default run
-    if { $link_flags != "" } {
-	global individual_timeout
-
-	# Lower timeout value in case test does not terminate properly.
-	set individual_timeout 20
-	if [check_runtime_nocache tsan_works {
-		int main () { return 0; }
-	    } "-fsanitize=thread -g"] {
-	    set dg-do-what-default run
-	} else {
-	    set dg-do-what-default compile
-	}
-	unset individual_timeout
-    }
 }
 
 #

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH, testsuite]: Improve check_effective_target_fsanitize_thread
  2016-02-03 13:54 [PATCH, testsuite]: Improve check_effective_target_fsanitize_thread Uros Bizjak
@ 2016-02-03 13:59 ` Jakub Jelinek
  2016-02-03 14:12   ` Uros Bizjak
  2016-02-03 14:36 ` Eric Botcazou
  1 sibling, 1 reply; 10+ messages in thread
From: Jakub Jelinek @ 2016-02-03 13:59 UTC (permalink / raw)
  To: Uros Bizjak; +Cc: gcc-patches, Eric Botcazou

On Wed, Feb 03, 2016 at 02:53:56PM +0100, Uros Bizjak wrote:
> diff --git a/gcc/testsuite/lib/asan-dg.exp b/gcc/testsuite/lib/asan-dg.exp
> index 994160e..a1198c0 100644
> --- a/gcc/testsuite/lib/asan-dg.exp
> +++ b/gcc/testsuite/lib/asan-dg.exp
> @@ -20,7 +20,7 @@
>  proc check_effective_target_fsanitize_address {} {
>      return [check_no_compiler_messages fsanitize_address executable {
>  	int main (void) { return 0; }
> -    } "-fsanitize=address"]
> +    }]
>  }
>  

This is just weird.  What if fsanitize_address effective target is used
outside of asan/ (i.e. without asan_init first) ?

	Jakub

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH, testsuite]: Improve check_effective_target_fsanitize_thread
  2016-02-03 13:59 ` Jakub Jelinek
@ 2016-02-03 14:12   ` Uros Bizjak
  2016-02-03 14:15     ` Jakub Jelinek
  2016-02-04 11:12     ` Andreas Schwab
  0 siblings, 2 replies; 10+ messages in thread
From: Uros Bizjak @ 2016-02-03 14:12 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: gcc-patches, Eric Botcazou

On Wed, Feb 3, 2016 at 2:59 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Wed, Feb 03, 2016 at 02:53:56PM +0100, Uros Bizjak wrote:
>> diff --git a/gcc/testsuite/lib/asan-dg.exp b/gcc/testsuite/lib/asan-dg.exp
>> index 994160e..a1198c0 100644
>> --- a/gcc/testsuite/lib/asan-dg.exp
>> +++ b/gcc/testsuite/lib/asan-dg.exp
>> @@ -20,7 +20,7 @@
>>  proc check_effective_target_fsanitize_address {} {
>>      return [check_no_compiler_messages fsanitize_address executable {
>>       int main (void) { return 0; }
>> -    } "-fsanitize=address"]
>> +    }]
>>  }
>>
>
> This is just weird.  What if fsanitize_address effective target is used
> outside of asan/ (i.e. without asan_init first) ?

It won't work, you also need various link flags that are part of
TEST_ALWAYS_FLAGS.

Uros.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH, testsuite]: Improve check_effective_target_fsanitize_thread
  2016-02-03 14:12   ` Uros Bizjak
@ 2016-02-03 14:15     ` Jakub Jelinek
  2016-02-04 11:12     ` Andreas Schwab
  1 sibling, 0 replies; 10+ messages in thread
From: Jakub Jelinek @ 2016-02-03 14:15 UTC (permalink / raw)
  To: Uros Bizjak; +Cc: gcc-patches, Eric Botcazou

On Wed, Feb 03, 2016 at 03:12:27PM +0100, Uros Bizjak wrote:
> On Wed, Feb 3, 2016 at 2:59 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> > On Wed, Feb 03, 2016 at 02:53:56PM +0100, Uros Bizjak wrote:
> >> diff --git a/gcc/testsuite/lib/asan-dg.exp b/gcc/testsuite/lib/asan-dg.exp
> >> index 994160e..a1198c0 100644
> >> --- a/gcc/testsuite/lib/asan-dg.exp
> >> +++ b/gcc/testsuite/lib/asan-dg.exp
> >> @@ -20,7 +20,7 @@
> >>  proc check_effective_target_fsanitize_address {} {
> >>      return [check_no_compiler_messages fsanitize_address executable {
> >>       int main (void) { return 0; }
> >> -    } "-fsanitize=address"]
> >> +    }]
> >>  }
> >>
> >
> > This is just weird.  What if fsanitize_address effective target is used
> > outside of asan/ (i.e. without asan_init first) ?
> 
> It won't work, you also need various link flags that are part of
> TEST_ALWAYS_FLAGS.

The patch is ok then.

	Jakub

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH, testsuite]: Improve check_effective_target_fsanitize_thread
  2016-02-03 13:54 [PATCH, testsuite]: Improve check_effective_target_fsanitize_thread Uros Bizjak
  2016-02-03 13:59 ` Jakub Jelinek
@ 2016-02-03 14:36 ` Eric Botcazou
  1 sibling, 0 replies; 10+ messages in thread
From: Eric Botcazou @ 2016-02-03 14:36 UTC (permalink / raw)
  To: Uros Bizjak; +Cc: gcc-patches

> Attached patch improves detection of working -fsanitize=thread option.
> Check for working -fsanitize=thread option timeouts with older glibcs,
> so tsan_init detects this case and sets default compile flags to
> compile.
> 
> Recently Eric changed check_effective_target_fsanitize_thread to a
> runtime test, and we *again* unnecessarily waste 5 minutes of test
> time here, waiting for a test to timeout.

Well, if you don't want someone else to do it again, you'd better adjust the 
comments as well because, as Jakub put it, the whole stuff is rather weird.

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH, testsuite]: Improve check_effective_target_fsanitize_thread
  2016-02-03 14:12   ` Uros Bizjak
  2016-02-03 14:15     ` Jakub Jelinek
@ 2016-02-04 11:12     ` Andreas Schwab
  2016-02-04 11:56       ` Uros Bizjak
  1 sibling, 1 reply; 10+ messages in thread
From: Andreas Schwab @ 2016-02-04 11:12 UTC (permalink / raw)
  To: Uros Bizjak; +Cc: Jakub Jelinek, gcc-patches, Eric Botcazou

Uros Bizjak <ubizjak@gmail.com> writes:

> On Wed, Feb 3, 2016 at 2:59 PM, Jakub Jelinek <jakub@redhat.com> wrote:
>> On Wed, Feb 03, 2016 at 02:53:56PM +0100, Uros Bizjak wrote:
>>> diff --git a/gcc/testsuite/lib/asan-dg.exp b/gcc/testsuite/lib/asan-dg.exp
>>> index 994160e..a1198c0 100644
>>> --- a/gcc/testsuite/lib/asan-dg.exp
>>> +++ b/gcc/testsuite/lib/asan-dg.exp
>>> @@ -20,7 +20,7 @@
>>>  proc check_effective_target_fsanitize_address {} {
>>>      return [check_no_compiler_messages fsanitize_address executable {
>>>       int main (void) { return 0; }
>>> -    } "-fsanitize=address"]
>>> +    }]
>>>  }
>>>
>>
>> This is just weird.  What if fsanitize_address effective target is used
>> outside of asan/ (i.e. without asan_init first) ?
>
> It won't work, you also need various link flags that are part of
> TEST_ALWAYS_FLAGS.

That breaks gcc.dg/sancov/asan.c.

Running /usr/local/gcc/gcc-20160204/gcc/testsuite/gcc.dg/sancov/sancov.exp ...
Executing on host: /usr/local/gcc/gcc-20160204/Build/gcc/xgcc -B/usr/local/gcc/gcc-20160204/Build/gcc/ fsanitize_address14637.c     -fno-diagnostics-show-caret -fdiagnostics-color=never   -lm  -o fsanitize_address14637.exe    (timeout = 300)
spawn -ignore SIGHUP /usr/local/gcc/gcc-20160204/Build/gcc/xgcc -B/usr/local/gcc/gcc-20160204/Build/gcc/ fsanitize_address14637.c -fno-diagnostics-show-caret -fdiagnostics-color=never -lm -o fsanitize_address14637.exe.
Executing on host: /usr/local/gcc/gcc-20160204/Build/gcc/xgcc -B/usr/local/gcc/gcc-20160204/Build/gcc/ /usr/local/gcc/gcc-20160204/gcc/testsuite/gcc.dg/sancov/asan.c     -fno-diagnostics-show-caret -fdiagnostics-color=never    -O0  -fsanitize-coverage=trace-pc -fsanitize=address -fdump-tree-optimized -S -o asan.s    (timeout = 300)
spawn -ignore SIGHUP /usr/local/gcc/gcc-20160204/Build/gcc/xgcc -B/usr/local/gcc/gcc-20160204/Build/gcc/ /usr/local/gcc/gcc-20160204/gcc/testsuite/gcc.dg/sancov/asan.c -fno-diagnostics-show-caret -fdiagnostics-color=never -O0 -fsanitize-coverage=trace-pc -fsanitize=address -fdump-tree-optimized -S -o asan.s.
cc1: warning: -fsanitize=address and -fsanitize=kernel-address are not supported for this target.
cc1: warning: -fsanitize=address not supported for this target.
output is:
cc1: warning: -fsanitize=address and -fsanitize=kernel-address are not supported for this target.
cc1: warning: -fsanitize=address not supported for this target.

FAIL: gcc.dg/sancov/asan.c   -O0  (test for excess errors)
Excess errors:
cc1: warning: -fsanitize=address and -fsanitize=kernel-address are not supported for this target
cc1: warning: -fsanitize=address not supported for this target

FAIL: gcc.dg/sancov/asan.c   -O0   scan-tree-dump-times optimized "__builtin___sanitizer_cov_trace_pc \\(\\)" 4
FAIL: gcc.dg/sancov/asan.c   -O0   scan-tree-dump-times optimized "__builtin___asan_report_load4 \\(" 1
FAIL: gcc.dg/sancov/asan.c   -O0   scan-tree-dump-times optimized "__builtin___asan_report_store4 \\(" 1

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH, testsuite]: Improve check_effective_target_fsanitize_thread
  2016-02-04 11:12     ` Andreas Schwab
@ 2016-02-04 11:56       ` Uros Bizjak
  2016-02-04 12:27         ` Uros Bizjak
  0 siblings, 1 reply; 10+ messages in thread
From: Uros Bizjak @ 2016-02-04 11:56 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Jakub Jelinek, gcc-patches, Eric Botcazou

On Thu, Feb 4, 2016 at 12:12 PM, Andreas Schwab <schwab@suse.de> wrote:
> Uros Bizjak <ubizjak@gmail.com> writes:
>
>> On Wed, Feb 3, 2016 at 2:59 PM, Jakub Jelinek <jakub@redhat.com> wrote:
>>> On Wed, Feb 03, 2016 at 02:53:56PM +0100, Uros Bizjak wrote:
>>>> diff --git a/gcc/testsuite/lib/asan-dg.exp b/gcc/testsuite/lib/asan-dg.exp
>>>> index 994160e..a1198c0 100644
>>>> --- a/gcc/testsuite/lib/asan-dg.exp
>>>> +++ b/gcc/testsuite/lib/asan-dg.exp
>>>> @@ -20,7 +20,7 @@
>>>>  proc check_effective_target_fsanitize_address {} {
>>>>      return [check_no_compiler_messages fsanitize_address executable {
>>>>       int main (void) { return 0; }
>>>> -    } "-fsanitize=address"]
>>>> +    }]
>>>>  }
>>>>
>>>
>>> This is just weird.  What if fsanitize_address effective target is used
>>> outside of asan/ (i.e. without asan_init first) ?
>>
>> It won't work, you also need various link flags that are part of
>> TEST_ALWAYS_FLAGS.
>
> That breaks gcc.dg/sancov/asan.c.
>
> Running /usr/local/gcc/gcc-20160204/gcc/testsuite/gcc.dg/sancov/sancov.exp ...
> Executing on host: /usr/local/gcc/gcc-20160204/Build/gcc/xgcc -B/usr/local/gcc/gcc-20160204/Build/gcc/ fsanitize_address14637.c     -fno-diagnostics-show-caret -fdiagnostics-color=never   -lm  -o fsanitize_address14637.exe    (timeout = 300)
> spawn -ignore SIGHUP /usr/local/gcc/gcc-20160204/Build/gcc/xgcc -B/usr/local/gcc/gcc-20160204/Build/gcc/ fsanitize_address14637.c -fno-diagnostics-show-caret -fdiagnostics-color=never -lm -o fsanitize_address14637.exe.
> Executing on host: /usr/local/gcc/gcc-20160204/Build/gcc/xgcc -B/usr/local/gcc/gcc-20160204/Build/gcc/ /usr/local/gcc/gcc-20160204/gcc/testsuite/gcc.dg/sancov/asan.c     -fno-diagnostics-show-caret -fdiagnostics-color=never    -O0  -fsanitize-coverage=trace-pc -fsanitize=address -fdump-tree-optimized -S -o asan.s    (timeout = 300)
> spawn -ignore SIGHUP /usr/local/gcc/gcc-20160204/Build/gcc/xgcc -B/usr/local/gcc/gcc-20160204/Build/gcc/ /usr/local/gcc/gcc-20160204/gcc/testsuite/gcc.dg/sancov/asan.c -fno-diagnostics-show-caret -fdiagnostics-color=never -O0 -fsanitize-coverage=trace-pc -fsanitize=address -fdump-tree-optimized -S -o asan.s.
> cc1: warning: -fsanitize=address and -fsanitize=kernel-address are not supported for this target.
> cc1: warning: -fsanitize=address not supported for this target.
> output is:
> cc1: warning: -fsanitize=address and -fsanitize=kernel-address are not supported for this target.
> cc1: warning: -fsanitize=address not supported for this target.
>
> FAIL: gcc.dg/sancov/asan.c   -O0  (test for excess errors)
> Excess errors:
> cc1: warning: -fsanitize=address and -fsanitize=kernel-address are not supported for this target
> cc1: warning: -fsanitize=address not supported for this target
>
> FAIL: gcc.dg/sancov/asan.c   -O0   scan-tree-dump-times optimized "__builtin___sanitizer_cov_trace_pc \\(\\)" 4
> FAIL: gcc.dg/sancov/asan.c   -O0   scan-tree-dump-times optimized "__builtin___asan_report_load4 \\(" 1
> FAIL: gcc.dg/sancov/asan.c   -O0   scan-tree-dump-times optimized "__builtin___asan_report_store4 \\(" 1

Eh, speaking about sanitizer testsuite weirdness...

Anyway, I'll revert asan-dg.change.

Thanks,
Uros.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH, testsuite]: Improve check_effective_target_fsanitize_thread
  2016-02-04 11:56       ` Uros Bizjak
@ 2016-02-04 12:27         ` Uros Bizjak
  2016-02-04 12:46           ` Andreas Schwab
  0 siblings, 1 reply; 10+ messages in thread
From: Uros Bizjak @ 2016-02-04 12:27 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Jakub Jelinek, gcc-patches, Eric Botcazou

On Thu, Feb 4, 2016 at 12:56 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Thu, Feb 4, 2016 at 12:12 PM, Andreas Schwab <schwab@suse.de> wrote:
>> Uros Bizjak <ubizjak@gmail.com> writes:
>>
>>> On Wed, Feb 3, 2016 at 2:59 PM, Jakub Jelinek <jakub@redhat.com> wrote:
>>>> On Wed, Feb 03, 2016 at 02:53:56PM +0100, Uros Bizjak wrote:
>>>>> diff --git a/gcc/testsuite/lib/asan-dg.exp b/gcc/testsuite/lib/asan-dg.exp
>>>>> index 994160e..a1198c0 100644
>>>>> --- a/gcc/testsuite/lib/asan-dg.exp
>>>>> +++ b/gcc/testsuite/lib/asan-dg.exp
>>>>> @@ -20,7 +20,7 @@
>>>>>  proc check_effective_target_fsanitize_address {} {
>>>>>      return [check_no_compiler_messages fsanitize_address executable {
>>>>>       int main (void) { return 0; }
>>>>> -    } "-fsanitize=address"]
>>>>> +    }]
>>>>>  }
>>>>>
>>>>
>>>> This is just weird.  What if fsanitize_address effective target is used
>>>> outside of asan/ (i.e. without asan_init first) ?
>>>
>>> It won't work, you also need various link flags that are part of
>>> TEST_ALWAYS_FLAGS.
>>
>> That breaks gcc.dg/sancov/asan.c.
>>
>> Running /usr/local/gcc/gcc-20160204/gcc/testsuite/gcc.dg/sancov/sancov.exp ...
>> Executing on host: /usr/local/gcc/gcc-20160204/Build/gcc/xgcc -B/usr/local/gcc/gcc-20160204/Build/gcc/ fsanitize_address14637.c     -fno-diagnostics-show-caret -fdiagnostics-color=never   -lm  -o fsanitize_address14637.exe    (timeout = 300)
>> spawn -ignore SIGHUP /usr/local/gcc/gcc-20160204/Build/gcc/xgcc -B/usr/local/gcc/gcc-20160204/Build/gcc/ fsanitize_address14637.c -fno-diagnostics-show-caret -fdiagnostics-color=never -lm -o fsanitize_address14637.exe.
>> Executing on host: /usr/local/gcc/gcc-20160204/Build/gcc/xgcc -B/usr/local/gcc/gcc-20160204/Build/gcc/ /usr/local/gcc/gcc-20160204/gcc/testsuite/gcc.dg/sancov/asan.c     -fno-diagnostics-show-caret -fdiagnostics-color=never    -O0  -fsanitize-coverage=trace-pc -fsanitize=address -fdump-tree-optimized -S -o asan.s    (timeout = 300)
>> spawn -ignore SIGHUP /usr/local/gcc/gcc-20160204/Build/gcc/xgcc -B/usr/local/gcc/gcc-20160204/Build/gcc/ /usr/local/gcc/gcc-20160204/gcc/testsuite/gcc.dg/sancov/asan.c -fno-diagnostics-show-caret -fdiagnostics-color=never -O0 -fsanitize-coverage=trace-pc -fsanitize=address -fdump-tree-optimized -S -o asan.s.
>> cc1: warning: -fsanitize=address and -fsanitize=kernel-address are not supported for this target.
>> cc1: warning: -fsanitize=address not supported for this target.
>> output is:
>> cc1: warning: -fsanitize=address and -fsanitize=kernel-address are not supported for this target.
>> cc1: warning: -fsanitize=address not supported for this target.
>>
>> FAIL: gcc.dg/sancov/asan.c   -O0  (test for excess errors)
>> Excess errors:
>> cc1: warning: -fsanitize=address and -fsanitize=kernel-address are not supported for this target
>> cc1: warning: -fsanitize=address not supported for this target
>>
>> FAIL: gcc.dg/sancov/asan.c   -O0   scan-tree-dump-times optimized "__builtin___sanitizer_cov_trace_pc \\(\\)" 4
>> FAIL: gcc.dg/sancov/asan.c   -O0   scan-tree-dump-times optimized "__builtin___asan_report_load4 \\(" 1
>> FAIL: gcc.dg/sancov/asan.c   -O0   scan-tree-dump-times optimized "__builtin___asan_report_store4 \\(" 1
>
> Eh, speaking about sanitizer testsuite weirdness...
>
> Anyway, I'll revert asan-dg.change.

OTOH, does this testcase even gets a chance to run? fsanitize_address
check builds an executable, so without proper library paths the test
fails.

IMO, we have to move this test to gcc.dg/asan directory.

Uros.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH, testsuite]: Improve check_effective_target_fsanitize_thread
  2016-02-04 12:27         ` Uros Bizjak
@ 2016-02-04 12:46           ` Andreas Schwab
  2016-02-04 12:49             ` Andreas Schwab
  0 siblings, 1 reply; 10+ messages in thread
From: Andreas Schwab @ 2016-02-04 12:46 UTC (permalink / raw)
  To: Uros Bizjak; +Cc: Jakub Jelinek, gcc-patches, Eric Botcazou

Uros Bizjak <ubizjak@gmail.com> writes:

> OTOH, does this testcase even gets a chance to run?

It's not a runtime check.

Running /opt/gcc/gcc-20160204/gcc/testsuite/gcc.dg/sancov/sancov.exp ...
Executing on host: /opt/gcc/gcc-20160204/Build/gcc/xgcc -B/opt/gcc/gcc-20160204/Build/gcc/ fsanitize_address19647.c     -fno-diagnostics-show-caret -fdiagnostics-color=never   -lm  -o fsanitize_address19647.exe    (timeout = 300)
spawn -ignore SIGHUP /opt/gcc/gcc-20160204/Build/gcc/xgcc -B/opt/gcc/gcc-20160204/Build/gcc/ fsanitize_address19647.c -fno-diagnostics-show-caret -fdiagnostics-color=never -lm -o fsanitize_address19647.exe.
Executing on host: /opt/gcc/gcc-20160204/Build/gcc/xgcc -B/opt/gcc/gcc-20160204/Build/gcc/ /opt/gcc/gcc-20160204/gcc/testsuite/gcc.dg/sancov/asan.c     -fno-diagnostics-show-caret -fdiagnostics-color=never    -O0  -fsanitize-coverage=trace-pc -fsanitize=address -fdump-tree-optimized -S -o asan.s    (timeout = 300)
spawn -ignore SIGHUP /opt/gcc/gcc-20160204/Build/gcc/xgcc -B/opt/gcc/gcc-20160204/Build/gcc/ /opt/gcc/gcc-20160204/gcc/testsuite/gcc.dg/sancov/asan.c -fno-diagnostics-show-caret -fdiagnostics-color=never -O0 -fsanitize-coverage=trace-pc -fsanitize=address -fdump-tree-optimized -S -o asan.s.
PASS: gcc.dg/sancov/asan.c   -O0  (test for excess errors)
PASS: gcc.dg/sancov/asan.c   -O0   scan-tree-dump-times optimized "__builtin___sanitizer_cov_trace_pc \\(\\)" 4
PASS: gcc.dg/sancov/asan.c   -O0   scan-tree-dump-times optimized "__builtin___asan_report_load4 \\(" 1
PASS: gcc.dg/sancov/asan.c   -O0   scan-tree-dump-times optimized "__builtin___asan_report_store4 \\(" 1
Executing on host: /opt/gcc/gcc-20160204/Build/gcc/xgcc -B/opt/gcc/gcc-20160204/Build/gcc/ /opt/gcc/gcc-20160204/gcc/testsuite/gcc.dg/sancov/asan.c     -fno-diagnostics-show-caret -fdiagnostics-color=never    -O1  -fsanitize-coverage=trace-pc -fsanitize=address -fdump-tree-optimized -S -o asan.s    (timeout = 300)
spawn -ignore SIGHUP /opt/gcc/gcc-20160204/Build/gcc/xgcc -B/opt/gcc/gcc-20160204/Build/gcc/ /opt/gcc/gcc-20160204/gcc/testsuite/gcc.dg/sancov/asan.c -fno-diagnostics-show-caret -fdiagnostics-color=never -O1 -fsanitize-coverage=trace-pc -fsanitize=address -fdump-tree-optimized -S -o asan.s.
PASS: gcc.dg/sancov/asan.c   -O1  (test for excess errors)
PASS: gcc.dg/sancov/asan.c   -O1   scan-tree-dump-times optimized "__builtin___sanitizer_cov_trace_pc \\(\\)" 4
PASS: gcc.dg/sancov/asan.c   -O1   scan-tree-dump-times optimized "__builtin___asan_report_load4 \\(" 1
PASS: gcc.dg/sancov/asan.c   -O1   scan-tree-dump-times optimized "__builtin___asan_report_store4 \\(" 1

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH, testsuite]: Improve check_effective_target_fsanitize_thread
  2016-02-04 12:46           ` Andreas Schwab
@ 2016-02-04 12:49             ` Andreas Schwab
  0 siblings, 0 replies; 10+ messages in thread
From: Andreas Schwab @ 2016-02-04 12:49 UTC (permalink / raw)
  To: Uros Bizjak; +Cc: Jakub Jelinek, gcc-patches, Eric Botcazou

Andreas Schwab <schwab@suse.de> writes:

> Uros Bizjak <ubizjak@gmail.com> writes:
>
>> OTOH, does this testcase even gets a chance to run?
>
> It's not a runtime check.

But it didn't link until today:

Running /opt/gcc/gcc-20160203/gcc/testsuite/gcc.dg/sancov/sancov.exp ...
Executing on host: /opt/gcc/gcc-20160203/Build/gcc/xgcc -B/opt/gcc/gcc-20160203/Build/gcc/ fsanitize_address29346.c     -fno-diagnostics-show-caret -fdiagnostics-color=never  -fsanitize=address  -lm  -o fsanitize_address29346.exe    (timeout = 300)
spawn -ignore SIGHUP /opt/gcc/gcc-20160203/Build/gcc/xgcc -B/opt/gcc/gcc-20160203/Build/gcc/ fsanitize_address29346.c -fno-diagnostics-show-caret -fdiagnostics-color=never -fsanitize=address -lm -o fsanitize_address29346.exe.
/usr/aarch64-suse-linux/bin/ld: cannot find libasan_preinit.o: No such file or directory.
/usr/aarch64-suse-linux/bin/ld: cannot find -lasan.
collect2: error: ld returned 1 exit status.
compiler exited with status 1
output is:
/usr/aarch64-suse-linux/bin/ld: cannot find libasan_preinit.o: No such file or directory.
/usr/aarch64-suse-linux/bin/ld: cannot find -lasan.
collect2: error: ld returned 1 exit status.

UNSUPPORTED: gcc.dg/sancov/asan.c   -O0 
UNSUPPORTED: gcc.dg/sancov/asan.c   -O1 
UNSUPPORTED: gcc.dg/sancov/asan.c   -O2 
UNSUPPORTED: gcc.dg/sancov/asan.c   -O3 
UNSUPPORTED: gcc.dg/sancov/asan.c   -O0 -g 
UNSUPPORTED: gcc.dg/sancov/asan.c   -O1 -g 
UNSUPPORTED: gcc.dg/sancov/asan.c   -O2 -g 
UNSUPPORTED: gcc.dg/sancov/asan.c   -O3 -g 

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-02-04 12:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-03 13:54 [PATCH, testsuite]: Improve check_effective_target_fsanitize_thread Uros Bizjak
2016-02-03 13:59 ` Jakub Jelinek
2016-02-03 14:12   ` Uros Bizjak
2016-02-03 14:15     ` Jakub Jelinek
2016-02-04 11:12     ` Andreas Schwab
2016-02-04 11:56       ` Uros Bizjak
2016-02-04 12:27         ` Uros Bizjak
2016-02-04 12:46           ` Andreas Schwab
2016-02-04 12:49             ` Andreas Schwab
2016-02-03 14:36 ` Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).