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 Remove preprocessor switch TEST_VFORK_ENA...



details:   https://anonhg.NetBSD.org/src/rev/49d1507bef1d
branches:  trunk
changeset: 464770:49d1507bef1d
user:      kamil <kamil%NetBSD.org@localhost>
date:      Mon Oct 21 18:31:40 2019 +0000

description:
Remove preprocessor switch TEST_VFORK_ENABLED in t_ptrace_wait*

vfork(2) tests are now enabled always and confirmed to be stable.

diffstat:

 tests/lib/libc/sys/t_ptrace_wait.c |  44 +++----------------------------------
 1 files changed, 4 insertions(+), 40 deletions(-)

diffs (220 lines):

diff -r ebb3d740d983 -r 49d1507bef1d tests/lib/libc/sys/t_ptrace_wait.c
--- a/tests/lib/libc/sys/t_ptrace_wait.c        Mon Oct 21 17:07:00 2019 +0000
+++ b/tests/lib/libc/sys/t_ptrace_wait.c        Mon Oct 21 18:31:40 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_ptrace_wait.c,v 1.138 2019/10/21 17:07:00 mgorny Exp $       */
+/*     $NetBSD: t_ptrace_wait.c,v 1.139 2019/10/21 18:31:40 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.138 2019/10/21 17:07:00 mgorny Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.139 2019/10/21 18:31:40 kamil Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -121,10 +121,6 @@
        printf("%s() %s:%d " a, __func__, __FILE__, __LINE__,  ##__VA_ARGS__); \
     while (/*CONSTCOND*/0)
 
-#ifndef TEST_VFORK_ENABLED
-#define TEST_VFORK_ENABLED 1
-#endif
-
 #ifndef TEST_LWP_ENABLED
 #define TEST_LWP_ENABLED 1
 #endif
@@ -3269,7 +3265,6 @@
 FORK_TEST(fork16, "fork", true, true, true, true)
 #endif
 
-#if TEST_VFORK_ENABLED
 FORK_TEST(vfork1, "vfork", false, false, false, false)
 #if defined(TWAIT_HAVE_PID)
 FORK_TEST(vfork2, "vfork", false, true, false, false)
@@ -3294,7 +3289,6 @@
 FORK_TEST(vfork15, "vfork", true, false, true, true)
 FORK_TEST(vfork16, "vfork", true, true, true, true)
 #endif
-#endif
 
 FORK_TEST(posix_spawn1, "spawn", false, false, false, false)
 FORK_TEST(posix_spawn2, "spawn", false, true, false, false)
@@ -3497,22 +3491,17 @@
 
 FORK_DETACH_FORKER(posix_spawn_detach_spawner, "spawn", false)
 FORK_DETACH_FORKER(fork_detach_forker, "fork", false)
-#if TEST_VFORK_ENABLED
 FORK_DETACH_FORKER(vfork_detach_vforker, "vfork", false)
 FORK_DETACH_FORKER(vfork_detach_vforkerdone, "vforkdone", false)
-#endif
 
 FORK_DETACH_FORKER(posix_spawn_kill_spawner, "spawn", true)
 FORK_DETACH_FORKER(fork_kill_forker, "fork", true)
-#if TEST_VFORK_ENABLED
 FORK_DETACH_FORKER(vfork_kill_vforker, "vfork", true)
 FORK_DETACH_FORKER(vfork_kill_vforkerdone, "vforkdone", true)
 #endif
-#endif
 
 /// ----------------------------------------------------------------------------
 
