Patchwork PR55679: skip invalid tests from r194458 on darwin

login
register
mail settings
Submitter Jack Howarth
Date Dec. 14, 2012, 1:21 a.m.
Message ID <20121214012149.GA1287@bromo.med.uc.edu>
Download mbox | patch
Permalink /patch/206270/
State New
Headers show

Comments

Jack Howarth - Dec. 14, 2012, 1:21 a.m.
The attached patch disables two asan tests introduced in r194458 which are invalid
on darwin. The g++.dg/asan/interception-test-1.C test is invalid on darwin since 
mac function interposition is used instead of interception. The c-c++-common/asan/swapcontext-test-1.c
test is invalid as ucontext support was deprecated in darwin10 and removed completely
in darwin11. Tested on x86_64-apple-darwin10. Okay for gcc trunk?
         Jack
gcc/testsuite/

2012-12-13  Jack Howarth <howarth@bromo.med.uc.edu>

	PR 55679/sanitizer
	* g++.dg/asan/interception-test-1.C: Skip on darwin.
	* c-c++-common/asan/swapcontext-test-1.c: Likewise.
Jakub Jelinek - Dec. 14, 2012, 7:49 a.m.
On Thu, Dec 13, 2012 at 08:21:49PM -0500, Jack Howarth wrote:
> 2012-12-13  Jack Howarth <howarth@bromo.med.uc.edu>
> 
> 	PR 55679/sanitizer

PR sanitizer/55679 instead

> 	* g++.dg/asan/interception-test-1.C: Skip on darwin.

This I can live with.

> --- gcc/testsuite/c-c++-common/asan/swapcontext-test-1.c	(revision 194483)
> +++ gcc/testsuite/c-c++-common/asan/swapcontext-test-1.c	(working copy)
> @@ -1,6 +1,7 @@
>  /* Check that ASan plays well with easy cases of makecontext/swapcontext. */
>  
>  /* { dg-do run { target swapcontext } } */
> +// { dg-skip-if "Ucontext support deprecated on darwin" { *-*-darwin* } }
>  
>  #include <stdio.h>
>  #include <ucontext.h>

This is wrong.  You should figure out why the effective target swapcontext
succeeded, despite the target not supporting that feature, and possibly replace
it with e.g. compile test or similar.

	Jakub

Patch

Index: gcc/testsuite/g++.dg/asan/interception-test-1.C
===================================================================
--- gcc/testsuite/g++.dg/asan/interception-test-1.C	(revision 194483)
+++ gcc/testsuite/g++.dg/asan/interception-test-1.C	(working copy)
@@ -3,6 +3,7 @@ 
 // { dg-do run }
 // { dg-options "-fno-builtin-malloc -fno-builtin-free" }
 // { dg-shouldfail "asan" }
+// { dg-skip-if "Darwin uses mac function interposition" { *-*-darwin* } }
 
 #include <stdlib.h>
 #include <stdio.h>
Index: gcc/testsuite/c-c++-common/asan/swapcontext-test-1.c
===================================================================
--- gcc/testsuite/c-c++-common/asan/swapcontext-test-1.c	(revision 194483)
+++ gcc/testsuite/c-c++-common/asan/swapcontext-test-1.c	(working copy)
@@ -1,6 +1,7 @@ 
 /* Check that ASan plays well with easy cases of makecontext/swapcontext. */
 
 /* { dg-do run { target swapcontext } } */
+// { dg-skip-if "Ucontext support deprecated on darwin" { *-*-darwin* } }
 
 #include <stdio.h>
 #include <ucontext.h>