From b81cc0ceb7659944ebefdd074764035769c23957 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 15 Oct 2024 19:27:39 +1000 Subject: [PATCH] test: only force gdb to no-fork, valgrind can fork Part-of: --- test/litest.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/litest.c b/test/litest.c index 2745aa64..fa2c0ce9 100644 --- a/test/litest.c +++ b/test/litest.c @@ -4754,7 +4754,6 @@ disable_tty(void) if (!run_deviceless && jobs > 1 && !in_debugger && - getenv("CK_FORK") == NULL && isatty(STDIN_FILENO) && ioctl(STDIN_FILENO, KDGKBMODE, &tty_mode) == 0) { #ifdef __linux__ @@ -4823,11 +4822,10 @@ main(int argc, char **argv) const char *meson_testthreads; in_debugger = is_debugger_attached(); - if (in_debugger || RUNNING_ON_VALGRIND) - setenv("CK_FORK", "no", 0); - - if ((meson_testthreads = getenv("MESON_TESTTHREADS")) == NULL || - !safe_atoi(meson_testthreads, &jobs)) { + if (in_debugger) { + jobs = 0; + } else if ((meson_testthreads = getenv("MESON_TESTTHREADS")) == NULL || + !safe_atoi(meson_testthreads, &jobs)) { jobs = get_nprocs(); if (!RUNNING_ON_VALGRIND) jobs *= 2; -- 2.34.1