-#if TEST_VFORK_ENABLED
 static void
 traceme_vfork_fork_body(pid_t (*fn)(void))
 {
@@ -3571,7 +3560,6 @@
 
 TRACEME_VFORK_FORK_TEST(traceme_vfork_fork, fork)
 TRACEME_VFORK_FORK_TEST(traceme_vfork_vfork, vfork)
-#endif
 
 /// ----------------------------------------------------------------------------
 
@@ -6126,13 +6114,11 @@
 FORK2_TEST(posix_spawn_singalignored, "spawn", false, true)
 FORK2_TEST(fork_singalmasked, "fork", true, false)
 FORK2_TEST(fork_singalignored, "fork", false, true)
-#if TEST_VFORK_ENABLED
 FORK2_TEST(vfork_singalmasked, "vfork", true, false)
 FORK2_TEST(vfork_singalignored, "vfork", false, true)
 FORK2_TEST(vforkdone_singalmasked, "vforkdone", true, false)
 FORK2_TEST(vforkdone_singalignored, "vforkdone", false, true)
 #endif
-#endif
 
 /// ----------------------------------------------------------------------------
 
@@ -6991,7 +6977,6 @@
 //CLONE_TEST(clone_sighand8, CLONE_SIGHAND, true, true, true)
 #endif
 
-#if TEST_VFORK_ENABLED
 CLONE_TEST(clone_vfork1, CLONE_VFORK, false, false, false)
 #if defined(TWAIT_HAVE_PID)
 CLONE_TEST(clone_vfork2, CLONE_VFORK, true, false, false)
@@ -7004,7 +6989,6 @@
 CLONE_TEST(clone_vfork7, CLONE_VFORK, false, true, true)
 CLONE_TEST(clone_vfork8, CLONE_VFORK, true, true, true)
 #endif
-#endif
 
 /// ----------------------------------------------------------------------------
 
@@ -7367,15 +7351,12 @@
 CLONE_TEST2(clone_files_signalmasked, CLONE_FILES, false, true)
 //CLONE_TEST2(clone_sighand_signalignored, CLONE_SIGHAND, true, false) // XXX
 //CLONE_TEST2(clone_sighand_signalmasked, CLONE_SIGHAND, false, true)  // XXX
-#if TEST_VFORK_ENABLED
 CLONE_TEST2(clone_vfork_signalignored, CLONE_VFORK, true, false)
 CLONE_TEST2(clone_vfork_signalmasked, CLONE_VFORK, false, true)
 #endif
-#endif
 
 /// ----------------------------------------------------------------------------
 
-#if TEST_VFORK_ENABLED
 #if defined(TWAIT_HAVE_PID)
 static void
 traceme_vfork_clone_body(int flags)
@@ -7456,7 +7437,6 @@
 //TRACEME_VFORK_CLONE_TEST(traceme_vfork_clone_sighand, CLONE_SIGHAND)  // XXX
 TRACEME_VFORK_CLONE_TEST(traceme_vfork_clone_vfork, CLONE_VFORK)
 #endif
-#endif
 
 /// ----------------------------------------------------------------------------
 
@@ -8072,7 +8052,6 @@
        ATF_TP_ADD_TC_HAVE_PID(tp, fork15);
        ATF_TP_ADD_TC_HAVE_PID(tp, fork16);
 
-#if TEST_VFORK_ENABLED
        ATF_TP_ADD_TC(tp, vfork1);
        ATF_TP_ADD_TC_HAVE_PID(tp, vfork2);
        ATF_TP_ADD_TC_HAVE_PID(tp, vfork3);
@@ -8089,7 +8068,6 @@
        ATF_TP_ADD_TC_HAVE_PID(tp, vfork14);
        ATF_TP_ADD_TC_HAVE_PID(tp, vfork15);
        ATF_TP_ADD_TC_HAVE_PID(tp, vfork16);
-#endif
 
        ATF_TP_ADD_TC(tp, posix_spawn1);
        ATF_TP_ADD_TC(tp, posix_spawn2);
@@ -8110,22 +8088,16 @@
 
        ATF_TP_ADD_TC_HAVE_PID(tp, posix_spawn_detach_spawner);
        ATF_TP_ADD_TC_HAVE_PID(tp, fork_detach_forker);
-#if TEST_VFORK_ENABLED
        ATF_TP_ADD_TC_HAVE_PID(tp, vfork_detach_vforker);
        ATF_TP_ADD_TC_HAVE_PID(tp, vfork_detach_vforkerdone);
-#endif
 
        ATF_TP_ADD_TC_HAVE_PID(tp, posix_spawn_kill_spawner);
        ATF_TP_ADD_TC_HAVE_PID(tp, fork_kill_forker);
-#if TEST_VFORK_ENABLED
        ATF_TP_ADD_TC_HAVE_PID(tp, vfork_kill_vforker);
        ATF_TP_ADD_TC_HAVE_PID(tp, vfork_kill_vforkerdone);
-#endif
-
-#if TEST_VFORK_ENABLED
+
        ATF_TP_ADD_TC(tp, traceme_vfork_fork);
        ATF_TP_ADD_TC(tp, traceme_vfork_vfork);
-#endif
 
        ATF_TP_ADD_TC(tp, bytes_transfer_piod_read_d_8);
        ATF_TP_ADD_TC(tp, bytes_transfer_piod_read_d_16);
@@ -8256,12 +8228,10 @@
        ATF_TP_ADD_TC_HAVE_PID(tp, posix_spawn_singalignored);
        ATF_TP_ADD_TC_HAVE_PID(tp, fork_singalmasked);
        ATF_TP_ADD_TC_HAVE_PID(tp, fork_singalignored);
-#if TEST_VFORK_ENABLED
        ATF_TP_ADD_TC_HAVE_PID(tp, vfork_singalmasked);
        ATF_TP_ADD_TC_HAVE_PID(tp, vfork_singalignored);
        ATF_TP_ADD_TC_HAVE_PID(tp, vforkdone_singalmasked);
        ATF_TP_ADD_TC_HAVE_PID(tp, vforkdone_singalignored);
-#endif
 
        ATF_TP_ADD_TC(tp, signal9);
        ATF_TP_ADD_TC(tp, signal10);
@@ -8319,7 +8289,6 @@
 //     ATF_TP_ADD_TC_HAVE_PID(tp, clone_sighand7); // XXX
 //     ATF_TP_ADD_TC_HAVE_PID(tp, clone_sighand8); // XXX
 
-#if TEST_VFORK_ENABLED
        ATF_TP_ADD_TC(tp, clone_vfork1);
        ATF_TP_ADD_TC_HAVE_PID(tp, clone_vfork2);
        ATF_TP_ADD_TC_HAVE_PID(tp, clone_vfork3);
@@ -8328,7 +8297,6 @@
        ATF_TP_ADD_TC_HAVE_PID(tp, clone_vfork6);
        ATF_TP_ADD_TC_HAVE_PID(tp, clone_vfork7);
        ATF_TP_ADD_TC_HAVE_PID(tp, clone_vfork8);
-#endif
 
        ATF_TP_ADD_TC_HAVE_PID(tp, clone_signalignored);
        ATF_TP_ADD_TC_HAVE_PID(tp, clone_signalmasked);
@@ -8340,19 +8308,15 @@
        ATF_TP_ADD_TC_HAVE_PID(tp, clone_files_signalmasked);
 //     ATF_TP_ADD_TC_HAVE_PID(tp, clone_sighand_signalignored); // XXX
 //     ATF_TP_ADD_TC_HAVE_PID(tp, clone_sighand_signalmasked); // XXX
-#if TEST_VFORK_ENABLED
        ATF_TP_ADD_TC_HAVE_PID(tp, clone_vfork_signalignored);
        ATF_TP_ADD_TC_HAVE_PID(tp, clone_vfork_signalmasked);
-#endif
-
-#if TEST_VFORK_ENABLED
+
        ATF_TP_ADD_TC_HAVE_PID(tp, traceme_vfork_clone);
        ATF_TP_ADD_TC_HAVE_PID(tp, traceme_vfork_clone_vm);
        ATF_TP_ADD_TC_HAVE_PID(tp, traceme_vfork_clone_fs);
        ATF_TP_ADD_TC_HAVE_PID(tp, traceme_vfork_clone_files);
 //     ATF_TP_ADD_TC_HAVE_PID(tp, traceme_vfork_clone_sighand); // XXX
        ATF_TP_ADD_TC_HAVE_PID(tp, traceme_vfork_clone_vfork);
-#endif
 
        ATF_TP_ADD_TC(tp, user_va0_disable_pt_continue);
        ATF_TP_ADD_TC(tp, user_va0_disable_pt_syscall);



Home | Main Index | Thread Index | Old Index