Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/sys Disable t_ptrace_wait* tests for MKSANITI...
details: https://anonhg.NetBSD.org/src/rev/537cf57752b7
branches: trunk
changeset: 1007549:537cf57752b7
user: kamil <kamil%NetBSD.org@localhost>
date: Sat Feb 22 19:44:07 2020 +0000
description:
Disable t_ptrace_wait* tests for MKSANITIZER/MKLIBCSANITIZER
A subset of tests is not compatible with the sanitizers.
diffstat:
tests/lib/libc/sys/Makefile | 11 ++++++++++-
tests/lib/libc/sys/t_ptrace_wait.c | 28 ++++++++++++++++++++++++++--
tests/lib/libc/sys/t_ptrace_wait.h | 12 +-----------
3 files changed, 37 insertions(+), 14 deletions(-)
diffs (125 lines):
diff -r f5c7cb212949 -r 537cf57752b7 tests/lib/libc/sys/Makefile
--- a/tests/lib/libc/sys/Makefile Sat Feb 22 19:37:31 2020 +0000
+++ b/tests/lib/libc/sys/Makefile Sat Feb 22 19:44:07 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.57 2019/06/30 21:20:04 mgorny Exp $
+# $NetBSD: Makefile,v 1.58 2020/02/22 19:44:07 kamil Exp $
MKMAN= no
@@ -110,6 +110,15 @@
CPPFLAGS.t_ptrace_waitpid.c += -D_KERNTYPES -D__TEST_FENV
CPPFLAGS.t_ucontext.c += -D_KERNTYPES
+.if ${MKSANITIZER:Uno} != "yes" && ${MKLIBCSANITIZER:Uno} != "yes"
+CPPFLAGS.t_ptrace_wait.c += -DENABLE_TESTS
+CPPFLAGS.t_ptrace_wait3.c += -DENABLE_TESTS
+CPPFLAGS.t_ptrace_wait4.c += -DENABLE_TESTS
+CPPFLAGS.t_ptrace_wait6.c += -DENABLE_TESTS
+CPPFLAGS.t_ptrace_waitid.c += -DENABLE_TESTS
+CPPFLAGS.t_ptrace_waitpid.c += -DENABLE_TESTS
+.endif
+
FILES= truncate_test.root_owned
FILESBUILD= yes
FILESDIR_truncate_test.root_owned= ${TESTSDIR}
diff -r f5c7cb212949 -r 537cf57752b7 tests/lib/libc/sys/t_ptrace_wait.c
--- a/tests/lib/libc/sys/t_ptrace_wait.c Sat Feb 22 19:37:31 2020 +0000
+++ b/tests/lib/libc/sys/t_ptrace_wait.c Sat Feb 22 19:44:07 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ptrace_wait.c,v 1.164 2020/02/20 22:38:54 kamil Exp $ */
+/* $NetBSD: t_ptrace_wait.c,v 1.165 2020/02/22 19:44:07 kamil Exp $ */
/*-
* Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.164 2020/02/20 22:38:54 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.165 2020/02/22 19:44:07 kamil Exp $");
#define __LEGACY_PT_LWPINFO
@@ -76,6 +76,8 @@
#include <atf-c.h>
+#ifdef ENABLE_TESTS
+
/* Assumptions in the kernel code that must be kept. */
static_assert(sizeof(((struct ptrace_state *)0)->pe_report_event) ==
sizeof(((siginfo_t *)0)->si_pe_report_event),
@@ -9016,11 +9018,29 @@
#include "t_ptrace_i386_wait.h"
#include "t_ptrace_x86_wait.h"
+/// ----------------------------------------------------------------------------
+
+#else
+ATF_TC(dummy);
+ATF_TC_HEAD(dummy, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "A dummy test");
+}
+
+ATF_TC_BODY(dummy, tc)
+{
+
+ // Dummy, skipped
+ // The ATF framework requires at least a single defined test.
+}
+#endif
+
ATF_TP_ADD_TCS(tp)
{
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stderr, NULL, _IONBF, 0);
+#ifdef ENABLE_TESTS
ATF_TP_ADD_TC(tp, traceme_raise1);
ATF_TP_ADD_TC(tp, traceme_raise2);
ATF_TP_ADD_TC(tp, traceme_raise3);
@@ -9620,5 +9640,9 @@
ATF_TP_ADD_TCS_PTRACE_WAIT_I386();
ATF_TP_ADD_TCS_PTRACE_WAIT_X86();
+#else
+ ATF_TP_ADD_TC(tp, dummy);
+#endif
+
return atf_no_error();
}
diff -r f5c7cb212949 -r 537cf57752b7 tests/lib/libc/sys/t_ptrace_wait.h
--- a/tests/lib/libc/sys/t_ptrace_wait.h Sat Feb 22 19:37:31 2020 +0000
+++ b/tests/lib/libc/sys/t_ptrace_wait.h Sat Feb 22 19:44:07 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ptrace_wait.h,v 1.21 2020/02/13 13:38:44 kamil Exp $ */
+/* $NetBSD: t_ptrace_wait.h,v 1.22 2020/02/22 19:44:07 kamil Exp $ */
/*-
* Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -606,11 +606,6 @@
#endif
}
-#if defined(__clang__)
-__attribute__((no_sanitize("undefined")))
-#else
-__attribute__((no_sanitize_undefined))
-#endif
static void __used
trigger_segv(void)
{
@@ -647,11 +642,6 @@
return true;
}
-#if defined(__clang__)
-__attribute__((no_sanitize("undefined")))
-#else
-__attribute__((no_sanitize_undefined))
-#endif
static void __used
trigger_fpe(void)
{
Home |
Main Index |
Thread Index |
Old Index