From cfa69b0bb23b69087b5619a76d52eba8743cbbb2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 6 Feb 2015 12:29:50 -0800 Subject: [PATCH] Conditionalize some tests' use of SA_SIGINFO. --- ChangeLog | 7 +++++++ debug/tst-backtrace6.c | 11 +++++++++-- nptl/tst-cancel20.c | 2 ++ nptl/tst-cancel21.c | 2 ++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 32b8a64542..fa82cfa2df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2015-02-06 Roland McGrath + * nptl/tst-cancel20.c (do_test): Conditionalize SA_SIGINFO-using tests + on [SA_SIGINFO]. + * nptl/tst-cancel21.c (do_test): Likewise. + * debug/tst-backtrace6.c: Include first thing. + Conditionalize inclusion of tst-backtrace5.c on [SA_SIGINFO]. + [!SA_SIGINFO]: Make it a stub test. + * misc/tst-pselect.c (do_test): Don't set SA_NOCLDWAIT in sa_flags for SIGCHLD; it's redundant with SIG_IGN as sa_handler. diff --git a/debug/tst-backtrace6.c b/debug/tst-backtrace6.c index eb5028ecc9..9c1ed751bd 100644 --- a/debug/tst-backtrace6.c +++ b/debug/tst-backtrace6.c @@ -17,5 +17,12 @@ License along with the GNU C Library; if not, see . */ -#define SIGACTION_FLAGS SA_SIGINFO -#include +#include + +#ifdef SA_SIGINFO +# define SIGACTION_FLAGS SA_SIGINFO +# include +#else +# define TEST_FUNCTION 0 +# include "../test-skeleton.c" +#endif diff --git a/nptl/tst-cancel20.c b/nptl/tst-cancel20.c index 4a964da487..51b558e98d 100644 --- a/nptl/tst-cancel20.c +++ b/nptl/tst-cancel20.c @@ -227,6 +227,7 @@ do_test (void) if (do_one_test ()) return 1; +#ifdef SA_SIGINFO sa.sa_sigaction = (void (*)(int, siginfo_t *, void *)) sh; sigemptyset (&sa.sa_mask); sa.sa_flags = SA_SIGINFO; @@ -254,6 +255,7 @@ do_test (void) puts ("sa_flags = SA_SIGINFO|SA_ONSTACK test"); if (do_one_test ()) return 1; +#endif return 0; } diff --git a/nptl/tst-cancel21.c b/nptl/tst-cancel21.c index 35a27d4b51..b54f236b03 100644 --- a/nptl/tst-cancel21.c +++ b/nptl/tst-cancel21.c @@ -257,6 +257,7 @@ do_test (void) if (do_one_test ()) return 1; +#ifdef SA_SIGINFO sa.sa_sigaction = (void (*)(int, siginfo_t *, void *)) sh; sigemptyset (&sa.sa_mask); sa.sa_flags = SA_SIGINFO; @@ -284,6 +285,7 @@ do_test (void) puts ("sa_flags = SA_SIGINFO|SA_ONSTACK test"); if (do_one_test ()) return 1; +#endif return 0; }